Dear oH Community,
I hope You will be able to point me in a good direction with the following issue:
=> How to change state of a “dummy” item switch via UI?
I have an “alarm” rule that is triggered with a change of state of one of my items (contacts) and then this rule should do something but only if this dummy switch is ON (this rule works and it is not my issue).
This is my “dummy” item in a *.item file:
Switch Test_Alarm "Alarm" <siren>
This is my sitemap entry in a *.sitemap file:
Switch item=Test_Alarm icon="siren" label="Alarm"
My first issue was that the state of Test_Alarm switch was always NULL - no matter how many times I pressed it in the UI.
I was able to solve this by:
when System started then postUpdate(Test_Alarm, ON) end
Still, state does not change when I click on it and I am unable to make it OFF.
There is not a single trace of it in both events and openhab.log.
This is mine platform information:
- Hardware: Raspberry Pi 2B+
- OS: Raspbian Stretch (updated)
- Java Runtime Environment: Oracle Java:
- Java™ SE Runtime Environment (build 1.8.0_131-b11)
- Java HotSpot™ Client VM (build 25.131-b11, mixed mode)
- openHAB version: 2.5.0.M1
This is probably a simple thing but somehow I am unable to find a solution :-/
Thank You in advance!