[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?