Hello,
I have a dehumidifier plugged into a controlled outlet.
I created a scene that, every 2 hours, sets the outlet to On, waits 1 hour and sets the outlet to Off.
This is so the device runs 1 hour out of every 2.
I have a window sensor.
I want, when the window is opened, for the outlet to switch to Off and for it to switch to On as soon as the window is closed again, or restore the previous state, whichever.
I wanted to stop or pause the scene that controls the outlet but this feature doesn’t exist.
Do you have any idea about the feasibility of what I want, or should I submit a feature request?
Heads-up about the scenes — if it seems complicated, that’s my brain wanting it that way
Be careful about the level where you put your actions, especially for the Sinon of the Scene On/Off.
Another point: you’ll need to check whether 0 and 1 represent the window open state (0 = open or closed?) and adjust accordingly (I assumed 0 = closed in my scenario).
There’s a way to put everything into a single scene but be careful — it can be brain-twisting!
And here’s a video of what that should look like (virtual devices in my example):
And the nice thing is if you don’t have access to Gladys to start your dehumidifier, you open and close your window and it’s running
EDIT: after retesting, if the window is open AND you force the plug ON, the plug stays ON (until the next hour). That’s a point to fix unless you’ll never perform that action manually.
It’s an example I took with a virtual device and you need to check yours to know which value to retrieve when it’s closed.
In my case, my open/close sensors use contact detection so if there is contact (true, =1) then they are closed, and if there is no contact (false, =0) then it’s open.
And indeed, every hour we retrieve the state of the plug and we « invert » its state.
And if the window is open then we force the plug to switch off.