🚿 Bathroom Humidity Exhaust Fan

It starting to look better and you could probably work with that. So now just play with your delay time … it looks like the fan had a short delay time. What are your setting on your Derivative Sensor now as a matter of interest?

EDIT, did you change sensor location?

I did move the sensor to the exhaust fan housing. I think that helped.

Yeah, I think once you upgrade your sensor so your not reading every 5 min but every 60 sec or every change then you will find it will work a lot better. For around $10 to $15 US dollars I think it is money well spent and will save you a lot of time.

Did you change any settings on your Derivative Sensor?

Yes I changed it to 6 minutes. Seems to work better that way so far.

Can the Xiaomi Bluetooth sensor display the temp in Fahrenheit with your custom firmware? It doesn’t look like the default setup will do that.

Yes you can have Fahrenheit on the sensor and in HA

Edit: If you get some I would say get 5 + you will use them. I have one in my fridge, outside, kitchen, family room, bedrooms, laundry, etc. Once you get them it is nice to have. My battery’s lasted over a year. My Atom Lite (ESP32) that runs my humidity sensor for the exhaust fan is also a Bluetooth hub thanks to HA that they connect to.

New update 1.5

A lot that has been added to this new release. Hope you like it.

New Features :new:

  • Added a selection option to use the “Fan Speed - Switch Off Option”. Note: If you are using “Fan Speed - Off Switch Option” then you must now select to enable this option for it to work. It is the same function as before just the description has change and you must now enable it.

  • Added a maximum humidity option to turn the fan ON. When using this option make sure you input your humidity sensor.

  • Added winter mode settings.
  • Added options for lights. If you have selected to use lights before in “Fan Switch” and they are a light entity then you will have more options for lights. It is recommended to remove them from “Fan Switch” input and add them now to the light options. If you have lights that are a “switch” entity then just add/keep your switch entities for your lights in “Fan Switch”.


Blacky :grinning:


Just found out about this blueprint, and figured someone might benefit from my two cents which solves the needing different seasonal baselines as well as potential false positives from organic large changes in humidity. Apologies if this has been covered before - I tried to read through the thread but I may have missed something skimming.

Because I have many humidity sensors (every motion sensor and every thermostat) I have a pretty good representation of the median humidity across my house. This gives me an excellent baseline to know when humidity for one bathroom differs significantly from the rest of the house. I created a helper sensor for the median humidity, and then derivative sensors for both the median humidity and bathroom humidity sensors. I then used these to create template sensors to calculate the difference between the derivative of humidity for a given bathroom vs. the median humidity overall. If this delta is positive of a certain magnitude for a certain period of time, I turn on the fan. If this delta is close enough to 0 for a certain period of time, I turn the fan off.

Here’s an example config for the delta template sensor:

 - platform: template
         friendly_name: "Master Bathroom Humidity Difference"
         value_template: >
           {{states('sensor.change_in_master_bathroom_humidity')|float - states('sensor.change_in_household_humidity')|float}}
         unique_id: sensor.master_bathroom_humidity_difference
1 Like


Thanks for the info. I have been toying around to have an option to use a reference sensor. But it has never work well enough or I haven’t nailed it yet for me to include it in this blueprint.

Have you tried using this blueprint as is?

Blacky :smiley:

1 Like

Hey @Blacky. I have just installed this blueprint (after taking an obligatory shower to start recording derivative stat patterns). I have also seen (and imported but not yet setup) the Temp Control Exhaust Fan and Toilet Control Exhaust Fan. Do all 3 of these automations conflict with each other if you try and run them for 1 room? I currently have a NR workflow setup but it is pretty complex (and doesn’t do temp control) and it would be nice to move over to automations like the amazing work you have created in all 3 of these.

My own environment setup is an ensuite bathroom, with shower, toilet and sink. The exhaust fan was a continuous running fan that was controlled by light switch (ensuite light off and the fan would run in lower power mode, turn the light on and it would run high power mode). About a year ago I added a Shelly 2.1 into the mix and an Aqara humidity sensor. I can now control each of the high and low speed fan as and when I want rather than it running all the time which means night time no fans run anymore unless someone either uses the toilet or shower and even then, once humidity/time is down to a level I want the fans turn off.

Also, would the ‘Humidity Derivative Sensor By-pass’ be something like an automation enable/disable switch/input_boolean? The FAQ shows a question on how to set this up but no answer. I am guessing it is for overriding the automation - eg each and every automation I have in the house can be overridden with an input_boolean for the given task such as don’t turn the lights on for a given room when it is dark


Hi James

I would say yes but it will just depend on what is happening.

This is on the road map ahead.


There is a bigger roadmap ahead that I am sure you will like without say to much.

For your lights have a look at my :bulb: Sensor Light blueprint

1 Like

@Blacky thank you for the answer. I will configure the other 2 for now and see how it all interacts.
The bigger roadmap sounds very interesting though :slight_smile:

Thanks for the tip regarding the lights however I don’t have control over those for the ensuite and they are dumb lights. The Shelly only controls the fan based on a seperate feed from the light switch which is what used to make the fan high power or low power depending on current.
EDIT: DOH! My mistake, I see what you mean about the light automation. Might be of use elsewhere around the house as long as I can work in the house modes into the automation ( I run house modes of away, night, evening, midweek, morning midweek, weekend, morning weekend)


It will be interesting on how it goes. I have never tried or have never run any tests. Let us know how you go.

I am developing something now, but I like to test it and use it before I release it.

Very interesting

1 Like

@Blacky sure will let you know how all 3 fan automations work together :slight_smile:

I would certainly be up for testing when you are ready for testers.

I have just configured the ‘Toilet Exhaust Fan Automation’. One suggestion if I may, for greater control and consistency between bathroom humidity automation and toilet automation (not configured the temp automation yet) - would it be possible in a future release of toilet automation to add ‘Fan Switch’ option from humidity automation to toilet automation by replacing ‘Fan’ as a single option? Thereby allowing more than 1 fan entity/device to be selected. Reason I ask, and I know I can create a script or new switch sensor, is with the Shelly, to get high speed fan working the low speed fan needs to be switched on; if low speed is not on high speed will not come on even though the state of high will be showing as on (its a pain in the butt and I havent gotten round to creating a script or sensor if I am honest but just thought it might be good for consistency between automations to have the same option control)

Humidity automation:

Toilet automation:

Also, a trigger sensor bypass in the toilet automation would help for consistency (I see that option is in humidity and temp automotions)

I will PM you with the update you would like.

1 Like

@Blacky yes please :slight_smile:

Just developing now and I will do a quick test.

Edit: Check you messages, all done

1 Like

Im using a Ducobox with a Open Air Mini including a humidity sensor. How can I use/change this blueprint so I can have the fan idle on 30%, set the speed to 100% when somebody is using the shower and after the humidity reaches the desired level set the fan speed to 30% (for example)?

I don’t use Ducobox but it looks like a realy nice product. The “Fan Speed - Switch Off Option” was developed for the Itho box and I think this is a similar product.

With your Ducobox if you have an entity in HA that set the speed to 100% then you would put this into the “Fan Switch”. Then if you have an entity that set the speed to 30% then you would put that into the “Fan Speed - Switch Off Option” and enable this option. Because I don’t use or have a Ducobox I am not sure if it has these entities in HA. If it doesn’t have them then you could create them probably like a fan speed switch where ON = 100% and OFF = 30%.

PS: Just make sure if it is the one fan that you can’t turn 100% ON at the same time as 30%, so it would have some type of interlock that will only allow one of the two entities to be ON at any given time.

Blacky :smiley:

I will give this a try. thank you

New update 1.6

:warning: You will need to do something in this update. See below “Clear Home Assistant Restart YAML”.

New Features :new:

  • Home Assistant restart built in, no more selection required. You will need to clear the old HA restart yaml, see blow. The restart feature now has a lot of extra features built in that will check your automation for you.
  • By-pass upgrade. There are more option to choose from.
  • By-pass auto OFF feature. You can now set the by-pass to automatically switch off. It can also be used as a timer to turn the fan ON and then OFF if you have chosen to use “Enable the By-pass - Turn fan ON”.
  • It now can also work with my just released new blueprint :infinity: Sensor Light Add On - Media & Movie - House Alarm - Fire Alarm + More. If you have smoke detectors connected to HA, the blueprint add on can now disable this blueprint automations and turn your exhaust fan ON including lights when the smoke detector is activated. It is all done through the by-pass hence the by-pass update.

:construction_worker_man: Clear Home Assistant Restart YAML :construction_worker_woman:

To clear your HA restart yaml please follow these steps. This is only required if you are updating the blueprint.

1 - Update you blueprint and open your automations.

2 - Click on the 3 dots top right.

3 - We are looking for the code , “ha_restart” and “include_ha_restart” as shown below. If you don’t see this code then you are all good, no need to do anything further.

4 - If you see the code then delete it, click save then the 3 dots and “edit in visual editor”.

5 - Your all done.

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:


Blacky :grinning: