Closed 1iverea9er closed 2 years ago
@1iverea9er it's documented on Custom buttons
I really don't understand how to do this. I tried the following code in card section ...
volume_row: - vlm_down - mute - vlm_up
....
and following code in 'custom_keys' : ....
vlm_down: icon: mdi:volume-minus service: media_player.volume_down target: entity_id: media_player.sony_bravia_tv mute: icon: mdi:volume-mute service: media_player.volume_mute target: entity_id: media_player.sony_bravia_tv vlm_up: icon: mdi:volume-plus service: media_player.volume_up target: entity_id: media_player.sony_bravia_tv
....
What am I doing wrong ?
@1iverea9er you should try
volume_row: buttons
and custom keys like this
volume_down:
icon: mdi:volume-minus
service: media_player.volume_down
target:
entity_id: media_player.sony_bravia_tv
volume_mute:
icon: mdi:volume-mute
service: media_player.volume_mute
target:
entity_id: media_player.sony_bravia_tv
volume_up:
icon: mdi:volume-plus
service: media_player.volume_up
target:
entity_id: media_player.sony_bravia_tv
Then it should works fine ;)
rafalpetryka Oh, thanks, I seem to have tried this option as well. However, I did not take into account that the home assistant services template gives a slightly different code for calling the service:
service: media_player.volume_down data: {} target: entity_id: media_player.sony_bravia_tv
It is used here:
icon: mdi:volume-minus service: media_player.volume_down service_data: entity_id: media_player.sony_bravia_tv
target:
mast be replaced as service_data:
Nah, data
is is service_data
and target
doesn't exist
How to configure the execution of castom service for each button (volume_up, volume_down, volume_mute) ??? Вefault service does not work.
p.s. and same problem for 'navigation_row'