Hello!
I am trying to create a single push button (not with a classical switch appearance) for Mute TV. When button is tapped, it will activate “TV_Mute_ON” and sitemap item will be highligted (eg : change color) and while TV_Mute_ON state, if the button is tapped again , it will change back to ''Mute_OFF" state, indication will go back to initial state.
I tried something like this :
Switch item=TV_Mute label="MUTE" mappings=[ON="MUTE"] icon="soundvolume"
//and a rule like :
rule " Single Mute Switch"
when
Item TV_Mute received command
then
if (TV_Mute.state != ON) TV_Mute.sendCommand(ON)
else TV_Mute.sendCommand(OFF)
end
I tried to make it with a switch of a single mapping. My output is nothing but a TV_Mute state eternally changing its state from ON-OFF-ON-OFF… I also realized that with a single mapping option , tapping to that mapping button doesn’t change its own visual appearance although that command is changing the state of TV_Mute to ON.
Would appreciate it if someone could help.
Regards,
Erdal.