I’ve grouped my switches, lights and media_player in groups which represent rooms. When I call the service homeassistant.turn_off on a group which includes lights and a media_player, the lights are turned off but the media_player isn’t.
I would’ve expected that the media_player is turned off too. When I call the service on the media_player directly it works.
Is there a reason why calling homeassistant.turn_off on a group doesn’t call turn_off on all included entities?
What media player is it? homeassistant.turn_off attempts to call any domains turn_off service on the entity in question, if the service doesn’t exist, it will fail. I would wager that this is an issue with the specific media_player you have integrated. If that’s the case, you’d need to raise an issue with the media player to properly register for the service or have it be included with the supported features.
thank you for your answer! After checking the configuration file again, I found the error. It was a typo . The media_player is from the “Logitech Squeezebox” integration and the player is called “Küche” (‘kitchen’ in english). I thought the entity is named “media_player.kueche”, which is how “Küche” is spelled when you can’t use umlauts. But the entity is called “media_player.kuche”, that’s why it didn’t work.
Sorry for wasting your time, but maybe you could help me with another question:
When the media_player is “on” (and is playing music), the state of the group is still “off”. Is there a way to configure the group that its state is “on” when the media_player’s state is “on”?
Look at your group config.
A group can either be “on” when all devices are “on” or it can be “on” when at least one device is “on”. This is set in the group definition.
Yes, that’s the “issue”. It will only show “on”, if at least one device of the group is in state “on”, but as you noticed, media_players don’t have a state “on”.