Help With Humidity Rule

I am attempting to set up a rule for a bathroom and it is not functioning as I had hoped and I am getting no where with trying to figure it out.

Scenario: I have a virtual switch set up that activates when the humidity level in the bathroom hits a set threshold. Currently 20% higher then another room on the same floor. The rule is written to the wait until the humidity drops to less then 15% over the other room and then shut off the virtual switch. Things are working fine for the turning on, but it never turns off. Any assistance in identifying what I am doing wrong would be appreciated.

1 Like

Can you post a screenshot of that full rule?

And a screenshot of the Logs from a (shower) sequence where the humidity triggers both occur? It would be interesting to see what the logs say is happening for every device/component involved here.

Here is the entire rule:

Here is some of the logs.

app:8072025-01-28 08:46:10.454infoAction: END-IF
app:8072025-01-28 08:46:10.451infoAction: Turn Off Room Lights:
Bathroom - Downstairs Motion Automation (skipped)
app:8072025-01-28 08:46:10.442infoAction: Off: Virtual Switch - Downstairs Shower Active (skipped)
app:8072025-01-28 08:46:10.438infoAction: Wait for event: Humidity of Downstairs Bathroom Temp(63.7) is <= Family Room Motion(47.60) +15 (skipped)
app:8072025-01-28 08:46:10.431infoAction: On: Virtual Switch - Downstairs Shower Active (Command only switches that are off) (skipped)
app:8072025-01-28 08:46:10.427infoAction: IF (Humidity of Downstairs Bathroom Temp(63.7) is > Family Room Motion(47.60) +20(F) [FALSE]) THEN (skipping)
app:8072025-01-28 08:46:10.403infoTriggered: Humidity of Downstairs Bathroom Temp(63.7) *changed*
app:8072025-01-28 08:46:10.382infoEvent: Downstairs Bathroom Temp humidity 63.7
app:8072025-01-28 08:45:10.218infoAction: END-IF
app:8072025-01-28 08:45:10.215infoAction: Turn Off Room Lights:
Bathroom - Downstairs Motion Automation (skipped)
app:8072025-01-28 08:45:10.206infoAction: Off: Virtual Switch - Downstairs Shower Active (skipped)
app:8072025-01-28 08:45:10.202infoAction: Wait for event: Humidity of Downstairs Bathroom Temp(62.6) is <= Family Room Motion(47.51) +15 (skipped)
app:8072025-01-28 08:45:10.195infoAction: On: Virtual Switch - Downstairs Shower Active (Command only switches that are off) (skipped)
app:8072025-01-28 08:45:10.191infoAction: IF (Humidity of Downstairs Bathroom Temp(62.6) is > Family Room Motion(47.51) +20(F) [FALSE]) THEN (skipping)
app:8072025-01-28 08:45:10.167infoTriggered: Humidity of Downstairs Bathroom Temp(62.6) *changed*
app:8072025-01-28 08:45:10.146infoEvent: Downstairs Bathroom Temp humidity 62.6
app:8072025-01-28 08:44:10.112infoWait Event: Downstairs Bathroom Temp humidity 63.9
app:8072025-01-28 08:44:10.025infoAction: END-IF
app:8072025-01-28 08:44:10.021infoAction: Turn Off Room Lights:
Bathroom - Downstairs Motion Automation (skipped)
app:8072025-01-28 08:44:10.013infoAction: Off: Virtual Switch - Downstairs Shower Active (skipped)
app:8072025-01-28 08:44:10.009infoAction: Wait for event: Humidity of Downstairs Bathroom Temp(63.9) is <= Family Room Motion(47.51) +15 (skipped)
app:8072025-01-28 08:44:10.002infoAction: On: Virtual Switch - Downstairs Shower Active (Command only switches that are off) (skipped)
app:8072025-01-28 08:44:09.998infoAction: IF (Humidity of Downstairs Bathroom Temp(63.9) is > Family Room Motion(47.51) +20(F) [FALSE]) THEN (skipping)
app:8072025-01-28 08:44:09.936infoTriggered: Humidity of Downstairs Bathroom Temp(63.9) *changed*
app:8072025-01-28 08:44:09.915infoEvent: Downstairs Bathroom Temp humidity 63.9
app:8072025-01-28 08:43:09.885infoAction: Wait for event: Humidity of Downstairs Bathroom Temp(69.1) is <= Family Room Motion(47.51) +15
app:8072025-01-28 08:43:09.874infoAction: On: Virtual Switch - Downstairs Shower Active (Command only switches that are off)
app:8072025-01-28 08:43:09.868infoAction: IF (Humidity of Downstairs Bathroom Temp(69.1) is > Family Room Motion(47.51) +20(T) [TRUE]) THEN
app:8072025-01-28 08:43:09.769infoTriggered: Humidity of Downstairs Bathroom Temp(69.1) *changed*
app:8072025-01-28 08:43:09.679infoEvent: Downstairs Bathroom Temp humidity 69.1
app:8072025-01-28 08:43:09.677infoWait Event: Downstairs Bathroom Temp humidity 69.1
app:8072025-01-28 08:42:27.966infoWait Event: Family Room Motion humidity 47.51
app:8072025-01-28 08:42:09.755infoWait Event: Downstairs Bathroom Temp humidity 73.7
app:8072025-01-28 08:42:09.661infoAction: Wait for event: Humidity of Downstairs Bathroom Temp(73.7) is <= Family Room Motion(45.02) +15
app:8072025-01-28 08:42:09.652infoAction: On: Virtual Switch - Downstairs Shower Active (Command only switches that are off)
app:8072025-01-28 08:42:09.648infoAction: IF (Humidity of Downstairs Bathroom Temp(73.7) is > Family Room Motion(45.02) +20(T) [TRUE]) THEN
app:8072025-01-28 08:42:09.481infoTriggered: Humidity of Downstairs Bathroom Temp(73.7) *changed*
app:8072025-01-28 08:42:09.456infoEvent: Downstairs Bathroom Temp humidity 73.7
app:8072025-01-28 08:41:09.403infoWait Event: Downstairs Bathroom Temp humidity 91.4
app:8072025-01-28 08:41:09.307infoAction: Wait for event: Humidity of Downstairs Bathroom Temp(91.4) is <= Family Room Motion(45.02) +15
app:8072025-01-28 08:41:09.297infoAction: On: Virtual Switch - Downstairs Shower Active (Command only switches that are off)
app:8072025-01-28 08:41:09.294infoAction: IF (Humidity of Downstairs Bathroom Temp(91.4) is > Family Room Motion(45.02) +20(T) [TRUE]) THEN
app:8072025-01-28 08:41:09.231infoTriggered: Humidity of Downstairs Bathroom Temp(91.4) *changed*
app:8072025-01-28 08:41:09.208infoEvent: Downstairs Bathroom Temp humidity 91.4
app:8072025-01-28 08:40:09.188infoWait Event: Downstairs Bathroom Temp humidity 94.0
app:8072025-01-28 08:40:09.099infoAction: Wait for event: Humidity of Downstairs Bathroom Temp(94.0) is <= Family Room Motion(45.02) +15
app:8072025-01-28 08:40:09.091infoAction: On: Virtual Switch - Downstairs Shower Active (Command only switches that are off)
app:8072025-01-28 08:40:09.088infoAction: IF (Humidity of Downstairs Bathroom Temp(94.0) is > Family Room Motion(45.02) +20(T) [TRUE]) THEN
app:8072025-01-28 08:40:09.012infoTriggered: Humidity of Downstairs Bathroom Temp(94.0) *changed*
app:8072025-01-28 08:40:08.991infoEvent: Downstairs Bathroom Temp humidity 94.0
app:8072025-01-28 08:38:58.941infoWait Event: Downstairs Bathroom Temp humidity 95.2
app:8072025-01-28 08:38:58.853infoAction: Wait for event: Humidity of Downstairs Bathroom Temp(95.2) is <= Family Room Motion(45.02) +15
app:8072025-01-28 08:38:58.845infoAction: On: Virtual Switch - Downstairs Shower Active (Command only switches that are off)
app:8072025-01-28 08:38:58.841infoAction: IF (Humidity of Downstairs Bathroom Temp(95.2) is > Family Room Motion(45.02) +20(T) [TRUE]) THEN
app:8072025-01-28 08:38:58.766infoTriggered: Humidity of Downstairs Bathroom Temp(95.2) *changed*
app:8072025-01-28 08:38:58.745infoEvent: Downstairs Bathroom Temp humidity 95.2
app:8072025-01-28 08:36:58.505infoWait Event: Downstairs Bathroom Temp humidity 96.3
app:8072025-01-28 08:36:58.446infoAction: Wait for event: Humidity of Downstairs Bathroom Temp(96.3) is <= Family Room Motion(45.02) +15
app:8072025-01-28 08:36:58.433infoAction: On: Virtual Switch - Downstairs Shower Active (Command only switches that are off)
app:8072025-01-28 08:36:58.429infoAction: IF (Humidity of Downstairs Bathroom Temp(96.3) is > Family Room Motion(45.02) +20(T) [TRUE]) THEN
app:8072025-01-28 08:36:58.335infoTriggered: Humidity of Downstairs Bathroom Temp(96.3) *changed*
app:8072025-01-28 08:36:58.309infoEvent: Downstairs Bathroom Temp humidity 96.3
app:8072025-01-28 08:35:58.257infoWait Event: Downstairs Bathroom Temp humidity 95.1
app:8072025-01-28 08:35:58.155infoAction: Wait for event: Humidity of Downstairs Bathroom Temp(95.1) is <= Family Room Motion(45.02) +15
app:8072025-01-28 08:35:58.146infoAction: On: Virtual Switch - Downstairs Shower Active (Command only switches that are off)
app:8072025-01-28 08:35:58.143infoAction: IF (Humidity of Downstairs Bathroom Temp(95.1) is > Family Room Motion(45.02) +20(T) [TRUE]) THEN
app:8072025-01-28 08:35:58.082infoTriggered: Humidity of Downstairs Bathroom Temp(95.1) *changed*
app:8072025-01-28 08:35:58.061infoEvent: Downstairs Bathroom Temp humidity 95.1
app:8072025-01-28 08:34:27.908infoWait Event: Downstairs Bathroom Temp humidity 94.0
app:8072025-01-28 08:34:27.804infoAction: Wait for event: Humidity of Downstairs Bathroom Temp(94.0) is <= Family Room Motion(45.02) +15
app:8072025-01-28 08:34:27.796infoAction: On: Virtual Switch - Downstairs Shower Active (Command only switches that are off)
app:8072025-01-28 08:34:27.792infoAction: IF (Humidity of Downstairs Bathroom Temp(94.0) is > Family Room Motion(45.02) +20(T) [TRUE]) THEN
app:8072025-01-28 08:34:27.732infoTriggered: Humidity of Downstairs Bathroom Temp(94.0) *changed*
app:8072025-01-28 08:34:27.711infoEvent: Downstairs Bathroom Temp humidity 94.0
app:8072025-01-28 08:33:27.707infoWait Event: Downstairs Bathroom Temp humidity 92.2
app:8072025-01-28 08:33:27.627infoAction: Wait for event: Humidity of Downstairs Bathroom Temp(92.2) is <= Family Room Motion(45.02) +15
app:8072025-01-28 08:33:27.619infoAction: On: Virtual Switch - Downstairs Shower Active (Command only switches that are off)
app:8072025-01-28 08:33:27.615infoAction: IF (Humidity of Downstairs Bathroom Temp(92.2) is > Family Room Motion(45.02) +20(T) [TRUE]) THEN
app:8072025-01-28 08:33:27.535infoTriggered: Humidity of Downstairs Bathroom Temp(92.2) *changed*
app:8072025-01-28 08:33:27.513infoEvent: Downstairs Bathroom Temp humidity 92.2
app:8072025-01-28 08:33:13.039infoWait Event: Family Room Motion humidity 45.02
app:8072025-01-28 08:32:27.639infoWait Event: Downstairs Bathroom Temp humidity 90.6
app:8072025-01-28 08:32:27.404infoAction: Wait for event: Humidity of Downstairs Bathroom Temp(90.6) is <= Family Room Motion(44.88) +15
app:8072025-01-28 08:32:27.394infoAction: On: Virtual Switch - Downstairs Shower Active (Command only switches that are off)
app:8072025-01-28 08:32:27.389infoAction: IF (Humidity of Downstairs Bathroom Temp(90.6) is > Family Room Motion(44.88) +20(T) [TRUE]) THEN
app:8072025-01-28 08:32:27.311infoTriggered: Humidity of Downstairs Bathroom Temp(90.6) *changed*
app:8072025-01-28 08:32:27.286infoEvent: Downstairs Bathroom Temp humidity 90.6
app:8072025-01-28 08:31:27.236infoWait Event: Downstairs Bathroom Temp humidity 87.7
app:8072025-01-28 08:31:27.162infoAction: Wait for event: Humidity of Downstairs Bathroom Temp(87.7) is <= Family Room Motion(44.88) +15
app:8072025-01-28 08:31:27.150infoAction: On: Virtual Switch - Downstairs Shower Active (Command only switches that are off)
app:8072025-01-28 08:31:27.144infoAction: IF (Humidity of Downstairs Bathroom Temp(87.7) is > Family Room Motion(44.88) +20(T) [TRUE]) THEN
app:8072025-01-28 08:31:27.057infoTriggered: Humidity of Downstairs Bathroom Temp(87.7) *changed*
app:8072025-01-28 08:31:27.036infoEvent: Downstairs Bathroom Temp humidity 87.7
app:8072025-01-28 08:30:27.004infoWait Event: Downstairs Bathroom Temp humidity 83.8
app:8072025-01-28 08:30:26.928infoAction: Wait for event: Humidity of Downstairs Bathroom Temp(83.8) is <= Family Room Motion(44.88) +15
app:8072025-01-28 08:30:26.920infoAction: On: Virtual Switch - Downstairs Shower Active (Command only switches that are off)
app:8072025-01-28 08:30:26.914infoAction: IF (Humidity of Downstairs Bathroom Temp(83.8) is > Family Room Motion(44.88) +20(T) [TRUE]) THEN
app:8072025-01-28 08:30:26.828infoTriggered: Humidity of Downstairs Bathroom Temp(83.8) *changed*

My rule for a similar situation. Ignore the pause and resume.

1 Like

Thanks for the reply. This is a good alternate option. I may just go that way instead of messing with this.

1 Like

Another option would be to use the app...[APP] Smarter Humidity Fan *FORK for Testing*

I have used it for a while and it works well. It should do what you want it to do.

2 Likes

Just out of curiosity, I noticed that there is no use of a private (or other) boolean to prevent the rule from triggering repeatedly while the trigger event is true.

Maybe not such a big deal where the trigger is the conditional. But, if the trigger is any change in humidity, that rule is going to be running mulitple repeats. I wonder if that is messing with the wait on the first instance.

I use two required expressions in mine.

One is the non-fan light being on. We do not shower in the dark, but occaisionally, my better half gets in the tub to relieve leg cramps in the middle of the night. Then, she leaves the light off on purpose, and the fan is tied to another light. So, I do not want it turning on the light while she is trying to relax enough to get back to sleep.

The other is private boolean.

So, the logic is, if the non fan light is on, and it is not already running (private boolean), THEN if the humidity rises, it turns on the light that also turns on the fan.

I do not have it turn off automatically. But, I do have it reset the boolean after 30 minutes. Once I get some more testing done, I may have it turn off automatically. I am also removing the notification once I am done with playing around with it.

One odd note: The set private boolean false with delay was NOT working until I turned logging back on (Specifically for Actions). Tested it multiple times. Every time I turned off logging, and then checked an hour after running, the delay would not work and the boolean stayed true until I reset it myself.

3 Likes

Ya this is the problem. Once it turns on as the humidity falls the rule continues to trigger. You probably could change it from CHANGED to INCREASED and that may solve the issue for you as well.

Here is mine, it works good. I just put the booleans in it a few days ago when I saw all the retriggers that were in the logs.


Set a required expression for Bathroom humidity >= Family room with an offset of 20
Change the trigger to be Bathroom humidity < Family room with an offset of 20

Then remove the IF from the actions.
Pay special attention to the exact conditions for the required expression and the trigger above as it won’t necessarily work if you don’t use the same offset and >= for the RE and < for the trigger.

It's been running for two or three years without a need for a change.