mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
more updates
This commit is contained in:
42
docs/integrations/homeassistant/automation.yaml
Normal file
42
docs/integrations/homeassistant/automation.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
- id: ems-esp_offline
|
||||
alias: See if ems-esp goes offline
|
||||
initial_state: true
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.ems_esp_status
|
||||
to: offline
|
||||
action:
|
||||
- service: notify.admin_notify
|
||||
data_template:
|
||||
title: EMS-ESP
|
||||
message: 'gone offline'
|
||||
|
||||
- id: emsesp_restart
|
||||
alias: See if ems-esp restarts
|
||||
initial_state: true
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: home/ems-esp/start
|
||||
payload: start
|
||||
action:
|
||||
- service: notify.admin_notify
|
||||
data_template:
|
||||
title: ems-esp has booted
|
||||
message: EMS-ESP
|
||||
- service: mqtt.publish
|
||||
data_template:
|
||||
topic: home/ems-esp/start
|
||||
payload: '{{ now().strftime("%H:%M:%S %-d/%b/%Y") }}'
|
||||
|
||||
- id: boiler_shower
|
||||
alias: Alert shower time
|
||||
initial_state: true
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.last_shower_duration
|
||||
action:
|
||||
- service: notify.admin_notify
|
||||
data_template:
|
||||
title: Shower finished at {{states.sensor.time.state}}
|
||||
message: "{{ states.sensor.last_shower_duration.state }}"
|
||||
|
||||
12
docs/integrations/homeassistant/binary_sensor.yaml
Normal file
12
docs/integrations/homeassistant/binary_sensor.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
- platform: mqtt
|
||||
name: 'Tap Water'
|
||||
state_topic: 'home/ems-esp/tapwater_active'
|
||||
payload_on: "1"
|
||||
payload_off: "0"
|
||||
|
||||
- platform: mqtt
|
||||
name: 'Heating'
|
||||
state_topic: 'home/ems-esp/heating_active'
|
||||
payload_on: "1"
|
||||
payload_off: "0"
|
||||
|
||||
41
docs/integrations/homeassistant/climate.yaml
Normal file
41
docs/integrations/homeassistant/climate.yaml
Normal file
@@ -0,0 +1,41 @@
|
||||
- platform: mqtt
|
||||
name: Thermostat
|
||||
modes:
|
||||
- "auto"
|
||||
- "heat"
|
||||
- "off"
|
||||
|
||||
mode_command_topic: "home/ems-esp/thermostat_cmd_mode1"
|
||||
temperature_command_topic: "home/ems-esp/thermostat_cmd_temp1"
|
||||
|
||||
mode_state_topic: "home/ems-esp/thermostat_data"
|
||||
current_temperature_topic: "home/ems-esp/thermostat_data"
|
||||
temperature_state_topic: "home/ems-esp/thermostat_data"
|
||||
|
||||
mode_state_template: "{% if value_json.hc1.mode in ['manual', 'day'] %} heat {% elif value_json.hc1.mode in ['night', 'off'] %} off {% else %} auto {% endif %}"
|
||||
|
||||
current_temperature_template: "{{ value_json.hc1.currtemp }}"
|
||||
temperature_state_template: "{{ value_json.hc1.seltemp }}"
|
||||
|
||||
temp_step: 0.5
|
||||
|
||||
- platform: mqtt
|
||||
name: boiler
|
||||
modes:
|
||||
- "auto"
|
||||
- "off"
|
||||
min_temp: 40
|
||||
max_temp: 60
|
||||
temp_step: 1
|
||||
|
||||
current_temperature_topic: "home/ems-esp/boiler_data"
|
||||
temperature_state_topic: "home/ems-esp/boiler_data"
|
||||
mode_state_topic: "home/ems-esp/boiler_data"
|
||||
|
||||
current_temperature_template: "{{ value_json.wWCurTmp }}"
|
||||
temperature_state_template: "{{ value_json.wWSelTemp }}"
|
||||
mode_state_template: "{% if value_json.wWActivated == 'off' %} off {% else %} auto {% endif %}"
|
||||
|
||||
temperature_command_topic: "home/ems-esp/boiler_cmd_wwtemp"
|
||||
mode_command_topic: "home/ems-esp/boiler_cmd_wwactivated"
|
||||
|
||||
12
docs/integrations/homeassistant/customize.yaml
Normal file
12
docs/integrations/homeassistant/customize.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
sensor.boiler_boottime:
|
||||
friendly_name: Controller last restart
|
||||
icon: mdi:clock-start
|
||||
|
||||
sensor.showertime_time:
|
||||
friendly_name: 'Last shower at'
|
||||
icon: mdi:timelapse
|
||||
|
||||
sensor.boiler_updated:
|
||||
friendly_name: 'Data last received'
|
||||
icon: mdi:clock-start
|
||||
|
||||
22
docs/integrations/homeassistant/ha.md
Normal file
22
docs/integrations/homeassistant/ha.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Home Assistant Files
|
||||
|
||||
* <a href="integrations/homeassistant/automation.yaml">automation.yaml</a>
|
||||
* <a href="integrations/homeassistant/binary_sensor.yaml">binary_sensor.yaml</a>
|
||||
* <a href="integrations/homeassistant/climate.yaml">climate.yaml</a>
|
||||
* <a href="integrations/homeassistant/customize.yaml">customize.yaml</a>
|
||||
* <a href="integrations/homeassistant/notify.yaml">notify.yaml</a>
|
||||
* <a href="integrations/homeassistant/script.yaml">script.yaml</a>
|
||||
* <a href="integrations/homeassistant/sensor.yaml">sensor.yaml</a>
|
||||
* <a href="integrations/homeassistant/switch.yaml">switch.yaml</a>
|
||||
* <a href="integrations/homeassistant/ui-lovelace.yaml">ui-lovelace.yaml</a>
|
||||
|
||||
Make sure you include these YAML files in your `configuration.yaml` file, e.g.
|
||||
```yaml
|
||||
script: !include script.yaml
|
||||
sensor: !include sensor.yaml
|
||||
switch: !include switch.yaml
|
||||
notify: !include notify.yaml
|
||||
climate: !include climate.yaml
|
||||
automation: !include automation.yaml
|
||||
binary_sensor: !include binary_sensor.yaml
|
||||
```
|
||||
16
docs/integrations/homeassistant/notify.yaml
Normal file
16
docs/integrations/homeassistant/notify.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
- name: pushover
|
||||
platform: pushover
|
||||
api_key: !secret pushover_api_key
|
||||
user_key: !secret pushover_user_key
|
||||
|
||||
- name: general_notify
|
||||
platform: group
|
||||
services:
|
||||
- service: ios_pauls_iphone
|
||||
- service: pushover
|
||||
|
||||
- name: admin_notify
|
||||
platform: group
|
||||
services:
|
||||
- service: ios_pauls_iphone
|
||||
- service: pushover
|
||||
8
docs/integrations/homeassistant/script.yaml
Normal file
8
docs/integrations/homeassistant/script.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
# ems-esp
|
||||
shower_coldshot:
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data_template:
|
||||
topic: 'home/ems-esp/generic_cmd'
|
||||
payload: '{cmd:"coldshot"}'
|
||||
|
||||
146
docs/integrations/homeassistant/sensor.yaml
Normal file
146
docs/integrations/homeassistant/sensor.yaml
Normal file
@@ -0,0 +1,146 @@
|
||||
|
||||
# thermostat HC1
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/thermostat_data'
|
||||
name: 'Current Room Temperature'
|
||||
unit_of_measurement: '°C'
|
||||
value_template: "{{ value_json.hc1.currtemp }}"
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/thermostat_data'
|
||||
name: 'Current Set Temperature'
|
||||
unit_of_measurement: '°C'
|
||||
value_template: "{{ value_json.hc1.seltemp }}"
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/thermostat_data'
|
||||
name: 'Current Mode'
|
||||
value_template: "{{ value_json.hc1.mode }}"
|
||||
|
||||
# boiler
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/boiler_data'
|
||||
name: 'Warm Water selected temperature'
|
||||
unit_of_measurement: '°C'
|
||||
value_template: '{{ value_json.wWSelTemp }}'
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/boiler_data'
|
||||
name: 'Warm Water tapwater flow rate'
|
||||
unit_of_measurement: 'l/min'
|
||||
value_template: '{{ value_json.wWCurFlow }}'
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/boiler_data'
|
||||
name: 'Warm Water current temperature'
|
||||
unit_of_measurement: '°C'
|
||||
value_template: '{{ value_json.wWCurTmp }}'
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/boiler_data'
|
||||
name: 'Warm Water activated'
|
||||
value_template: '{{ value_json.wWActivated }}'
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/boiler_data'
|
||||
name: 'Warm Water 3-way valve'
|
||||
value_template: '{{ value_json.wWHeat }}'
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/boiler_data'
|
||||
name: 'Current flow temperature'
|
||||
unit_of_measurement: '°C'
|
||||
value_template: '{{ value_json.curFlowTemp }}'
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/boiler_data'
|
||||
name: 'Return temperature'
|
||||
unit_of_measurement: '°C'
|
||||
value_template: '{{ value_json.retTemp }}'
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/boiler_data'
|
||||
name: 'Gas'
|
||||
value_template: '{{ value_json.burnGas }}'
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/boiler_data'
|
||||
name: 'Boiler pump'
|
||||
value_template: '{{ value_json.heatPmp }}'
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/boiler_data'
|
||||
name: 'Fan'
|
||||
value_template: '{{ value_json.fanWork }}'
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/boiler_data'
|
||||
name: 'Ignition'
|
||||
value_template: '{{ value_json.ignWork }}'
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/boiler_data'
|
||||
name: 'Circulation pump'
|
||||
value_template: '{{ value_json.wWCirc }}'
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/boiler_data'
|
||||
name: 'Burner max power'
|
||||
unit_of_measurement: '%'
|
||||
value_template: '{{ value_json.selBurnPow }}'
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/boiler_data'
|
||||
name: 'Burner max power'
|
||||
unit_of_measurement: '%'
|
||||
value_template: '{{ value_json.selBurnPow }}'
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/boiler_data'
|
||||
name: 'Burner current power'
|
||||
unit_of_measurement: '%'
|
||||
value_template: '{{ value_json.curBurnPow }}'
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/boiler_data'
|
||||
name: 'System Pressure'
|
||||
unit_of_measurement: 'bar'
|
||||
value_template: '{{ value_json.sysPress }}'
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/boiler_data'
|
||||
name: 'Boiler temperature'
|
||||
unit_of_measurement: '°C'
|
||||
value_template: '{{ value_json.boilTemp }}'
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/boiler_data'
|
||||
name: 'Pump modulation'
|
||||
unit_of_measurement: '%'
|
||||
value_template: '{{ value_json.pumpMod }}'
|
||||
|
||||
# shower time duration
|
||||
|
||||
- platform: mqtt
|
||||
name: 'Last shower duration'
|
||||
state_topic: "home/ems-esp/shower_data"
|
||||
value_template: "{{ value_json.duration | is_defined }}"
|
||||
|
||||
- platform: template
|
||||
sensors:
|
||||
showertime_time:
|
||||
value_template: '{{ as_timestamp(states.sensor.last_shower_duration.last_updated) | int | timestamp_custom("%-I:%M on %a %-d %b") }}'
|
||||
|
||||
boiler_updated:
|
||||
value_template: '{{ as_timestamp(states.sensor.boiler_temperature.last_updated) | timestamp_custom("%H:%M on %d/%b") }}'
|
||||
|
||||
boiler_boottime:
|
||||
value_template: '{{ as_timestamp(states.automation.see_if_boiler_restarts.attributes.last_triggered) | timestamp_custom("%H:%M:%S %d/%m/%y") }}'
|
||||
|
||||
# general
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/status'
|
||||
name: 'ems-esp status'
|
||||
20
docs/integrations/homeassistant/switch.yaml
Normal file
20
docs/integrations/homeassistant/switch.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
# EMS-ESP
|
||||
- platform: mqtt
|
||||
name: "Shower Timer"
|
||||
state_topic: "home/ems-esp/shower_data"
|
||||
value_template: "{{ value_json.timer }}"
|
||||
command_topic: "home/ems-esp/shower_data"
|
||||
payload_on: '{"timer":"1"}'
|
||||
payload_off: '{"timer":"0"}'
|
||||
state_on: "1"
|
||||
state_off: "0"
|
||||
|
||||
- platform: mqtt
|
||||
name: "Long Shower Alert"
|
||||
state_topic: "home/ems-esp/shower_data"
|
||||
value_template: "{{ value_json.alert }}"
|
||||
command_topic: "home/ems-esp/shower_data"
|
||||
payload_on: '{"alert":"1"}'
|
||||
payload_off: '{"alert":"0"}'
|
||||
state_on: "1"
|
||||
state_off: "0"
|
||||
75
docs/integrations/homeassistant/ui-lovelace.yaml
Normal file
75
docs/integrations/homeassistant/ui-lovelace.yaml
Normal file
@@ -0,0 +1,75 @@
|
||||
- id: ems-esp_id0
|
||||
title: Heating
|
||||
cards:
|
||||
- id: ems-esp_id1
|
||||
type: glance
|
||||
entities:
|
||||
- entity: binary_sensor.tap_water
|
||||
icon: mdi:fire
|
||||
- entity: binary_sensor.heating
|
||||
icon: mdi:radiator
|
||||
- id: ems-esp_id2
|
||||
type: entities
|
||||
title: Boiler
|
||||
show_header_toggle: false
|
||||
entities:
|
||||
- sensor.boiler_boottime
|
||||
- sensor.boiler_updated
|
||||
- sensor.ems_esp_status
|
||||
- type: divider
|
||||
- sensor.warm_water_selected_temperature
|
||||
- sensor.warm_water_current_temperature
|
||||
- sensor.warm_water_activated
|
||||
- sensor.warm_water_3_way_valve
|
||||
- type: divider
|
||||
- sensor.boiler_temperature
|
||||
- sensor.return_temperature
|
||||
- sensor.current_flow_temperature
|
||||
- sensor.pump_modulation
|
||||
- sensor.ignition
|
||||
- sensor.gas
|
||||
- sensor.fan
|
||||
- sensor.boiler_pump
|
||||
- sensor.system_pressure
|
||||
- sensor.burner_max_power
|
||||
- sensor.burner_current_power
|
||||
|
||||
- id: ems-esp_id3
|
||||
type: vertical-stack
|
||||
cards:
|
||||
- type: entities
|
||||
title: Shower Monitor
|
||||
show_header_toggle: false
|
||||
entities:
|
||||
- switch.shower_timer
|
||||
- switch.long_shower_alert
|
||||
- type: divider
|
||||
- sensor.last_shower_duration
|
||||
- sensor.showertime_time
|
||||
- type: entity-button
|
||||
icon: mdi:shower-head
|
||||
name: send a cold shot of shower water
|
||||
entity: script.shower_coldshot
|
||||
tap_action:
|
||||
action: call-service
|
||||
service: script.turn_on
|
||||
service_data:
|
||||
entity_id: script.shower_coldshot
|
||||
|
||||
- type: history-graph
|
||||
entities:
|
||||
- sensor.ems_esp_wifi
|
||||
- sensor.ems_esp_freemem
|
||||
|
||||
- id: ems-esp_id4
|
||||
type: vertical-stack
|
||||
cards:
|
||||
- type: history-graph
|
||||
entities:
|
||||
- sensor.pc_room_sensor_temperature
|
||||
- sensor.current_room_temperature
|
||||
- sensor.dark_sky_temperature
|
||||
- type: thermostat
|
||||
entity: climate.thermostat
|
||||
- type: thermostat
|
||||
entity: climate.boiler
|
||||
Reference in New Issue
Block a user