Help with a simple Rule

hi all, ive had I search through the forums and couldn’t find out how to get the following to work.

what im wanting to do is if one switch is turned off and another changes its state from on to off turn a third switch off. this is what ive got hopefully its close.

rule "Test"
	Item Iphone1_networkBinding changed from ON to OFF
if 	(Iphone2_networkBinding.state == "OFF") 

any pointers would be great

I think all items are switches.
if (Iphone2_networkBinding.state == OFF)
if (Iphone2_networkBinding.state.toString == “OFF”)

Thanks the below fixed it, so the “” are not used for switches?
if (Iphone2_networkBinding.state == OFF)

No… switch.state must without " " :slight_smile: " " defines OFF as string … and a string doesn’t work for a switch :wink:

ok, thanks