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 abs volume of a room in a group not working #42

Closed JimboJones3101 closed 1 year ago

JimboJones3101 commented 1 year ago

Hi there,

I it's not an bug but I simply cannot figure out how to set the abs volume for a room within a group.

My setup is the following:

image

My script loooks like this:

alias: Raumfeld normal
sequence:
  - service: teufel_raumfeld.abs_volume_set
    data:
      volume_level: 0.2
      entity_id: media_player.group_one_m_one_s
  - service: teufel_raumfeld.abs_volume_set
    data:
      volume_level: 0.3
      rooms: One S
      entity_id: media_player.room_one_s
mode: single

The volume is set to 20%, but the second call is not processed. I tried removing the attribute "rooms", but then the log tells me

_2023-01-12 10:58:38.066 ERROR (MainThread) [homeassistant.components.script.raumfeld_lautstarke_normal] Raumfeld normal: Error executing script. Invalid data for callservice at pos 2: value must be one of ['One M', 'One S'] @ data['rooms'][0]

When i change the attribute to the following

alias: Raumfeld normal
sequence:
  - service: teufel_raumfeld.abs_volume_set
    data:
      volume_level: 0.2
      entity_id: media_player.group_one_m_one_s
  - service: teufel_raumfeld.abs_volume_set
    data:
      volume_level: 0.3
      rooms: 'One S'
      entity_id: media_player.room_one_s
mode: single

I can see the following statement in the logs

_2023-01-12 11:05:02.967 DEBUG (MainThread) [custom_components.teufel_raumfeld] media_player.py->async_set_rooms_volumelevel: Method was called although speaker group '['One S']' is invalid

I assume I'm calling the wrong room, but how can I find out? Any suggestions of how to continue? I can always change the volume of a group but not of a room.... :(

JimboJones3101 commented 1 year ago

Yeah, I figured out the issue!

For anybody suffering from the same topic:

You need to mention the specific room, but direct the servicecall to the group itself.

Instead of the above mentioned the correct way for this script is the following:

alias: Raumfeld normal
sequence:
  - service: teufel_raumfeld.abs_volume_set
    data:
      volume_level: 0.2
      entity_id: media_player.group_one_m_one_s
  - service: teufel_raumfeld.abs_volume_set
    data:
      volume_level: 0.3
      rooms: One S
      entity_id: media_player.group_one_m_one_s
mode: single