Files
EMS-ESP32/doc/home assistant/automation.yaml
2019-09-19 22:54:11 +02:00

44 lines
1.0 KiB
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}}'
- id: boiler_shower_alarm
alias: Alert shower too long
trigger:
platform: mqtt
topic: home/ems-esp/command
payload: 'shower_alarm'
action:
- service: notify.admin_notify
data_template:
title: "Shower Alert!"
message: "Shower time exceeded limit"
# 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") }}