🚿 Bathroom Humidity Exhaust Fan

Thanks. So it created code below in the automations.yaml.
I will only use the scripts for Fan Switch and Input - Fan Speed -Switch Off (Low for me as I also have Medium but will not use it)
So I do not use the Input - Fan Speed - Low as I never switch to Medium.
Should this fit?

- id: '1704451682xxx'
  alias: Bathroom Humidity Fan
  description: ''
  use_blueprint:
    path: Blackshome/bathroom-humidity-exhaust-fan.yaml
    input:
      trigger: sensor.bathroom_humidity_derivative
      fan_switch:
        entity_id: script.ventilation_high
      fan_speed_off:
      - script.ventilation_low
      bathroom_humidity_sensor: sensor.0x00158d0009ef8xxx_humidity
      include_fan_speed: fan_speed_off_enabled
      max_humidity: 97

Yes so what will happen is it will come ON at high then when done it will switch to low and stay on low. Never turn off the fan. Is that what you would like?

If that is what you would like then you would need to select this option in your settings.

Edit: I see you have done that.

Blacky :smiley:

Thanks for confirming!

1 Like

I have this automation working, (turns fan/light on) but it does not turn the fan off after humidity falling back to Derivative < -2. This is what I have set… Am I missing something?

@aarnaegg

Looks good of what I can see. Could you please provide us your YAML of the automation? This YAML code are the settings you have selected in the automation so I can help. To do this go into your automation, top right 3 dots, Edit in YAML, copy all the code, come back to the forum and in your reply at the top tool bar click on “</>” and paste code in there.

Blacky :smiley:

Hey - yeah, the ensuite derivative is set to report in minutes (have quadruple checked and recreated multiple times) but appears, based on that graph, to still be reporting in minutes. The actual sensor humidity % seems to be reporting ok though.

Bascially doent work as I assume its not reporting.

I may have to try swapping the sensor out - can’t find any other cause for the longer reporting time period…

Here is my configuration. I’ve been messing with it for a few days… Like I said, the fan (and now shower light) turn on. For some reason the automation is not turning the fan (and light) off when the humidity drops.

alias: Main Bathroom Exhaust
description: ""
use_blueprint:
  path: Blackshome/bathroom-humidity-exhaust-fan.yaml
  input:
    trigger: sensor.main_bathroom_humidity_derivative
    fan_switch:
      entity_id: switch.main_bathroom_exhaust_switch
    rising_humidity: 5
    falling_humidity: -2
    time_delay: 5
    time_out: 60
    light_switch:
      entity_id: light.shower_light
    light_time_delay: 5
    include_light_control:
      - use_brightness
      - use_colour_temperature
    light_brightness: 10
    light_colour_temperature: 2500
    include_manual_fan_switch: enable_manual_fan_switch_auto_off
    manual_fan_switch:
      - switch.main_bathroom_exhaust_switch
    manual_fan_switch_time_delay: 30
    include_lights: lights_enabled

Maybe I’m expecting this to work a way it doesn’t? So when the derivative humidity is above 5, the fan turns on. When it falls to -2 there is a 5 minute delay then the fan is turned off? If that fails, the fan turns off 1hr after the derivative humidity goes above 5 right?

Separately, if the switch is manually turned on, it turns off after 30 min?

@ajb538

Hi Alex, it is very strange, it sound like writing code and your missing one thing or spelt something wrong

Good thing is you have one working and the other one not… well maybe it is not a good thing, but at least you know it works and there is a gremlin in there waiting to be found.

If you like post both yaml of your automation. Tell me what one is working and what one is not. Then I will have a quick look at it for you.

Blacky :smiley:

@aarnaegg

Thanks for providing your YAML and asking the questions. It will also help others reading this.

I can see the problem now you provided your YAML.

You are using the fan switch entity in “Fan Switch” and “Manual Fan Switch” and this will not work.

What is happening; When the automation runs it turns on the fan switch that then turns on the manual control. So it will never turn OFF. Remove the entity (
switch.main_bathroom_exhaust_switch) from the “Manual Fan Switch” and disable manual fan switch. It should work :partying_face:

The “Manual Fan Switch” has to be independent and can’t be any fan switch entity including any fan speed.

Let us know how you go.

Blacky :smiley:

Ah I see. I’ll give it a try now. Thanks!
So if I have “Time Delay” under the top section set to like 30 minutes and I manually turn on the switch, will that also turn the fan off after 30 minutes?

No

If you would like manual control like I have here (Really nice to have) you have to have an independent switch and use it in the “Manual Fan Switch”. Then you use the auto OFF. If you look in the FAQ you will see my full set up and how I did it. These are the settings I have

You can try it by creating a toggle helper and put that toggle helper in “Manual Fan Switch” Then in the UI turn on the helper and see how it works. Good thing is you can also turn manual control on before your just about to have a shower that way you dont have to wait for the automation to kick in (as long as the sensor is directly over the exhaust inlet so it can read humidity) then the automation will cancel manual control and take over. Humidity never builds up and is one the reason I develop this. See my setup in the FAQ.

Blacky :smiley:

I am still struggling with the settings. Fan switches on but it does not switch off.

Als have a challenge which I don’t know how to deal with it.
When I have a shower, it’s fine that it switch off after 20 min. However, if two teenagers have long back to back showers, switch off should be significantly longer like 120 minutes.
Herewith the automation and a picture.

- id: '1704641979999'
  alias: Bathroom Exhaust Fan
  description: ''
  use_blueprint:
    path: Blackshome/bathroom-humidity-exhaust-fan.yaml
    input:
      trigger: sensor.itho_box_humidity_derivative
      fan_switch:
        entity_id:
        - script.ventilation_high
        - input_boolean.bathroom_fan_high_speed_toggle_helper
      fan_speed_off:
      - script.ventilation_low
      - input_boolean.bathroom_fan_low_speed_toggle_helper
      bathroom_humidity_sensor: sensor.0x00158d0009ef999f_humidity
      rising_humidity: 1.2
      falling_humidity: -1.3
      include_fan_speed: fan_speed_off_enabled
      time_out: 120
      include_max_humidity: maximum_humidity_enabled
      max_humidity: 65

What would be your recommendation for these two issues?

I see you have a scrip and a input boolean that looks to be in conflict. What one turns on your fan? Use just the entity that turns on your fan. This is normally your script.

Blacky :smiley:

Thanks, it switching off now!
Other question, what will happen when the fan switches off because off time delay but the humidity is still above max_humidity? Will it switch back on again or will it only switch on when the humidity raises above the max_humidity?
Trying to find a way of work for two teenagers having long back to back showers :blush:

Great blueprint! I also use your wakeup blueprint and there I have configured my fan perfectly with a preset value I can add myself. See screenshot. how can I do this in this Blueprint also? Thanks!

It has to cross over from low to high to trigger. Re humidity is still above; sensor location and how fast the sensor sends data. The humidity should drop when you turn the shower OFF + drying time should be enough time for the humidity to drop

This is the exact reason this was added, we do back to back here all the time and it works perfectly. But again sensor location and reporting time periods are critical. My humidity sensor reports every 60 seconds. The humidity slider only allows 95 % but I have mine set on 85 % now and has been working well. You just type the humidity in the text box and click save. Next update will allow a lower selection on the slider but again you can just type the number in and click save.

Hope you find your setting that works.

Blacky :smiley:

Nice one, glade you like it.

Blacky :smiley:

I’m already using a derivative helper with our bathroom fan. It’s used by a basic automation to turn the fan on for X time, but I’m going to give this blueprint a shot to see if it manages the humidity level in the room a bit more smartly.

The fan itself is dumb. I fitted a Shelly to the wall switch for the fan that retains manual operation and also allows automated switching.

Would the Shelly on my wall switch fit the “independent switch” criteria for using the manual control functionality of the blueprint?

FAQ - Why do you have a “Manual Fan Switch” and how does it work

This allows you to add a switch to turn the fan ON and OFF manually and still allows the automation to be triggered, taking control of your fan. This is useful in removing any unwanted fumes from deodorant, hairspray, toilet etc. There is also an auto off time delay in option 2 makes sure you never forget to turn the fan OFF.

The reason why we created the manual fan switch option.

We had a Shelly smart switch to control the fan. This gets entered into Home Assistant as one entity. The Shelly smart switch has an option to connect a physical switch on the wall were you can manually turn the fan ON and OFF. Most smart switches will do the same. The problem was you have to remember to turn the fan OFF or it will run until you turn it OFF manually or the automation runs to then turn it OFF. Because everyone gets use to the fan automaticity turning OFF it was always forgotten and the fan would run for hours.

You can use the Shelly physical switch but you cant enter it into the manual fan switch option because it is one entity (fan & switch). What happens is when the automation runs turning ON the fan / switch (same thing, same entity) you can’t have that same entity do something else as the automation needs to run free of conflicts. You will be able to turn the fan ON / OFF manually and if the fan is turned ON manually the automation will take control but you will never have an auto OFF (a fan timer) option and you cant enter in this switch into the manual fan switch option.

We then added the manual fan switch option where we could manually turn the fan ON and have it run for X amount of time to then turn OFF. In order for this to work the entity needed to be a different entity to the fan / switch (same thing, same entity). If we didn’t do this when having a shower the automation will run turning ON the fan / switch to then run the manual fan switch set of actions and turn the fan OFF in X amount of time. That is not good as we would like the automation to run the main set of actions. Because things do / can change form the original set up, we made the manual fan switch have two option. Manually turning it ON and OFF or being able to select an auto OFF option when you turn it ON + disabling it all together.

If you would like to use the manual fan switch auto OFF feature there are many ways you can do this. You will need to have an independent entity to the fan / switch. I personally use a ESP32 device that provides my, humidity sensor, LUX sensor, motion sensor, door sensor and manual switch. I then have a press button on the wall for the manual switch option. You can also use other smart switches that can give you a set of contacts to use in the manual fan switch, it is realy up to you and what you would like to do.

Hope this helps you better understand the manual fan switch option.

Enjoy

Blacky :smiley:

Back to FAQ: Click Here

1 Like

@P6Dave

Hi Dave, I am going to do a FAQ on it. It will be just above this post. If you have any further questions then just ask.

Blacky :smiley: