diff --git a/source/_components/timer.markdown b/source/_components/timer.markdown index 9f28b2ec7ad..eb6db877f36 100644 --- a/source/_components/timer.markdown +++ b/source/_components/timer.markdown @@ -107,30 +107,29 @@ timer: ```yaml # Example automations.yaml entry -- action: - - service: timer.start - entity_id: timer.test - alias: Timerswitch +- alias: Timerswitch id: 'Timerstart' - -# Timer is started when the switch pumprun is set to on. + # Timer is started when the switch pumprun is set to on. trigger: - platform: state + - platform: state entity_id: switch.pumprun to: 'on' + action: + - service: timer.start + entity_id: timer.test # When timer is stopped, the time run out, another message is sent -- action: - - service: notify.nma - data: - message: "Timer stop" - alias: Timerstop +- alias: Timerstop id: 'Timerstop' trigger: - platform: event + - platform: event event_type: timer.finished event_data: entity_id: timer.test + action: + - service: notify.nma + data: + message: "Timer stop" ``` ### {% linkable_title Control a timer from the frontend %}