Hello everyone.
I am new to HA and though searching through related posts and reviewing user configurations in the cookbook i couldn’t find an answer so far.
For the setting i’ trying to implement right now: i do have an Chromecast Audio device up and and running and it integrates nicely with HA. The Device should run in my Kitchen. I am not there the whole day (yup, normally i do not work at home) i’d like to power my device of. It should not run (and stream) the whole day. To also be approved by my girlfriend it should turn on and automatically start a radio stream of my choice, just like the old device did. i don’t want to turn on the device and then have to actively tell it to stream, wether with my cellphone or tablet or some computer here. No it should start the stream intself.
Since Google did not implement any autostart or resume function the idea was to do it via a homeautomation software.
Up to now i was able to build a trigger that starts a stream, when the device gets the state ‘off’.
automation:
- alias: Starte Radio Stream, wenn Chromecast Audio eingeschaltet wird
trigger:
platform: state
entity_id: media_player.kuche_chromecast_audio
state: 'off'
action:
service: media_player.play_media
data:
entity_id: media_player.kuche_chromecast_audio
media_content_id: http://mp3channels.webradio.rockantenne.de/heavy-metal
media_content_type: audio/mp3`
If the HA Server is freshly fired up this works nicely. But when i am powering of my GCA HA seems to have problems recognizing the new state or whatever and just reports GCA beeing playing…
Is there anyway to check for GCA beeing ‘online’ for let’s say every 20 seconds and then updating the status? Or am i seeing this from a totally wrong dierection here?
So thanks