🚿 Bathroom Humidity Exhaust Fan

Great automation, works perfectly most of the time. Except the system reboot, it may trigger the automation, can you add that safe guard please?

@Frank16

Thanks for your suggestion, I will add it to the list.

Blacky :grinning:

1 Like

Hi thanks for everything. Can you help me out here, I don’t quite understand the numeric part in the faq. Specifically -

“ 1. The first shower’s initial increase is just below +5.0, and the ending is just above -5.0.
2. The second shower’s initial increase is around +7.0, and the ending is just above -5.0.”

In the derivative graph during the first shower it jump from 0% to 10%. But in your sentence it says +5. I’m sure the problem is me as I’m not understanding something somewhere, help me out please? :slight_smile:

@1a2a3a1q2s3c

It is the first jump (step) in the reading. Good to catch it on the first jump and trigger the automation.

Hope this helps you.

Blacky :grinning:

Thanks @Blacky . can i ask -

  1. for the decrease, do i catch it from the highest point to the lowest point or from 0 to lowest? (ie from your graph would that be -20 or -5?
  2. where is the option to stop fan? because my fan is a manual IR fan, i use a boolean helper to track its state. How do i use your blueprint and after fan is off, toggle the boolean off?

i just did a check again and my fan did not turn off and im not sure why.
in the fan switch, i input a boolean helper to toggle on once rising humidity is reached.
a separate automation is created for → when boolean helper toggle to ‘on’, wait for 20 mins then turn on real exhuast fan in bathroom.
another separate automation is created for → when boolean helper toggle to ‘off’, turn off real exhuast fan in bathroom.

for falling humidity i have set to -4% because during the 20 mins delay above, the humidity will drop to -3% so i didnt want it to turn off before even it turn on.

time delay set as 20 mins.
safeguard as 120mins.

rising humidity crosses threshold at 10.41am.
activity log show blueprint trigger at 10.41am.
boolean turn on at 10.41am.
automation for 20 mins delay to turn on fan triggered at 10.41am.

11.01am - real exhuast fan physically turn on as delay of 20mins has past.

as falling humidity has never been reached, based on the blueprint as my setting, it would mean that after 120mins, there will be a further of 20mins delay before fan turn on.

and the blueprint do not take into account of my own 20mins delay automation.

therefore the expectation from the blueprint would be -
at 10.41am turn on fan (boolean)
it will run for 120mins, therefore, at 12.41pm, it will trigger blueprint 20mins delay.
at 1.01pm, fan should turn off.

it is currently 1.15pm and the fan is still running. what am i doing wrong?

The Inovelli switch’s humidity sensor is flakey and gives unreliable readings. I have boosted the sample time to 5 mins in the derivative sensor to smooth it; but one more option that would help in the blueprint would be a “cooldown” timeout doesn’t trigger too frequently. Also would be nice to set times when it’s locked out (aka when nobody showers like the middle of the night). That would help me mitigate the false positives of the flakey sensor. Thanks!

@1a2a3a1q2s3c

The Fan

The fan is normally a switch the HA can turn ON and OFF. Your fan is a IR fan so how do you turn it ON and OFF in HA? The ?? to turn it ON goes into Fan Switch input and the ?? to turn it OFF goes into Fan Speed - Switch Off input. Then in summer and or winter mode under Use The Fan Speed Options you need to select 2 - Enable the fan speed - Turn off option.

For the rest update your fan as above then 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.

I will also need a screen shot of your sensors (humidity sensor and derivative sensor) when you have a shower like my one above. I then set up your starting code so you can copy and paste it in.

Blacky :grinning:

@sonoma9

Thanks for you suggestions.

Use the bypass 2 - Enable the bypass - Turn the fan, lights & automation link OF and use a schedule or time of day helper in the Bypass Switch.

Blacky :grinning:

hello. not sure what i did but i think i managed to get the fan to turn off. the fan turn off is not visible anywhere right? basically it will toggle the same ‘on’ button to ‘off’ in the fan switch input section?

anyway to answer your question - the fan IR switch is currently a script. the on/off is the same script itself. i created a helper (toggle common bathroom) and an automation that says when helper is toggle, trigger the script.
and because i needed a delay for the fan to turn on, in your blueprint, the fan switch, i have setup another helper (toggle helper for common toilet).

then another automation that says, when toggle helper turns on → delay 20 mins → then toggle ‘toggle common bathroom’ (the first helper above), to run the fan.

I have also inserted a manual switch. this is a physical click button. i think the automation runs fine but with this manual switch, it goes haywire.

Actually its all very confusing to me now and i think i got lost. perhaps we could restart? haha.

anyway code here

alias: Bathroom Humidity Exhaust Fan
description: ""
use_blueprint:
  path: Blackshome/bathroom-humidity-exhaust-fan.yaml
  input:
    trigger: sensor.common_bath_derivative
    fan_switch:
      entity_id: input_boolean.toggle_helper_for_common_toilet_exhuast
    rising_humidity: 1
    time_out: 45
    time_delay: 80
    bathroom_humidity_sensor: sensor.common_bathroom_aqara_fp300_humidity
    include_manual_fan_switch: enable_manual_fan_switch_auto_off
    manual_fan_switch:
      - input_boolean.common_bathroom_fan
    manual_fan_switch_time_delay: 20

in an attempt to better visualise/articulate, this is currently like this →

in your blueprint, Fan switch = boolean helper (helper A).
in your blueprint, manual fan switch option = option 2 and manual fan switch = boolean helper (helper B).

when rising humidity achieve, it will toggle helper A.

automation 1 → when helper A toggle from OFF to ON, delay 20mins Then toggle helper B.
automation 2 → when helper B toggle any state to any state, run script. the script is the IR code, which is to on/off physical fan.

i assume once falling humidity is achieve, blueprint will toggle helper A. (assuming time delay and safeguard has been taken into consideration). So for this, i created an automation 3 → when helper A toggle from ON to OFF, Then toggle helper B.

I have a physical button switch, lets call this automation 4 → when button single press, Then toggle helper B.

what am i doing wrong?

@1a2a3a1q2s3c

Looks like your getting very complex. With all these automations, delays etc your going to have test it and see what works best for you.

Blacky :grinning:

I have a central unit which extracts air from both the bathroom and kitchen. I’ve got humidity sensors in both rooms, so would like to activate it based on either of them. At the moment, I have your automation set up and working well with just the bathroom sensor. What’s the best way to achieve it based on either sensor? I stumbled across this post which I replied to, and wondered if that might be the way (even though I’m not using the toilet fan automation).

Thanks for this excellent blueprint, it works like magic!

I only have one small (and likely easily fixable) issue with it. When Home Assistant restarts, the humidity change derivative sensor switches from a numeric state to “unknown”, because it temporary does not have any previous measurements to calculate the derivative state from. AFAIK that’s a known issue with how derivative sensors work. Unfortunately for me it seems like this triggers the blueprint and turns the fan on.

For now I have solved this by creating a template sensor that reads the value from the derivative and returns 0 if the derivative sensor state is not numeric. This works fine, but seems hacky.

I think it should be fairly trivial to update the blueprint so it uses is_number() to determine if the derivative sensor value is numeric and assume it is 0 if not.

Blacky, what do you think?

Hello,
I was wondering if it would be possible to integrate a CO2 sensor (binary threshold) to force ventilation in addition to the humidity threshold ?

@botboy

I think you will have conflicts but maybe try using a group sensor helper then group both your Derivative Sensor. The try using that group in Trigger - Humidity Derivative Sensor. Not covenant it will work but you could try it.

Blacky :grinning:

1 Like

@TheBeeZee

I never had this happen and I restart HA a lot more than I should because I always developing. I would check this again and make sure it’s not something else.

Blacky :grinning:

@Canaletto

The only thing I can think of is to create a template binary sensor so when your CO2 sensor is above X then it will be ON. You then will use the template binary sensor in the bypass option 1.

Blacky :grinning:

I already have this in an automation where I combine the two (in filtered > threshold) for humidity and CO2. I was just wondering if you had planned for this combination option?

@Canaletto

Currently it is not planned but the bypass option will allow you to achieve what your after in one automation.

Blacky :grinning: