Don’t think there is a toggle call right away. But you could make a script for it. You van even make it universal by passing the entity_id as parameter (field). You can read the current mute status from the attribute.
My TCL TV will toggle the mute, reguardless if you tell it to mute or unmute. If you tell it to mute when it is muted, it will unmute (and visa-versa).
I know that’s how it works with IR, but if you goto Developer Tools / Services and enter Media player: Mute volume, followed by the media_player entity, there is a toggle called: True/false for mute/unmute. When on, it will mute and not unmute, when off, the opposite.
Is there some way to call that service that doesn’t force you to choose between mute and unmute?
EDIT: FYI, the reason your script with the choose isn’t working is because you have ‘false’ in quotes. Remove the quotes and it would work. Or you can use the simplified script that uses templates that I posted above. Both will get the job done.
EDIT2: If you want to get really fancy, you can use variables with your script:
mute:
fields:
media_player:
description: Media Player that will be mute or unmuted
example: media_player.media_room
sequence:
- service: media_player.volume_mute
target:
entity_id: "{{ media_player }}"
data:
is_volume_muted: "{{ not state_attr(media_player , 'is_volume_muted') }}"
@RichardU If you would just have copied my script you would have had a working version a whole week ago. Version of @petro is 99% the same, only he used a template value where I used a chooser… So the error must have been in the coping.
On my roku tv by hisense it toggles. The toggles sevice just mutes only??? I don’t know why same as power toggles, it only turns it off? Test and see on your tv, it’s better than another script.
Providing “false” to that attribute will only unmute it. Not sure what else to tell you. This may be specific to your device only and not all devices. It does not work with any media player I own.