How would I write an automation that periodically checks the status of a Media Player, and if it is not playing, ‘press play’ (actually, load a playlist, shuffle, skip and play, but I got that part)
Background
I have a ROON setup with the integration to HASS and works well. media players, and states are known.
I took a RoPieee and feed it to my Clock Radio in the bedroom to stream music at bedtime for 90 minutes. To the RoPiee it is streaming 100% of the time, the clock radio does the on off via it’s sleep timer on the AUX port.
The DEVICE is scene and shows
- PLAYING
- PAUSED
- UNAVAILABLE
I trying to think of the Automation logic that is
If NOT PLAYING, then PLAY, WAIT, REPEAT
The idea is if the ROON Server goes away, or there is a power bump, play list is exhausted, or anything, I just want the RoPieee to (when available) start playing again (idiot proof the setup).
How would you approach this?