I am currently using Habpanel for my project but got stucked with how I can control the volume using the slider/dimmer approach. Controlling the volume by pressing the icons 1 by 1 (working) is a bit slow and long process and I want to control it using a slider in an interval of either 5 or 10. I have tried the commands I saw here but none of it worked.
Item (these strings are saved as 1 item):
Switch 3F_BR_Remote_TV_VolumeUp “3F TV Volume [%s]” (Bedroom) [ “Switch” ] {channel = “broadlink: rm2: 78-0f-77-b9-xx-xx-xx:command”}
Switch 3F_BR_Remote_TV_VolumeDown “3F TV Volume [%s]” (Bedroom) [ “Switch” ] {channel = “broadlink: rm2: 78-0f-77-b9-xx-xx-xx:command”}
P.S I have used switch and dimmer on the item name part
Rules I’ve tried:
Rule#1
rule “Volume”
when Item 3F_BR_Remote_TV_Volume received command then var Number percent = 0
if(3F_BR_Remote_TV_Volume.state instanceof DecimalType) percent = 3F_BR_Remote_TV_Volume.state as DecimalType if(receivedCommand==INCREASE) percent = percent + 5 if(receivedCommand==DECREASE) percent = percent - 5
if(percent<0) percent =0 if(percent>100) percent= 100
postUpdate(3F_BR_Remote_TV_Volume,percent)
end
Rule #2
rule “3F_BR_Remote_TV_Volume”
when
Item 3F_BR_Remote_TV_Volume received command
then
3F_BR_Remote_TV_VolumeUp.sendCommand(receivedCommand)
3F_BR_Remote_TV_Volume.postupdate(receivedCommand)
end
I have linked the items in broadlink bindings and confirmed working if pressed in the HabPanel but no luck using the slider. On the slider widget, I’ve tried to add an item but I can only see the volumeDown item.