🚿 Bathroom Humidity Exhaust Fan

@fumantsu

Yes you can use the bypass option 2 and use a schedule helper.

Blacky :smiley:

1 Like

@GTunney

Your code is correct that is all you need to do.

Blacky :smiley:

If anyone’s coming here about the legacy syntax error, I think this is the updated code:

template:
  - trigger:
      - trigger: state
        entity_id: switch.master_bathroom_exhaust_fan
        to: "on"
        id: "t1"
      - trigger: state
        entity_id: switch.master_bathroom_exhaust_fan
        to: "off"

    binary_sensor:
      - name: "Manual Fan Switch"
        icon: mdi:fan-clock
        state: >
          {% if trigger.id == 't1' and trigger.to_state.context.parent_id is none %}
            on
          {% else %}
            off
          {% endif %}

Based on:
https://whatarewefixing.today/1705/how-to-migrate-home-assistant-2024-8-2024-10-yaml-changes/

If I take a shower and the fan automatically turns on and then the fan turns off after it reaches the time out value that I set, but the humitidy is still above the limit of 95% that I have set to always turn on at, do I have to wait until the humity goes below 95% and back up past 95% to turn back on (which seems to never happen). I think when it it is above 95%, HA automation is not triggered. Is there something i’m doing wrong?

@loumarjr

Hi Louis, in order for the humidity to trigger the automation it must go from below to above.

Depending on where you live the humidity should drop below 95% before the fan turns OFF and make sure a time delay runs long enough for this to happen.

The Safeguard - Maximum Run Time should be long enough for you longest shower + some time to allow the humidity to drop.

Blacky :smiley:

@Blacky It seems that every time the automation finishes I get a Switch.turn off followed immediately by a switch.turn on. Any thoughts where I may be going wrong?

@melewis1975

Welcome to the community.

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:

alias: Shower Extract Fan
description: ""
use_blueprint:
  path: Blackshome/bathroom-humidity-exhaust-fan.yaml
  input:
    trigger: sensor.shower_derivitive_humidity_helper
    fan_switch:
      entity_id: switch.shower_extract_fan
    include_manual_trigger: disable_manual_trigger
    include_manual_fan_switch: disable_manual_fan_switch
    time_out: 30
    include_max_humidity: maximum_humidity_disabled
    max_humidity: 100
    rising_humidity: 2
    falling_humidity: -1
    time_delay: 5

@melewis1975 Welcome!

I spotted your screenshot, showing the ‘off then on’ status of your fan switch, and it reminded me of a problem that i used to have when i started with this automation.

What physical device are you using for your switch.shower_extract_fan - it’s not a Sonoff ZBMini or similar is it?

@Blacky Hey, is it possible to integrate a time parameter for a restart lockout when the fan is running into the blueprint? The background to this is that if I apply the Blueprint to a dehumidifier, it must be off for at least 10 minutes between starts.

Is that possible?

Thanks :slight_smile:

I need to do a simple thing: I have a window with a sensor. I want the fan to turn on ONLY when the window is open. So the humidity in the bathroom increases and the fan starts (window open) I close the window - the fan stops. I open the window and it is still humid in the bathroom, the fan turns on. Is it possible using this script?

@Scoff yes the fan is switched by a Sonoff ZBMini.

@melewis1975 I had a very similar experience using a zb mini to start with. I would constantly see my zbmini turning off then instantly back on, or, more annoyingly, when triggered either manually or via automation, it would switch on, then instantly back off again. This resulted in showers where the fan wasn’t running and became very frustrating! I tried a second zbmini, and had the same problem with that one also. For example:

I could only put it down to the zbmini not being able to handle the inrush current when my extractor fan energized, so the ‘switch on’ would instantly ‘bounce’ and go back off again.

My fan is a Manrose 5 inch MF125S, which i didnt think would have generated much inrush current, but was enough to cause the zbmini problems.

I fixed the issue entirely by removing my zbmini and changing to a Shelly 1Plus PM smart relay, with an RC Snubber attached across the L and N terminals of my fan, and not a single issue since. Its worked flawlessly for months now.

2 Likes

@R_A_L_F

Currently there is no lockout. Maybe look at my :thermometer: Temperature Control Fan as I know a few people use it for dehumidifier. Even though it says temp it will work of humidity. In Fan Mode you probably select Fan and then use Basic Mode. this way you have a Rising Temperature or for you a rising humidity and a Falling Temperature or falling humidity and you can set a dead ban so it wont turn ON to quick once it is OFF. Example

Rising Temperature (AKA rising humidity) = 70% turn ON.
Falling Temperature (AKA falling humidity) = 50% turn OFF.

Gives you a 20% dead zone… then you may not need a lockout :wink:

Hope this helps.

Blacky :smiley:

@Starfirepl

Welcome to the community :wave:

You could use the bypass for this but you would need to invert the window sensor. To do this you would create a template binary sensor so when the window is closed the template binary sensor is ON and when the window is open the template binary sensor is OFF. You would then use the template binary sensor into bypass option 2.

To create a Template binary sensor, follow these steps:

  1. Navigate to Settings > Device & Services > Helpers tab at the top.
  2. Click the Create helper button.
  3. Select Template and then choose Template a binary sensor.

Next, provide a Name and Device class of your choice. If applicable, you can link this template to an existing device so it appears under that device’s details.

In the State template field, add the code below, replacing binary_sensor.your_window_sensor_here with your window contact sensor entity ID.

{ is_state('binary_sensor.your_window_sensor_here', 'off') }}

Hope this helps :smiley:

Thanks for your reply :slight_smile: .

The purpose of the lock is to prevent the compressor (dehumidifier) from having to start
start against the (still too high) pressure in the system. The manufacturer therefore recommends a time of 10 minutes between the last stop and restart. Regardless of the level of humidity.

I would also like to run the dehumidifier when there is a PV surplus from the sun, as I can then use the surplus electricity to additionally dehumidify the room.
I hope you understand what I mean :slight_smile:
How could I realise something like this in combination with the Blueprint?
Sorry, I am unfortunately new to HA :wink:

Blacky this doesnt work : when window is open my sensor is off when window is close my sensor is off too.
i use Your code :

{ is_state('binary_sensor.kitchen_window_sensor', 'off') }}
{ is_state('binary_sensor.your_window_sensor_here', 'off') }}

is missing a curly bracket at the start. It should be

{{ is_state('binary_sensor.your_window_sensor_here', 'off') }}
1 Like

You may be better off to create a custom automation. It seams simple what you are trying to do but I think it is really a custom automation as now you would like it to run when your have extra PV surplus.

Maybe ask the question creating a new topic on what you would like to achieve on this forum and I am certain someone will jump in to help you achieve your goal. There are a lot of good people here.

Blacky :smiley:

@Starfirepl

As @P6Dave suggested… thanks Dave.

Blacky :smiley: