I try to set up automation that does the following:
When a certain scene for HUE is activated (either through the Hue App or HA) I want to play a certain music. Casting to Chromecast is not a problem, but what is the trigger I need to use. When I trace the commands with dev-tools I get a different ID every time.
You can use Event Triggers to detect when Home Assistant is used to activate a Hue scene. Here’s a simple automation that reports the entity_id of the scene that was activated. There’s more than one way to turn on a scene in Home Assistant so that’s why the automation has two Event Triggers.
When you use the Philips Hue app to turn on a Hue scene, Home Assistant does not detect the scene activation as a special event. It simply detects the state-changes of each light in the scene.
NOTE
The second Event Trigger listens for any scene activation, not just Hue scenes.
Hello,
I just tried to use your (tara’s) code and in result, the automation was triggered in case of activating the scene via Home Assistant Dashboard. But activating the scene via the Hue app on my mobile does not trigger. Also when activation is made by voice command to alexa (which is also going to the hue bridge) it does not trigger the HA automation. I have no clue at the moment, where I could have masde a mistake. Any hints, maybe?