123
(Taras)
27
- Using the Automation Editor, create a new, empty automation.
- In the upper right hand corner of the Automation Editor, click the “kebab icon” (three vertical dots) and select Edit in YAML.
- Delete whatever appears in the editing window.
- Copy the following automation and paste it into the editing window.
alias: Nexa lamp controller
trigger:
- id: 'on'
platform: time
at: 19:00:00
- id: 'off'
platform: time
at: 23:00:00
condition:
- condition: time
before: "00:00:00"
after: "19:00:00"
weekday:
- mon
- tue
- wed
- thu
- fri
action:
- service: 'switch.turn_{{ trigger.id }}'
target:
entity_id: switch.oo_5
- Click the Save button and then click the Rename button.
- Click the “kebab icon” again and select Edit in Visual Editor.
- Your automation is now displayed in visual mode and has been saved and is functional.