This seems so simple, yet even following many threads still stuck on automation to accomplish:
1, Turn on switch1 at 06:00:00
2. Turn off switch1 at 23:00:00
3. Activate on home assistant restart.
The following not working to accomplish this:
alias: Grow_light_Switch
description: ""
trigger:
- platform: time
at: "06:00:00"
id: morning
- platform: time
at: "22:00:00"
id: evening
- platform: homeassistant
event: start
condition: []
action:
- if:
- condition: time
after: "06:00:00"
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
before: "23:00:00"
then:
- service: switch.turn_on
data: {}
target:
entity_id: switch.0x70b3d52b60016c87_l1
- if:
- condition: time
after: "23:00:00"
before: "06:00:00"
weekday:
- sun
- sat
- fri
- thu
- wed
- tue
- mon
then:
- service: switch.turn_off
data: {}
target:
entity_id: switch.0x70b3d52b60016c87_l1
mode: single
Thank you.