meowmoo
(meowmoo)
February 18, 2023, 3:13pm
1
Hi there,
I start to working on a Soundmod card, to make it look like in the Denon Andriod App
this is what I got.
Here are the png files
https://drive.google.com/drive/folders/17EltSyQXJcT2tf0ecwwmzefzBMy_WbDc?usp=share_link
First we need a sensor to get the Sound mode from the avr
- platform: template
sensors:
denon_sound_mode_raw:
unique_id: denon_output
value_template: "{{ state_attr('media_player.denon_avr_x3600h', 'sound_mode_raw') }}"
now we can use this info in a picture card
type: picture-entity
entity: sensor.denon_sound_mode_raw
show_state: false
show_name: false
name: output
tap_action:
action: call-service
service: media_player.select_sound_mode
service_data:
entity_id: media_player.denon_avr_x3600h
sound_mode: AUTO
image: /local/avr/off.jpg
state_image:
Stereo: /local/avr/2.1.png
Multi Ch Stereo: /local/avr/7.1.4.png
Dolby Audio - Dolby Digital Plus: /local/avr/5.1.png
Dolby Audio - DD+ + DSur: local/avr/7.1.4.png
Dolby Audio - DD+ + Neural:X: /local/avr/7.1.4.png
Dolby Audio - Dolby Surround: /local/avr/5.1.png
Dolby Audio - DD + DSur: local/avr/7.1.4.png
Dolby Audio - DD + Neural:X: /local/avr/7.1.4.png
Dolby Audio - Dolby Digital: /local/avr/5.1.png
Dolby Audio - Dolby TrueHD: /local/avr/7.1.png
Dolby Audio - TrueHD + Neural:X: /local/avr/7.1.4.png
Dolby Audio - TrueHD + Dsur: /local/avr/7.1.4.png
Dolby Atmos: /local/avr/7.1.4.png
DTS Neural:X: /local/avr/7.1.4.png
DTS Surround: /local/avr/7.1.png
DTS + Dsur: /local/avr/7.1.4.png
DTS + Neural:X: /local/avr/7.1.4.png
DTS:X MSTR: /local/avr/7.1.4.png
DTS-HD MSTR: /local/avr/7.1.png
DTS-HD + Neural:X: /local/avr/7.1.4.png
DTS-HD + DSur: /local/avr/7.1.4.png
Multi Ch In 7.1: /local/avr/7.1.png
Multi In + DSur: /local/avr/7.1.4.png
Multi In + Neural:X: /local/avr/7.1.4.png
or we use custom button card GitHub - custom-cards/button-card: ❇️ Lovelace button-card for home assistant
type: custom:button-card
entity: sensor.denon_sound_mode_raw
show_name: false
show_state: false
name: sound mode
styles:
card:
- height: 200px
size: 100%
tap_action:
action: call-service
service: media_player.select_sound_mode
service_data:
entity_id: media_player.denon_avr_x3600h
sound_mode: AUTO
show_entity_picture: true
entity_picture: >-
[[[ if (entity.state == "Stereo") return "/local/avr/2.1.png"; else if
(entity.state == "Multi CH Stereo") return "/local/avr/7.1.4.png"; else if
(entity.state == "Dolby Audio - Dolby Digital Plus") return
"/local/avr/5.1.png"; else if (entity.state == "Dolby Audio - DD+ + DSur")
return "local/avr/7.1.4.png"; else if (entity.state == "Dolby Audio - DD+
+ Neural:X") return "/local/avr/7.1.4.png"; else if (entity.state ==
"Dolby Audio - Dolby Surround") return "/local/avr/5.1.png"; else if
(entity.state == "Dolby Audio - DD + DSur") return "/local/avr/7.1.4.png";
else if (entity.state == "Dolby Audio - DD + Neural:X") return
"/local/avr/7.1.4.png"; else if (entity.state == "Dolby Audio - Dolby
Digital") return "/local/avr/5.1.png"; else if (entity.state == "Dolby
Audio - Dolby TrueHD") return "/local/avr/7.1.png"; else if (entity.state
== "Dolby Audio - TrueHD + Neural:X") return "/local/avr/7.1.4.png"; else
if (entity.state == "Dolby Audio - TrueHD + Dsur") return
"/local/avr/7.1.4.png"; else if (entity.state == "Dolby Atmos") return
"/local/avr/7.1.4.png"; else if (entity.state == "DTS Neural:X") return
"/local/avr/7.1.4.png"; else if (entity.state == "DTS Surround") return
"/local/avr/7.1.png"; else if (entity.state == "DTS + Dsur") return
"/local/avr/7.1.4.png"; else if (entity.state == "DTS + Neural:X") return
"/local/avr/7.1.4.png"; else if (entity.state == "DTS:X MSTR") return
"/local/avr/7.1.4.png"; else if (entity.state == "DTS-HD MSTR") return
"/local/avr/7.1.png"; else if (entity.state == "DTS-HD + Neural:X") return
"/local/avr/7.1.4.png"; else if (entity.state == "DTS-HD + DSur") return
"/local/avr/7.1.4.png"; else if (entity.state == "Multi Ch In 7.1") return
"/local/avr/7.1.png"; else if (entity.state == "Multi In + DSur") return
"/local/avr/7.1.4.png"; else if (entity.state == "Multi In + Neural:X") return "/local/avr/7.1.4.png";
return '/local/avr/off.jpg' ]]]
1 Like
BebeMischa
(Bebe Mischa)
February 18, 2023, 4:26pm
2
Hi,
first many thanks for working on this. Looks good and helps.
Well, I struggle to get it working. Even on the same Denon, as you have, I only get this:
No colors for active speakers at all.
Using the picture card method.
Any idea?
Edit:
I found it. Accidentally selected the HEOS player instead of the main AVR Yes, I do shame…
BebeMischa
(Bebe Mischa)
February 18, 2023, 4:43pm
3
So, now it works, I have one more question:
Can you, please, share the card yaml for this?
meowmoo
(meowmoo)
February 18, 2023, 5:54pm
4
The 5 Buttons
type: horizontal-stack
cards:
- type: custom:button-card
name: Pure
color: Auto
color_type: card
default_color: rgb(255, 233, 155)
label: null
styles:
card:
- height: 30px
name:
- font-size: 14px
show_icon: false
tap_action:
action: call-service
service: media_player.select_sound_mode
service_data:
entity_id: media_player.denon_avr_x3600h
sound_mode: MUSIC
- type: custom:button-card
name: Atmos
color: Auto
color_type: card
default_color: rgb(255, 233, 155)
label: null
styles:
card:
- height: 30px
name:
- font-size: 14px
show_icon: false
tap_action:
action: call-service
service: media_player.select_sound_mode
service_data:
entity_id: media_player.denon_avr_x3600h
sound_mode: MOVIE
- type: custom:button-card
name: DTS:X
color: Auto
color_type: card
default_color: rgb(255, 233, 155)
label: null
styles:
card:
- height: 30px
name:
- font-size: 14px
show_icon: false
tap_action:
action: call-service
service: media_player.select_sound_mode
service_data:
entity_id: media_player.denon_avr_x3600h
sound_mode: GAME
- type: custom:button-card
name: Stereo
color: Auto
color_type: card
default_color: rgb(255, 233, 155)
label: null
styles:
card:
- height: 30px
name:
- font-size: 14px
show_icon: false
tap_action:
action: call-service
service: media_player.select_sound_mode
service_data:
entity_id: media_player.denon_avr_x3600h
sound_mode: STEREO
- type: custom:button-card
name: MCH:S
color: Auto
color_type: card
default_color: rgb(255, 233, 155)
label: null
styles:
card:
- height: 30px
name:
- font-size: 14px
show_icon: false
tap_action:
action: call-service
service: media_player.select_sound_mode
service_data:
entity_id: media_player.denon_avr_x3600h
sound_mode: MCH STEREO
mini media player
type: custom:mini-media-player
entity: media_player.denon_avr_x3600h
source: icon
sound_mode: icon
volume_stateless: false
idle_view: when_standby
hide:
icon: true
name: false
volume: false
source: false
power: false
power_state: false
sound_mode: true
progress: false
info: false
controls: true
next: false
prev: false
play_pause: false
volume_level: true
mute: true
shortcuts:
label: Playlist
columns: 5
column_height: 5
buttons:
- name: moo
icon: mdi:cat
type: service
id: spotcast.start
data:
device_name: Denon AVR-X3600H
uri: spotify:playlist:0MsXDA6rziRarCYOVg66Pd
random_song: true
- name: 2022
icon: mdi:cards-playing-heart-outline
type: service
id: spotcast.start
data:
device_name: Denon AVR-X3600H
uri: spotify:playlist:37i9dQZF1F0sijgNaJdgit
random_song: true
- name: Rock
icon: mdi:guitar-electric
type: service
id: spotcast.start
data:
device_name: Denon AVR-X3600H
uri: spotify:playlist:37i9dQZF1DX4vth7idTQch
random_song: true
info: short
group: false
artwork: material
volume_step: '1'
name: 'Denon '
Chips
type: custom:mushroom-chips-card
chips:
- type: entity
entity: sensor.denon_sound_mode_raw
- type: entity
entity: sensor.denon_db_volume
use_entity_picture: true
- type: conditional
conditions:
- entity: switch.ps5_power
state: 'off'
chip:
type: entity
entity: switch.ps5_power
tap_action:
action: call-service
service: switch.toggle
data: {}
target:
entity_id: switch.ps5_power
- type: conditional
conditions:
- entity: switch.ps5_power
state: 'on'
chip:
type: entity
entity: sensor.ps5_play_time
content_info: state
icon: mdi:sony-playstation
use_entity_picture: true
name: Playtime
volume sensor, gos into the config
compensation:
media_player_db_volume:
source: media_player.denon_avr_x3600h
unique_id: denon_db_volume
attribute: volume_level
unit_of_measurement: dB
data_points:
- [0, -80.0]
- [0.8, 0.0]
1 Like
BebeMischa
(Bebe Mischa)
February 18, 2023, 6:00pm
5
Briliant!
Final question:
Where can I buy you a beer?
BebeMischa
(Bebe Mischa)
February 18, 2023, 6:56pm
6
So, this is, what I have now. I’m very happy!
Still wish, this would be finished by someone, works only half …
complex1
(Frank)
February 19, 2023, 11:21am
7
I have the Denon AVR-X1600H and l want to try out this AVR Sound Card.
My knowledge about HA is not so good, so I want to ask where and how can I store the png files.
I guess I need the File Editor, but then what… what is the next step to take?
Please advise.
santiniuk
(Santiniuk)
February 19, 2023, 2:52pm
8
Just tinkering with this myself. I have the AVR-X2200W which it seems to work on.
I just changed all reference to the model number of mine.
The files need to go into
www folder. Create a folder in www called avr and copy the files into this.
You can use the file editor to do all of this.
1 Like
complex1
(Frank)
February 19, 2023, 3:08pm
9
@santiniuk Thank you.
Just a moment ago, I have found the solution under “Hosting Files”
niraviry
(Nir Aviry)
October 26, 2024, 4:22pm
10
Hi. Great job but there is a problem while using a TV with ARC/eARC. The sound_mode_raw outputs some states that are not realy sound modes like Direct. Under direct for instance, you can get few actual sound modes like stereo or others. The tested state shoud be checked against the input while using ARC. In this case, the TV determines the sound mode.
hello, for the db volume, do you need to create another sensor?
or do you just copy the compensation into the config file?
because it doesn’t work for me.