Is there some way to play media without defining the target device? I’d like the target device entity_id to be resolved at run time based on the Google Assistant room in which the request was made.
I read in the manual some room / area support is possible, but would it work in both directions and can a Google Assistant activated script get the room/area of the request out of the context when activated?
Would be nice to have a script that can be activated via Google Assistant to play music in the room in which the request was made, without having to specify this explicitly in the request.
eg Google Assistant command: ‘Activate Play music’ → resulting in the ‘Play music’ script in HA to be launched. That script should be capable to retrieve the correct room in which the Google Assistant request was made and retrieve the media player(s) available in that room and activate the music only in that room.
Currently I have multiple scripts that I can activate with GA command such as ‘Activate Play music in bathroom’ or ‘Activate Play music in bedroom’ etc. but I’d like to have it smarter.