mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
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.
This commit is contained in:
parent
334a06b4d6
commit
f02495713b
@ -107,30 +107,29 @@ timer:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Example automations.yaml entry
|
# Example automations.yaml entry
|
||||||
- action:
|
- alias: Timerswitch
|
||||||
- service: timer.start
|
|
||||||
entity_id: timer.test
|
|
||||||
alias: Timerswitch
|
|
||||||
id: 'Timerstart'
|
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:
|
trigger:
|
||||||
platform: state
|
- platform: state
|
||||||
entity_id: switch.pumprun
|
entity_id: switch.pumprun
|
||||||
to: 'on'
|
to: 'on'
|
||||||
|
action:
|
||||||
|
- service: timer.start
|
||||||
|
entity_id: timer.test
|
||||||
|
|
||||||
# When timer is stopped, the time run out, another message is sent
|
# When timer is stopped, the time run out, another message is sent
|
||||||
- action:
|
- alias: Timerstop
|
||||||
- service: notify.nma
|
|
||||||
data:
|
|
||||||
message: "Timer stop"
|
|
||||||
alias: Timerstop
|
|
||||||
id: 'Timerstop'
|
id: 'Timerstop'
|
||||||
trigger:
|
trigger:
|
||||||
platform: event
|
- platform: event
|
||||||
event_type: timer.finished
|
event_type: timer.finished
|
||||||
event_data:
|
event_data:
|
||||||
entity_id: timer.test
|
entity_id: timer.test
|
||||||
|
action:
|
||||||
|
- service: notify.nma
|
||||||
|
data:
|
||||||
|
message: "Timer stop"
|
||||||
```
|
```
|
||||||
|
|
||||||
### {% linkable_title Control a timer from the frontend %}
|
### {% linkable_title Control a timer from the frontend %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user