🚿 Bathroom Humidity Exhaust Fan

Maybe in need to change my request to Ninja mode :thinking: :smiley:

So, I’ve created two scripts for turning the fan on and off, but I notice that it doesn’t always work properly. Today, the fan didn’t turn off. I’ve added a few repeats now to verify that the action has been executed. So, I suspect that this isn’t an ideal situation.

@Hert I will PM You

Thanks for this blueprint!

I can’t seem to figure it out. I have a Fan with 4 presets (Low, Medium, High, Auto). Is it possible to setup this blueprint in such a way that on ‘On’ it switches to ‘High’ and on ‘Off’ it switches to “Auto”.

I’ve tried creating a input helper (boolean) which triggers an automation doing the above. But I can’t select a boolean in the On (or Off) fields in the blueprint.

Edit: Never mind, I now use a script instead of a helper.


You would do it like this

I think you will like the next update.

Blacky :smiley:


Yes, I’ve done it this way now via Scripts. But would be nicer if I can set the fan.preset_mode from within the blueprint self. Looking forward to a new update!

New update 1.9

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

New Features :new:

  • Multiple Fan Speed Control - If you are using a fan with multiple speeds, you can now select 2 different speeds. We have called them “High” and “Low” but your selection could be “Med - Low” or “High - Med” etc. Before you could only turn OFF a multi speed fan, now you can select to run on high speed for X amount of time to then run on low speed for X amount of time, then turn OFF. You can also select to have different options for summer and winter, as in winter it could be advantageous to run the fan for a longer time period on low speed and in summer you could just turn it OFF :partying_face:
  • Lights Time Delay - If using the lights options you now have a separate time delay for them. This was added as you may not need the lights ON the entire time the fan is running :wink: :+1:

Bugs Fixes :bug:

  • Turn OFF By-pass, the rising humidity is above set point and fans / lights (if enabled) are off? Fans and lights (if enabled) will now turn ON.
  • HA restart - If rising humidity is above and fans / lights are off, fans and lights (if enabled) will now turn ON.

:warning: BLUEPRINT CODE UPDATE :exclamation:

Just a heads up if your still on a old HA version before you update.

From time to time Home Assistant update their code structure and the old code will become “DEPRECATED” stopping / breaking automations from working. It effected this blueprint about 4 to 6 months ago. I wanted to wait some time so everyone had a chance to update their HA version before updating the code as older HA versions can not run the new code. This blueprint has now been updated so it will still operate once HA remove the “DEPRECATED” code from their system. :wink: :+1:

:construction_worker_man: Clear “input_fan_speed_off” YAML :construction_worker_woman:

To clear your HA “input_fan_speed_off” YAML please follow these steps.

1 - Update you blueprint and open your automations.

2 - Click on the 3 dots top right.

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


or like this


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

5 - If required, select your options for fan speed control again under summer and winter settings. If you are using low speed then you will have to input for low speed switch. Then click save.

6 - 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:

1 Like

I don’t get it…
I have physical switch (Aqara) which activates fan on or off (separate simple automation > when button is pressed > toggle fan). Do I still need to create this helper?

Hi @Wojtas , and thanks for asking the question :+1:

The “Humidity Derivative Sensor By-pass” is a by-pass and not to be confused with a “Derivative Sensor Helper”.

This link will walk you through setting up a “Derivative Sensor Helper” and is on our FAQ, Click Here.

Once you set this up it is recommended that you also follow the “automation settings” in the FAQ , Click Here.

It is a bit to get your head around it but once you set it up correctly I believe you will love it.

If you have any problems, make sure you reach out again. Let us know how you go.

Blacky :smiley:


thank you for your automation, i got it to work.
However, there is one strange thing.
The derivate sensor calculates the percentages divided by ten. So 1% rv rising, is 0.1% rising in the sensor. To clarify see the pictures.

Now i let the fan turn on at 0,1% so it works, but actually it is 1% What did i do wrong whit the derivate? i made it twice folowing exactly the steps.


Hi Roy, thanks for the question.

Looking at the screen shot looks like you “bathroom RV” sensor is not reporting enough values. I have my humidity sensor reporting a value every 60 seconds. Can you confirm how often your humidity sensor report its value to HA. We need it to be fast and the helper has a time window of 3 minuets (if you set it up like this) so we need a few samples in the window. Don’t worry about building up data as HA automatically purge this data after a period of 10 days (default is 10 days). If you can make your bathroom RV sensor report at least every minute regardless.

I have my card in my dashboard show 2 hours as it also helps me keep a close eye on what it happening.


If you could just tell if I need to create this bypass switch if I have physical switch :slightly_smiling_face: I don’t get it sorry…

hello, i changed is to 60 seconds. But how does that change the percentage calculation?

If you have a physical switch you can use it as long as that switch doesn’t control the fan. Example;
If you use your “physical switch (Aqara) which activates fan on or off” then HA looks at the fan being ON or OFF. So if the automation turns the fan ON it is like turning the by-pass ON at the same time and the automation will never work. It will turn the fan ON (turn the switch ON, Fan ON, By-pass ON, same, same) then depending on your by-pass selection it will then run this part of the automation. :-1:

No you can’t use your "physical switch (Aqara) which activates fan on or off " as the by-pass.

Blacky :smiley:

Nice, can you let us know if this resolved it as this is what I could see from the information you provided. If not can you provide a screen shot of your derivative settings and a 2 hour window of your sensors graphs.

It is probably best explained on the HA web site.

it completely stopped working… starting new.
keep you posted.

Great blueprint! Works like a charm!

The yellow bar on top is based on the heater hot water signal. I have a 10 second interval humidity sensor, that helps of course when working with derivatives. Sensor is away from the shower, close to the fan inlet.

Oh no that’s not good. It is a bit tricky to set it all up… once you do I think you will realy like it.

Blacky :smiley:


Thanks for you kind words and sharing your positive experience. :+1: :+1:

10 second interval looks realy good. Great set up… the graphs look perfect and I can see you have a 2 speed fan!

Hopefully more people like you will share their positive experience to!! :+1:


Blacky :smiley:

Is there a way to add a time window for the automation? I don’t want it to run between 11pm and 5am

So i have been using node red for this and i have just tried this blue print but I can’t get it to run, not via the trigger or when manually selecting run. My entities are correct, derivative sensor is working. here is the yaml:

alias: Bathroom Exhaust Fan
  path: Blackshome/bathroom-humidity-exhaust-fan.yaml
    trigger: sensor.bathroom_humidity_helper
      entity_id: switch.bathroom_fan
    rising_humidity: 0.5
    falling_humidity: -0.5
    time_delay: 3
    include_max_humidity: maximum_humidity_enabled
      - "6"
      - "7"
      - "8"
    winter_time_delay: 2
    bathroom_humidity_sensor: sensor.bathroom_humidity

Have I missed anything?