How to create rule with state of device

Hoping for a screen shot or easy example to follow on a particular rule.

I have an Office AC on a smart outlet. When I run a blowdryer in the bathroom I blow a fuse.
I want to write a rule that:
If the Office AC is on and motion is detected in my shower then disable the Office AC for 30 minutes then turn it back on. If the Office AC is off, then don't do anything.

I wrote the rule, and it worked for the On state, but it turned the AC on when in the Off state. If someone skilled at Rules can write an example, maybe demonstrate how to check the state I would be grateful!

Sounds like you have it set to toggle the outlet and not specifically set it to Off.
Can you post a screenshot of what you did so far? Sounds like it mostly works except for that one hiccup.

1 Like

Super grateful for the reply - I think I may have got it. testing now - here is what I have so far:

Select Actions for Turn off AC and floor heater while in Shower

IF (Office A/C eWeLink Zigbee Outlet(off) is on(F) AND
Bath Shower Samung Magnetic Motion Sensor 4 active(F) [FALSE]) THEN
Off: Office A/C eWeLink Zigbee Outlet
Delay 0:04:00
On: Office A/C eWeLink Zigbee Outlet
END-IF
IF (Office Heater eWeLink Zigbee Outlet(on) is on(T) AND
Bath Shower Samung Magnetic Motion Sensor 4 active(F) [FALSE]) THEN
Off: Office Heater eWeLink Zigbee Outlet
Delay 0:06:00
On: Office Heater eWeLink Zigbee Outlet
END-IF

//comment - in this example I used 4 and 6 min timer for testing purposes.

Yep. tested all cases. I had a simple rule running that was enabling the AC. I'm all good.

1 Like