B5r1oJ0A9G / teufel_raumfeld

Integration for Teufel smart speaker (aka Raumfeld Multiroom) into https://www.home-assistant.io/.
GNU General Public License v3.0
30 stars 6 forks source link

set_power_state Service is not available anymore #53

Closed blackmore190 closed 10 months ago

blackmore190 commented 11 months ago

Hi,

I'm happy that you're active again. Nice that the Raumfeld integration lives again!

I noticed, that the set_power_state service is not available anymore. Is this ment to be, or is it a bug?

Thanks for your help!

blackmore190 commented 11 months ago

oops, I found the answer by myself: https://github.com/B5r1oJ0A9G/teufel_raumfeld/commit/95eaddd483ed0e3dc17e85e16897f4574e7fcbb0

is it possible to set power state without this service?

B5r1oJ0A9G commented 11 months ago

Hi!

Your observation is correct and it is by design. The service interface in Home Assisstant currently does not allow to restrict services for entities with certain criteria. Since power states should only be set at speaker level or, with respect to teufel_raumfeld, at room level, this did not seem to make sense. Remember that rooms and groups are technically all media_player entities and differ only in the naming for Home Assistant. Therefore, this function is now implemented as a separate entity. See Power state (Wiki).

If you find any limitations with the new implementation, please let me know.

ThePitaGyros commented 10 months ago

Hello Marc,

I have a question regarding the power state: How to I manually set the power state in an automation / script now that the service was removed?

I find the corresponding entity "select.room_myroom_myspeaker_powerstate" and can switch the power state manually in the entity view, but how can I address this entity in an automation?

Maybe you (or someone out there 😄) can help. Best regards and thank you for this great integration! Pita.

ThePitaGyros commented 10 months ago

Hello Marc,

I have a question regarding the power state: How to I manually set the power state in an automation / script now that the service was removed?

I find the corresponding entity "select.room_myroom_myspeaker_powerstate" and can switch the power state manually in the entity view, but how can I address this entity in an automation?

Maybe you (or someone out there 😄) can help. Best regards and thank you for this great integration! Pita.

And found the answer myself too 🤣. Here it is, if someone else is looking for the new way to set the power state...

https://www.home-assistant.io/integrations/select/#service-selectselect_option

service: select.select_option
target: 
  entity_id: select.room_myroom_myspeaker_powerstate
data:
  option: "on"
B5r1oJ0A9G commented 10 months ago

How to set the powerstate via a script is now documented in the Wiki.