Bonjour,
Hop, petite participation avec une petite carte qui m’est bien utile pour piloter mon ampli, le son, le mode et les playlists Spotify.
Les boutons appellent des scripts ou sont détectés par Node Red.
HA peut bien entendu faire l’équivalent de Node Red.
Oui je penserais passer de Card-mod à UIX ![]()
Code carte.
square: true
columns: 5
type: grid
cards:
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: script.denon_pause
name: Pause
show_state: false
icon_height: 50px
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: script.denon_moins
name: Moins
icon_height: 50px
show_state: false
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: input_button.volume_30
show_state: false
icon_height: 50px
name: Vol 30
icon: mdi:volume-low
card_mod:
style: >
{% if state_attr('media_player.denon_avc_x3700h_2','volume_level') ==
0.30 %}
ha-card {
color: coral;
border-color: #848646;
--card-mod-icon-color: #ffffff;
} {% else %} ha-card {
--card-mod-icon-color: #44739e;
} {% endif %}
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: input_button.volume_40
show_state: false
icon_height: 50px
name: Vol 40
icon: mdi:volume-medium
card_mod:
style: >
{% if state_attr('media_player.denon_avc_x3700h_2','volume_level') ==
0.40 %}
ha-card {
color: coral;
border-color: #848646;
--card-mod-icon-color: #ffffff;
} {% else %} ha-card {
--card-mod-icon-color: #44739e;
}
{% endif %}
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: input_button.volume_50
show_state: false
icon_height: 50px
name: Vol 50
card_mod:
style: >
{% if state_attr('media_player.denon_avc_x3700h_2','volume_level') ==
0.50 %}
ha-card {
color: coral;
border-color: #848646;
--card-mod-icon-color: #ffffff;
} {% else %} ha-card {
--card-mod-icon-color: #44739e;
}
{% endif %}
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: script.denon_previous
name: Previous
icon_height: 50px
show_state: false
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: script.denon_next
show_state: false
icon_height: 50px
name: Next
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: input_button.stereo
name: Stéréo
icon_height: 50px
icon: ""
show_state: false
card_mod:
style: >
{% if state_attr('media_player.denon_avc_x3700h_2','sound_mode') ==
'STEREO' %}
ha-card {
color: coral;
border-color: #848646;
--card-mod-icon-color: #ffffff;
} {% else %} ha-card {
--card-mod-icon-color: #44739e;
}
{% endif %}
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: input_button.dts
name: DTS
icon_height: 50px
card_mod:
style: >
{% if state_attr('media_player.denon_avc_x3700h_2','sound_mode') == 'DTS
SURROUND' %}
ha-card {
color: coral;
border-color: #848646;
--card-mod-icon-color: #ffffff;
} {% else %} ha-card {
--card-mod-icon-color: #44739e;
}
{% endif %}
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: input_button.dolby
name: Dolby
icon_height: 50px
card_mod:
style: >
{% if state_attr('media_player.denon_avc_x3700h_2','sound_mode') ==
'DOLBY DIGITAL' %}
ha-card {
color: coral;
border-color: #848646;
--card-mod-icon-color: #ffffff;
} {% else %} ha-card {
--card-mod-icon-color: #44739e;
}
{% endif %}
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: script.turn_on
target:
entity_id: script.spotify_playlist_une
name: 🎵 Playlist
icon: mdi:spotify
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: script.turn_on
target:
entity_id: script.playlist_estelle
name: 🎵 Chérie
icon: mdi:spotify
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: script.turn_on
target:
entity_id: script.playlist_cool
name: 🎵 Cool
icon: mdi:spotify
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: script.turn_on
target:
entity_id: script.playlist_metal
name: 🎵 Métal
icon: mdi:spotify
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: script.turn_on
target:
entity_id: script.playlist_reggae_2
name: 🎵 Reggae
icon: mdi:spotify
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: script.turn_on
target:
entity_id: script.playlist_massage
name: 🎵 Zen
icon: mdi:spotify
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: script.turn_on
target:
entity_id: script.playlist_celtique
name: 🎵 Celte
icon: mdi:spotify
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: script.turn_on
target:
entity_id: script.playlist_francaise
name: 🎵 France
icon: mdi:spotify
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: input_button.heos
name: HEOS
icon_height: 50px
icon: mdi:soundbar
card_mod:
style: >
{% if state_attr('media_player.denon_avc_x3700h_2','source') == 'HEOS
Music' %}
ha-card {
color: coral;
border-color: #848646;
--card-mod-icon-color: #ffffff;
} {% else %} ha-card {
--card-mod-icon-color: #44739e;
}
{% endif %}
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: input_button.blu_ray
name: Blu-Ray
icon_height: 50px
icon: mdi:disc-player
card_mod:
style: >
{% if state_attr('media_player.denon_avc_x3700h_2','source') ==
'Blu-ray' %}
ha-card {
color: coral;
border-color: #848646;
--card-mod-icon-color: #ffffff;
} {% else %} ha-card {
--card-mod-icon-color: #44739e;
}
{% endif %}
title: Denon 3700
Bob

