Files
EMS-ESP32/doc/home assistant/automation.yaml
2019-10-15 18:26:58 +02:00

33 lines
775 B
YAML

- id: boiler_shower
alias: Alert shower time
initial_state: true
trigger:
platform: mqtt
topic: home/ems-esp/shower_data
action:
- 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
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") }}