[SOLVED] Status Of a System

Capture
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]" 

I forgot the semicolon
This is the true rules

when
		Item Security changed
	then
		if(Security.state  == ON)	{postUpdate(Security_Status, "Enabeled")}
		 else {postUpdate(Security_Status, "Disabeled")}
1 Like