#How to create a volume slider in HomeKit for Denon AVR?

1 messages · Page 1 of 1 (latest)

jade gust
#

[Using Home Assistant in a docker container]

I’m still trying to figure out how to get Home Assistant, and the Denon AVR Network Receivers integration, to use the HomeKit Bridge integration so we can get a light bulb style slider to control volume (like the Denon TV plugin for Homebridge does). After searching for a few days, it’s been nothing but dead ends. So I finally decided to use Claude.ai. It’s recommending I create a template lightbulb in the config.yaml like this (below), but being new to Home Assistant, I have no idea if this would be correct:

light:
  - platform: template
    lights:
      denon_volume:
        friendly_name: "Denon Volume"
        value_template: >-
          {% if is_state('media_player.denon_avr', 'on') %}
            {% if state_attr('media_player.denon_avr', 'is_volume_muted') %}
              off
            {% else %}
              on
            {% endif %}
          {% else %}
            off
          {% endif %}
        turn_on:
          service: media_player.volume_mute
          data:
            entity_id: media_player.denon_avr
            is_volume_muted: false
        turn_off:
          service: media_player.volume_mute
          data:
            entity_id: media_player.denon_avr
            is_volume_muted: true
        set_level:
          service: media_player.volume_set
          data:
            entity_id: media_player.denon_avr
            volume_level: "{{ (brightness / 255 * 100)|int / 100 }}"
        level_template: >-
          {% if is_state('media_player.denon_avr', 'on') %}
            {{ (state_attr('media_player.denon_avr', 'volume_level')|float * 255)|int }}
          {% else %}
            0
          {% endif %}

Then it says to add this as well:

homekit:
  filter:
    include_entities:
      - light.denon_volume

what do you think?

jade gust
#

Working through this, I just tried doing the above, but in my Devices list in Home Assistant, it gives this a generic name like “Home Assistant Bridge:21063”

The UI won’t let me rename it because I added it to the config yaml (which…from an end user POV is a little baffling… why wouldn’t I be able to change it?)

I tried adding name: Denon Volume under homekit:, but then I end up with “Home Assistant Bridge:21063 (Denon Volume)”…

jade gust
#

I gave up on the name thing (unless someone can tell me how you do that properly), and I was able to get this added to Apple HomeKit. It’s not as smooth at the way it works with Homebridge. But at least I have a lightbulb slider that can adjust the volume now.

Would love any input on any better ways to achieve this. Thanks.

fair nest
#

I might need some help with this. I noticed that there's a volume slider on the default dashboard but when I add my AVR to my own dashboard the volume slider disappers