I have the following automation to schedule poweron/off a smart plug during the day.
alias: Smart plug Scheduler
description: Turns on/off smart plug during the day
trigger:
- platform: time
at: "00:00:00"
id: 12 AM
- platform: time
at: "06:00:00"
id: 6 AM
- platform: time
at: "12:00:00"
id: 12 PM
- platform: time
at: "18:00:00"
id: 6 PM
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: 12 AM
sequence:
- type: turn_off
device_id: 397321b5b075866bc7c365f9d04dd1e4
entity_id: switch.air_purifier
domain: switch
- conditions:
- condition: trigger
id: 6 AM
sequence:
- type: turn_on
device_id: 397321b5b075866bc7c365f9d04dd1e4
entity_id: switch.air_purifier
domain: switch
- conditions:
- condition: trigger
id: 12 PM
sequence:
- type: turn_off
device_id: 397321b5b075866bc7c365f9d04dd1e4
entity_id: switch.air_purifier
domain: switch
- conditions: []
sequence: []
- conditions:
- condition: trigger
id: 6 PM
sequence:
- type: turn_on
device_id: 397321b5b075866bc7c365f9d04dd1e4
entity_id: switch.air_purifier
domain: switch
mode: single
The conditions for 6 am and 12 pm work except 6 pm. 12 am doesn’t trigger because 6 pm never powered on. Is there something I am missing here to ensure that 6 pm powers the smart plug back on?
Thank you!