psyciknz
(Psyciknz)
September 9, 2017, 6:16am
1
I saw in [SOLVED]Set default item state to OFF instead of NULL that I can use a rule to set a default state of items.
Is there an easy way I can set a whole group - ie all my motion_detection items in one command:
eg g_motion_detection.postUpdate(OFF)
Is that possible, or do I have to iterate them?
rlkoshak
(Rich Koshak)
September 9, 2017, 2:19pm
2
It definitely works with sendCommand. I’m not sure if it works with postUpdate.
Give it a try and report back here.
psyciknz
(Psyciknz)
September 11, 2017, 5:59am
3
I believe not.
There were contact items though.
So
g_motion_detection.postUpdate(CLOSED)
did nothing, but I’ve managed to replicate what I want with:
g_motion_detection.allMembers.forEach[g |
logInfo("AlarmSetOff","Item " + g.name + " state: " + g.state.toString )
g.postUpdate(CLOSED)
]