HI, what im trying to get my head around is the following
I want to use Chromecast Audio to cast to a group I have set up under the Home APP called “downstairs”, this is made up of 3 different rooms each with a Chromecast audio connected to a stereo, can HA see that I have initiated the group cast and trigger an activity on a say an Logitech hub (or equivilent) to turn those devices on, or is there anothe way I can do it ?
This is absolutely possible. I set this up myself a couple of weeks ago and I’m loving it.
Funnily enough, my group is also called downstairs. When the Chromecast audio changes state to ‘playing’, HA switches on the switch powering the speakers.
I’m not at home at present, but here’s another example using media player states to trigger automations.
So, here’s my code. This sits in my automation.yaml file:
- alias: "Chomecast Audio playing"
trigger:
- platform: state
entity_id: media_player.downstairs
to: 'playing'
from: 'idle'
- platform: state
entity_id: media_player.downstairs
to: 'playing'
from: 'off'
condition:
condition: state
entity_id: switch.ccaudio_speaker_power
state: 'off'
action:
service: switch.turn_on
entity_id: switch.ccaudio_speaker_power
Things I learned along the way - every time a song stopped and went to the next one, the media_player entity changed state from playing to idle (I think), and would fire off the automation again. So I had to put in a condition to only fire it up if it was off.
Out of interest what IR blaster are you using, I was intersted by these - https://sewelldirect.com/blastir-wireless-multizone as they work with my harmony, but they dont seem easily available outside the US
I’m actually using Xiaomi zigbee power adapters, which I use HA to switch on when the speakers need power.
I do have a Harmony setup at home, but haven’t actually integrated it into HASS. You’d just have to modify the action component of my automation above to suit your setup.