#is_volume_muted template not evaluated? (universal media player)

1 messages · Page 1 of 1 (latest)

woven basin
#

Hi!
I'm fairly new to HA and am trying to set up a universal media player to group my Sonos players into one media player.
I got it working nicely, with the exception of the is_volume_muted attribute of the new player.
The mute function will mute both sonos players, but the is_volume_muted attribute of the the universal medial player is not updated for some reason.
I tested the template first in the template editor and then added it as a sensor => works as expected in both cases.

    sensor:
      - platform: template
        sensors:
          sonos_muted:
            value_template: >
              {{ (state_attr('media_player.wohnzimmer','is_volume_muted')
              and state_attr('media_player.esszimmer','is_volume_muted')) }}
#

However, when I try to add the template to the universal media player's attribute definiton for it's is_volume_muted attribute, the state of the attribute is not evaluated (i.e., stays false, even if both players are muted)

Here's the template in the universal media player definiton I currently have:

      attributes:
         is_volume_muted: > 
           "{{ (state_attr('media_player.wohnzimmer','is_volume_muted') 
            and state_attr('media_player.esszimmer','is_volume_muted')) }}"
      unique_id: sonos_all