Just checking - I’m an automation newbie.
All I want is to turn on a device when a time is met - then turn off after two hours.
does the following yaml work?
alias: ozone generator
description: ""
trigger:
- platform: time
at: "12:00:00"
condition: []
action:
- service: switch.turn_on
data: {}
target:
entity_id: switch.sonoff_10017274a8_1
- delay:
hours: 2
minutes: 0
seconds: 0
milliseconds: 0
- service: switch.turn_off
data: {}
target:
entity_id: switch.sonoff_10017274a8_1
mode: single