From f02495713b5b8cfdc9c2169812c602ee69e19e25 Mon Sep 17 00:00:00 2001 From: DubhAd Date: Fri, 4 May 2018 08:19:02 +0100 Subject: [PATCH] Re-ordered the automation blocks (#5305) The automations were as the editor produces them, so not logically ordered or clear to read. I've re-written them to match the rest of the documentation. --- source/_components/timer.markdown | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) 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 %}