This is probably my favourite automation to date!
The time on my microwave is never correct. For various reasons it is fairly regularly power cycled and in doing so the time is reset to 1am. The controls to set the time are horrendous and so I just don’t bother.
I was walking past it yesterday and thought “I wish we just had a power cut at 1am every day…wait a minute, I can do that!”.
We’d just taken down the Christmas tree so I handily had a spare RF plug avaiable. A quick automation later…
- alias: microwave_reset
initial_state: true
trigger:
platform: time
at: '00:59:45'
action:
- service: switch.turn_off
entity_id: switch.microwave
- delay:
seconds: 15
- service: switch.turn_on
entity_id: switch.microwave
And now every night, 15 seconds before 1am the microwave is turned off, then 15 seconds later it’s turned back on again. Now the time on the microwave is basically synced with a time server every night and even adjusts for daylight savings .