Controlling a Denon AVR

Does anyone have it done to read the mute status with the HA Configuration?

If I view Developer tools → Current entity states → media_player.denon_avc_x3700h → State attributes (YAML, optional)
Mute state is always “is_volume_muted: false”

Otherwise I must make a sensor (every 10 seconds and, run the script if press te button)


  - scan_interval: 10
    resource: http://<IP-ADDRESS>:8080/goform/formZone2_Zone2XmlStatusLite.xml
    sensor:
      - name: "AVR_zone2_volume"
        value_template: "{{ value_json.item.MasterVolume.value }}"
      - name: "AVR_zone2_power"
        value_template: "{{ value_json.item.Power.value }}"
      - name: "AVR_zone2_mute"
        value_template: "{{ value_json.item.Mute.value }}"

response from formZone2_Zone2XmlStatusLite.xml:

<?xml version="1.0" encoding="utf-8" ?>
<item>
<Power><value>ON</value></Power>
<MasterVolume><value>-48</value></MasterVolume>
<Mute><value>off</value></Mute>
</item>

Hi,
I am new to Home Assistant and also have a Denon Reciever.
Thank you for this nice application to control the Denon. I managed to create the Custom button card.
However, when I want to save the script I get the following message:
Message malformed: extra keys not allowed @ data[‘denon_mute_unmute’]

The standard controls (volume, device) now work well, but because I cannot save the scripts I cannot call them.

This is an old post, so it is possible that there have been adjustments in Home Assistant over time, which means that saving the scripts is no longer possible.

Please post that script here.

# Denon AVR - Mute OR Unmute sound (toggle)
  service: adenon_mute_unmute:
    description: Toggle Denon Mute/Unmute status
    sequence:
      - choose:
        # IF Denon is currently MUTED, then unmute
        - conditions: "{{ state_attr('media_player.office_2', 'is_volume_muted') }}"
          sequence:
            - service: denonavr.get_command
              data:
                entity_id: media_player.office_2
                command: /goform/formiPhoneAppDirect.xml?MUOFF
        # IF Denon is currently UNMUTED, then mute (Note: few seconds delay in state update after change)
        default:
          - service: denonavr.get_command
            data:
              entity_id: media_player.office_2
              command: /goform/formiPhoneAppDirect.xml?MUON

  # Denon AVR - Increase the volume by nr of steps provided by parameter
  denon_vol_increase:
    description: Increase Denon volume by specified nr of steps
    fields: 
      stepcount:
        description: Number of UP steps
    variables:
      stepcount: "{{ stepcount | default(2) }}"
    sequence:
      - repeat:
          count: "{{ stepcount }}"
          sequence:
            - delay: 0.1
            - service: denonavr.get_command
              data:
                entity_id: media_player.office_2
                command: /goform/formiPhoneAppDirect.xml?MVUP


  # Denon AVR - Decrease the volume by nr of steps provided by parameter
  denon_vol_decrease:
    description: Decrease Denon volume by specified nr of steps
    fields: 
      stepcount:
        description: Number of DOWN steps
    variables:
      stepcount: "{{ stepcount | default(2) }}"
    sequence:
      - repeat:
          count: "{{ stepcount }}"
          sequence:
            - delay: 0.1
            - service: denonavr.get_command
              data:
                entity_id: media_player.office_2
                command: /goform/formiPhoneAppDirect.xml?MVDOWN

  # Denon AVR - Favorites + nr of steps down
  denon_favorite_station:
    description: Denon Favorite Station
    fields: 
      stepcount:
        description: Number of DOWN steps
    variables:
      stepcount: "{{ stepcount | default(0) }}"
    sequence:
      - service: denonavr.get_command
        data:
          entity_id: media_player.office_2
          command: /goform/formiPhoneAppDirect.xml?SIFAVORITES
      - delay: 2.5
      - repeat:
          count: "{{ stepcount }}"
          sequence:
            - delay: 0.3
            - service: denonavr.get_command
              data:
                entity_id: media_player.office_2
                command: /goform/formiPhoneAppDirect.xml?MNCDN
      - delay: 1.5
      - service: denonavr.get_command
        data:
          entity_id: media_player.office_2
          command: /goform/formiPhoneAppDirect.xml?MNENT

Yoy copy/pasted wrongly.

As for # Denon AVR - Mute OR Unmute sound (toggle) change to:

# Denon AVR - Mute OR Unmute sound (toggle)
  denon_mute_unmute:
    description: Toggle Denon Mute/Unmute status
    sequence:
# Denon AVR - Mute OR Unmute sound (toggle)
  denon_mute_unmute:
    description: Toggle Denon Mute/Unmute status
    sequence:
      - choose:
        # IF Denon is currently MUTED, then unmute
        - conditions: "{{ state_attr('media_player.office_2', 'is_volume_muted') }}"
          sequence:
            - service: denonavr.get_command
              data:
                entity_id: media_player.office_2
                command: /goform/formiPhoneAppDirect.xml?MUOFF
        # IF Denon is currently UNMUTED, then mute (Note: few seconds delay in state update after change)
        default:
          - service: denonavr.get_command
            data:
              entity_id: media_player.office_2
              command: /goform/formiPhoneAppDirect.xml?MUON

  # Denon AVR - Increase the volume by nr of steps provided by parameter
  denon_vol_increase:
    description: Increase Denon volume by specified nr of steps
    fields: 
      stepcount:
        description: Number of UP steps
    variables:
      stepcount: "{{ stepcount | default(2) }}"
    sequence:
      - repeat:
          count: "{{ stepcount }}"
          sequence:
            - delay: 0.1
            - service: denonavr.get_command
              data:
                entity_id: media_player.office_2
                command: /goform/formiPhoneAppDirect.xml?MVUP


  # Denon AVR - Decrease the volume by nr of steps provided by parameter
  denon_vol_decrease:
    description: Decrease Denon volume by specified nr of steps
    fields: 
      stepcount:
        description: Number of DOWN steps
    variables:
      stepcount: "{{ stepcount | default(2) }}"
    sequence:
      - repeat:
          count: "{{ stepcount }}"
          sequence:
            - delay: 0.1
            - service: denonavr.get_command
              data:
                entity_id: media_player.office_2
                command: /goform/formiPhoneAppDirect.xml?MVDOWN

  # Denon AVR - Favorites + nr of steps down
  denon_favorite_station:
    description: Denon Favorite Station
    fields: 
      stepcount:
        description: Number of DOWN steps
    variables:
      stepcount: "{{ stepcount | default(0) }}"
    sequence:
      - service: denonavr.get_command
        data:
          entity_id: media_player.office_2
          command: /goform/formiPhoneAppDirect.xml?SIFAVORITES
      - delay: 2.5
      - repeat:
          count: "{{ stepcount }}"
          sequence:
            - delay: 0.3
            - service: denonavr.get_command
              data:
                entity_id: media_player.office_2
                command: /goform/formiPhoneAppDirect.xml?MNCDN
      - delay: 1.5
      - service: denonavr.get_command
        data:
          entity_id: media_player.office_2
          command: /goform/formiPhoneAppDirect.xml?MNENT

Exactly the same error message?

Which Denon Receiver do you have? Check the available attributes through

Developer Tools → States → media_player.office_2

and post the results here.

Also please make sure your Denon Receiver is listed HERE.

Ik have a Denon DRA-900H and it’s not listed here :frowning:
But i can use volume and aux selection.

:point_up: :thinking:

Wondering because the below yaml-code is valid:

# Denon AVR - Mute OR Unmute sound (toggle)
  denon_mute_unmute:
    description: Toggle Denon Mute/Unmute status
    sequence:
      - choose:
        # IF Denon is currently MUTED, then unmute
        - conditions: "{{ state_attr('media_player.office_2', 'is_volume_muted') }}"
          sequence:
            - service: denonavr.get_command
              data:
                entity_id: media_player.office_2
                command: /goform/formiPhoneAppDirect.xml?MUOFF
        # IF Denon is currently UNMUTED, then mute (Note: few seconds delay in state update after change)
        default:
          - service: denonavr.get_command
            data:
              entity_id: media_player.office_2
              command: /goform/formiPhoneAppDirect.xml?MUON

Use the Template Editor to validate:

HA → Developer Options → Template → Template Editor

Template Editor to validate:

When i past it in script and ik want to save is:

Hello
I have a x2800dab denon and the same problem

I don’t find a solution at this time