Files
EMS-ESP32/doc/home assistant/automation.yaml
2019-10-14 18:16:31 +02:00

32 lines
764 B
YAML

- id: boiler_shower
alias: Alert shower time
trigger:
platform: mqtt
topic: home/ems-esp/showertime
action:
- service: notify.general_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
alias: See if ems-esp restarts
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") }}