Jason
(Jason Cullen)
January 14, 2016, 10:51am
1
I’m trying to setup 3 buttons as in the demo site but as momentary push buttons
Here is my item:
Number Scene_General "Scene" {autoupdate="false"
}
and in my sitemap
Switch item=Scene_General label=“Scene” mappings=[1=Dinner, 2=TV, 3=Reading]
But with autoupdate=false set the value of Scene_General doesn’t get updated
Do I need to drop the autoupdate and use a rule to run a command based on the value of Scene_General and then set it back to 0 after the command has been run?
watou
(John Cocula)
January 14, 2016, 10:56am
2
That’s intended with autoupdate=“false”. Your rule would have to look like:
rule Test
when
Item Scene_General received command
then
if (receivedCommand == 1) {
//...
}
end
So the state of Scene_General
never gets updated, but since you are only using it for commands, that should be OK.
Jason
(Jason Cullen)
January 14, 2016, 11:13am
3
Thanks, that’s exactly what is was trying to achieve.
ps commandReceived should have been receivedCommand
watou
(John Cocula)
January 14, 2016, 11:33am
4
Oops. Sorry; it seemed wrong as I was typing it, but thinking more about coffee than what I was doing!
1 Like
jcid1
(Jay)
April 1, 2016, 3:56am
5
solved this also by simply using,
Switch relay1 "Garage" <garage> { autoupdate="false",http=">[ON:GET:http://10.1.100.200/index.php?trigger=1] >[OFF:GET:http://10.1.100.200/index.php?trigger=1]" }