🚿 Bathroom Humidity Exhaust Fan

No problem, hopefully HA can fix and or resolve this glitch.

Hi thank you for the blueprint!
Could you please tell me why there is no fan domain in the fan_switch part of the blueprint? :smiley:

Hi @Flagun

Glad you like it.

Fan domain? Yea good point :thinking:. I will do an update.


Blacky :smiley:

New update 1.4

Added fan domain into “Fan Switch” and “Fan Speed - Off Switch Option (Optional)”.


Blacky :grinning:

Thanks for this blueprint! Works great!
The only thing I found is, that if I turn the fan on manually, it won’t turn off unless I manually turn off the fan, or the automation runs and turns it off after the failsafe/falling humidity. It would be cool if the automation turned off the fan regardless of who turned it on. Maybe via a toggle in the blueprint?

Also, I’m wondering if it makes sense to also support a derivative sensor for temperature. I use an exhaust fan in my laundry room, and when running the dryer it gets kinda warm in there, but the humidity doesn’t really change all that much…

Love it, thanks for your kind words.

This can be a trap. If you turn the fan on manually the the humidity never get high (Rising Humidity) so the automation doesn’t run but if you forget to turn it off than it nice to have the fail safe. If you put triggers in for when you manually turn it on then you never get the falling humidity so then we need to look at time base actions and that is your fail safe we already have. If you have another setting for when you turn it on manually then the automation just see it has turn on and then you have a time based action and it will turn off when it normally should be runing… it is tricky one. Best to never turn the fan on manually, remove the wall switch if possible or tape it in the off position. If you tape it off position then if the sh_t hits the fan you can always remove the tape and turn it on.

Have a look at this blueprint I have Temperature Control Exhaust Fan. It could be what your looking for.

Edit: Yea I get your point I will do another blueprint for this.

Thank you Blacky for this great automation! I was wondering, if i wanted to add a music automation to play on my sonos speaker when this level of automation trigger power, what would be the best way to pair it with this blueprint? Does this blueprint have a state when the fan turns on/off so I could make a seperate automation based of the state of the fan in relation to this automation?

Hi @jkameldo

Firstly welcome to the community :partying_face:

Glad you like the blueprint. :+1:

You could use the fan on/off state but it will turn on and or off your music maybe when you don’t want that to happen :thinking: or maybe it will work if you can just play music in the bathroom.

Hey Blacky, or anyone else,

i am having trouble detecting the Fan-Off moment. The start detection works flawless as the %/min shoots up like a rocket, but as soon as the humidity reaches 100%, the helper calculates a derivative off of course. Then the slightest drop under 100% will cause the automation to trigger the time-out of the standard 20minutes. I tried to improve the sensitivity of the “falling humidity” all the way to -0.2%, but as you can see it still triggers way to early. I already tried to average the helper over 5minutes, hoping to make it less sensitive to the fall from 100%. I could adjust the time-out to much longer, but this is kind of the point of this automation. Any tips?

Hi @Markiempje525

all good :+1:

To me it looks like it is going off on the default “Safe Guard - Maximum Run Time” of 20 min. This is not a trigger just a time delay of when the fan turns on. The “Falling Humidity” trigger is around 11:45 and the fan is already off. The falling humidity trigger is a negative value.

The “Falling Humidity” trigger happened around 11:45. You can see the humidity is falling as well. Reset back to 3 minutes on the helper and set your falling humidity back to -1.

In your fan I can see “afziging light” is this a fan, or a light, or a fan and a light.

Can you confirm the fan is coming on?

If the fan is on, it looks like it not removing the steam. Can you confirm the steam is being removed.

If the steam is being removed then looks like the sensor is not reacting to the steam fast enough or something is happening with your humidity sensor. Maybe the humidity sensor is getting filled up with steam and it has to dry out. Check the position of the humidity sensor, maybe relocate it.

If the steam is not being removed is the fan big enough to do the job?

Check that as a start and let us know how you go.

Thx for the great response!

ill reset some values, maybe if i increase the time-out, it would wait for the falling humidity trigger.
You are right that the sensor quickly ‘fills’ with 100% humidity. The thing is that we have 2 showerheads and shower together, creating alot of extra humid air. If one person showers alone the humidity does barely touch the 100%. At this point the humidity of the bathroom has shown a 5x faster drying time compared to no mechanical ventilation. It might be too weak for 2 showerheads.
Yes, “afzuiging light” is a Sonoff relays that switches the fan on/off. It is turning on thanks to your automation.
I could also place it a little lower in the room, further away from the ceiling, maybe that could help too. Anyway, thanks for the responce again!

No problem. Remember if you need more time than 60min in the “Safe Guard - Maximum Run Time” just type the value in and click save.

For 1 shower head your fan needs to move around 120 to 150 litres per second of air volume.

Hope this helps.

PS: Happy to help if you need more assistance.

Blacky :smiley:

1 Like

Hi @pdawg17

I just had it again, lost the time window. I recorded my steps this time and I got the time window back.

  1. Updated to 2023.03.1. Lost the time window again.
  2. Add a derivative without the time window. then deleted it. Nothing happened.
  3. Restarted HA. Still nothing.
  4. Reboot system - HA. Time window shown again after reboot.

Just thought I would share this, as it may help. Maybe just follow these steps and see what happens.

Blacky :smiley:

1 Like

FWIW I noticed this awhile ago. Thought it was just me, but apparently a widespread bug. Derivative sensors — no more average over time option?

1 Like

I had the same problem creating a derivative - the adding/deleting/restarting didn’t work for me but it’s easy enough to add by editing the configuration.yaml file. For other noobs like me, just use the file editor to add something similar to the following, check the configuration for errors, then restart.

  - platform: derivative
    source: sensor.shower_sensor_humidity
    name: Shower Sensor Humidity Derivative
    round: 2
    unit_time: min
    time_window: "00:02:00"
1 Like

Hi @lk229 thanks for sharing you tip and your code I am sure it will help others. :+1:

If you have time could and you still can’t see your time window, could you try 2 things.

1/ Reboot your HA, not restart but a reboot and check options. If you are on the latest HA then it will be “settings/system/top right power button/advance options/ then reboot system”.

if that doesn’t work can your try

2/ Add a derivative sensor without the time window using helper. Then reboot your HA and check all options.

It will help HA resolve the glitch as this will be a hard one to find and maybe with all our help we can help HA.


Blacky :smiley: :+1:

Hi @Blacky -

My time window is now showing when creating a new derivative. Unfortunately, this means I can’t help debug in case anyone else is having this problem.

If it means anything, I did update to 2023.3.4 in between the problem appearing and now. Also, you made me realize that I hadn’t rebooted my RP4, only restarted HA.



Hi Lee, glad you got it working now. I have also done some testing and have found if you reboot your HA is will show up again. I have given my 2 cents worth to HA in this bug report (Click Here). Maybe they will take a look at it :crossed_fingers:.

I have create a FAQ for it.

Sometimes if a family member manually switches off the fan, it comes back on a few minutes later. Wife doesn’t like that after a pre-sleep shower…is there a way to have it not turn back on if manually switched off? Or better to just set a time window to have the automation run/not run?

It’s working great here, many thanks Blacky
Rg Frank