Hi everybody,
I have an automation that will run an “alarm clock” at a certain (variable!) time in the morning. The alarm clock is a sonos beam
playing music and an ESPHome
turning on and slowly brightening an LED strip.
Due to me usually waking up before the alarm, I sometimes forget to turn it off manually. When I don’t turn it off, it will eventually trigger, and then the LED will be on until somebody manually turns it off.
So I am hoping to automate this, kinda like this
automation:
- id: "bla"
trigger:
platform: # what goes here?
- delay:
minutes: 30
action:
- service: light.turn_off
entity_id: light.schlafzimmer_bett
This should be triggered as soon as script.wecksong
and/or script.wecklicht
are started; both scripts are started at the very same time, so I could just watch for either of them to be triggered. Then iit should wait 30 minutes, and then turn off the LED. The music will automatically turn off after a couple of minutes (depending on the song / audio file), so there is no need to turn that off via automation.
I just don’t know what platform to use so that it will trigger when I start the script.
Thank you for your help