mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
fix HA shower time
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
- id: boiler_shower
|
||||
alias: Alert shower time
|
||||
initial_state: true
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: home/ems-esp/showertime
|
||||
topic: home/ems-esp/shower_data
|
||||
action:
|
||||
- service: notify.general_notify
|
||||
data_template:
|
||||
title: "Shower finished at {{states.sensor.time.state}}"
|
||||
message: "{{ trigger.payload_json['duration'] }}"
|
||||
- service: notify.admin_notify
|
||||
data_template:
|
||||
title: Shower finished at {{states.sensor.time.state}}
|
||||
message: "{{ trigger.payload_json['duration'] }}"
|
||||
|
||||
# when ems-esp starts send boottime
|
||||
- id: boiler_restart
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
# thermostat HC1
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/thermostat_data'
|
||||
name: 'Current Room Temperature'
|
||||
@@ -15,16 +18,7 @@
|
||||
name: 'Current Mode'
|
||||
value_template: "{{ value_json.hc1.mode }}"
|
||||
|
||||
# last time esp-esp was started
|
||||
- platform: template
|
||||
sensors:
|
||||
boiler_boottime:
|
||||
value_template: '{{ as_timestamp(states.automation.see_if_boiler_restarts.attributes.last_triggered) | timestamp_custom("%H:%M:%S %d/%m/%y") }}'
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/showertime'
|
||||
name: 'Last shower duration'
|
||||
force_update: true
|
||||
# boiler
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: 'home/ems-esp/boiler_data'
|
||||
@@ -137,6 +131,13 @@
|
||||
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 }}"
|
||||
force_update: true
|
||||
|
||||
- platform: template
|
||||
sensors:
|
||||
showertime_time:
|
||||
@@ -145,5 +146,5 @@
|
||||
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") }}'
|
||||
|
||||
Reference in New Issue
Block a user