I want to make this:-
If The switch is “ON”, the status is “Enabled” and
If The switch is “OFF”, the status is “Disabled”
This is my rules
when
Item Security changed
then
if(Security.state == ON) {postUpdate(Security_Status, Enabeled)}
else {postUpdate(Security_Status, Disabeled)}
Items
Switch Security "Security System" <lock> ["Switchable"]
String Security_Status "Status[%s]"