🚿 Bathroom Humidity Exhaust Fan

User error! Me getting confused with times :slight_smile:

1 Like

Hi @Blacky ,
i have a binary_sensor attached to my blueprint for the manual fan switch as below.

alias: Ensuite Humidity Exhaust Fan
description: ""
use_blueprint:
  path: Blackshome/bathroom-humidity-exhaust-fan.yaml
  input:
    trigger: sensor.ensuite_humidity_derivative
    bathroom_humidity_sensor: sensor.ensuitetempandhumidity_humidity
    fan_switch:
      entity_id: switch.ensuite_0_switch_0
    include_max_humidity: maximum_humidity_disabled
    time_out: 15
    include_manual_fan_switch: enable_manual_fan_switch_auto_off
    manual_fan_switch_time_delay: 20
    manual_fan_switch:
      - binary_sensor.ensuite_manual_fan_switch

however in noticed, there was warning in the homeassistant logs.

Logger: homeassistant.components.homeassistant
Source: components/homeassistant/__init__.py:169
integration: Home Assistant Core Integration (documentation, issues)
First occurred: 6:53:30 PM (1 occurrence)
Last logged: 6:53:30 PM

The service homeassistant.turn_off does not support entities binary_sensor.ensuite_manual_fan_switch

is this a known warning?

@jitesh_88

It’s a binary sensor, not a switch, so you can’t toggle it ON and OFF directly. Home Assistant can’t turn a binary sensor ON or OFF. If you need to control the state manually, consider using a toggle helper instead.

You can have a look at this blueprint. Copy paste the sensor id into the Target Entities To Track then create a toggle helper and add it into Manual Control Status - Toggle Helper. Then use that toggle helper in the manual switch if you need to use that binary_sensor.ensuite_manual_fan_switch

:stop_button: Manual Control Status Tracker

Blacky :grinning:

Thanks @Blacky for your response.
i followed the guide here and it said to use the binary_sensor in the Manual Fan Switch in Step 3.

Thanks @Blacky. Those changes worked great after a little tweaking on the humidity derivative. This is what I have now:

alias: Master EnSuite Bathroom Humidity Exhaust Fan
description: ""
use_blueprint:
  path: Blackshome/bathroom-humidity-exhaust-fan.yaml
  input:
    trigger: sensor.master_ensuite_humidity_derivative
    fan_switch:
      entity_id:
        - script.mvhr_set_boost_mode
        - input_boolean.mvhr_fan_boost_mode_helper
    rising_humidity: 1.8
    falling_humidity: -1.2
    time_delay: 15
    time_out: 35
    fan_speed_low:
      - script.mvhr_set_low_mode
    manual_trigger_winter_time_delay: 18
    include_automation_link: enable_automation_link
    include_fan_speed: fan_speed_off_enabled
    fan_speed_off:
      - input_boolean.mvhr_fan_low_mode_helper
    automation_link:
      - input_boolean.master_ensuite_bathroom_fan_automation_link_bypass
    include_bypass: bypass_disabled
    automation_link_time_delay: 2
    winter_rising_humidity: 1.4

Would you consider an option to pass a parameter to the script? This would allow me to consolidate the three scripts (low, normal & boost) into one. However, I’m not sure that’s even possible in a blueprint.
Anyway, thanks once again for a great blueprint!

Hello, I was looking at your automation and I was very impressed. I have a question if possible? I have 2 big powerful fans in my bathroom and I need 2 different way to put them on bypass and shut then down , i can only seem to use one,
I have 2 binary inputs on my HA, one is for Alarm set at night (to stop the fan from turning on when we part set the alarm) and the other is in the event the fire alarm set off it will turn everything off , is there a way of having 2 bypass options without breaking the code , I’ve tried it my self and it didn’t go very well. I would be very grateful of your wisdom and input with this one

If I’m reading this correctly, all you should need to do is put both of your existing entities into a group and then use that as your bypass entity.

1 Like

Many thanks for your reply, I’ve actually spent the last 2 days trying to get this to work and had no idea that you could group sensors together, (ive come from smartthings and getting my head around HA) I really, really appreciate your input and this is working perfectly now !!

Thanks very much for this excellent blueprint and sharing this great work@Blacky.

I have used this amazing blueprint for about 6 months to control one heat recovery ventilator (HRV), which brings in fresh air and takes out stale air, when humidity is high in 3 bathrooms and 2 kitchens in a 3 level house. The HRV is turned on and off by Shelly Plus 1 dry contact to behave like a fan in taking out humidity from the 3 bathrooms and 2 kitchens (5 different high humidity prone areas). I use Aqara Temperature and Humidity sensors in the 5 high humidity prone areas to monitor humidity levels. Each of the 5 different areas are used independently or concurrently by different people.

I do not know how to link the 3 bathrooms and 2 kitchen so that when one of 5 areas triggers an automation to run the HRV and to check other areas before ending the automation to stop the HRV. I have questions:

  1. Is it a way to include “conditions” in the blueprint to check derivative sensor helpers created for the 5 areas and humidity levels before stopping an automation?
  2. Is it a way to include “actions” in the blueprint so that an automation for each area can send “automation start” notifications and “automation end” notifications?

The Cover Control Automation blueprint has conditions and actions built in under “Additional Conditions” section with conditions and building blocks and under “Additional Actions” section with conditions and building blocks . Here is a link to it: ☀ Cover Control Automation (CCA) - a comprehensive and highly configurable roller blind blueprint

Please help me. Thanks once again.

@jitesh_88

Oh yes, I haven’t updated that FAQ and was a work around before I made the other blueprint. The problem with that code is you can’t use the auto OFF. Thanks for pointing that out
 I will need to fix that FAQ.

Blacky :grinning:

1 Like

@sota

If you create 3 toggle helpers (low, normal & boost) you can copy and paste the entity ID’s into the inputs of Fan Switch, Fan Speed - Low Speed Switch and Fan Speed - Switch Off. The automation will turn the toggle helpers ON and OFF. You then can use these states to pass a parameter to the script.

PS: Glad you got it working now!

Blacky :grinning:

@Nonny

Welcome to the community.

I understand what you’re saying, but please note I don’t fully know your entire setup, so I’ll base this on what I do see
 sorry if I am wrong.

It looks like you have one HRV (Heat Recovery Ventilation system) that is controlled by five separate automations. I’ll address your points 1 and 2 below. Again, this is based on what I can interpret from your setup.


:one: HRV Control - One Automation Instead of Five

Can you use just one automation to control the HRV, and group your Derivative Sensors and or your Humidity Sensors?

My thinking is:
One fan (HRV) = One automation, rather than One fan (HRV) = Five automations, which could lead to conflicts or overlapping triggers.

You can do this by creating sensor groups to remove conflicts:

  • Go to:
    Settings > Devices & Services > Helpers > Create Helper > Group > Sensor Group
  • Give it a name like: HRV Humidity Group
  • Under Members, add all your humidity sensors.
  • For Type, choose:
    • Most recently updated if you’re triggering based on the latest change (This is the one I think you may need), or
    • Maximum if you’re comparing peak humidity values.

If you decide to try this, I suggest disabling your 5 existing automations (don’t delete them just yet), then create and test a single new automation using the grouped sensor. I think this could simplify things, help avoid conflicts and achieve what your after.

If you have different maximum humidity thresholds for different sensors, it’s still possible, it just gets a bit more complex and will require a template sensors.

You can create a template sensor that evaluates logic like:

  • If Sensor A humidity is ≄ 80%, then set output to 90.1
  • If Sensor B humidity is ≄ 75%, then also set output to 90.1

Then, group these template sensors into a sensor group, and in your automation, simply trigger when that group goes above 90%.

This approach allows you to centralize your humidity logic and still use a single automation, even with varying thresholds for different sensors.

Just a heads-up, I’m doing this without testing, and these ideas are coming to me as I go. So if something doesn’t work as expected, please don’t be too hard on me! :pensive:


:two: Notifications & Trigger Tracking

Use my :round_pushpin: State Notifications & Actions blueprint.

You can continue to use whatever you’re using now to trigger the automation (I think it is your humidity sensors), but have one notification automation instead of multiple. The blueprint allows you to detect which trigger caused it, so you only need a single automation. If you have different maximum humidity thresholds then you will need multiple automations.

Check out this helpful FAQ for more info:
:backhand_index_pointing_right: Click here

Let us know how you go.

Blacky :grinning:

Thanks kindly for your detailed response. I would try your suggestions.

Also, you could use my first post as feedback should you decide in the future to improve on this masterpiece of a blueprint. Thanks a lot! Cheers!

@Nonny

No problem, if I got it wrong just ask again.

Sure, thanks for your suggestion.

Blacky :grinning:

I have had this automation up and running for about a year and it has worked flawlessly except for on thing. I have four separate fans with four sepeerate automations and they all get the same error on restart.

Logger: homeassistant.components.automation
Source: helpers/condition.py:1019
integration: Automation (documentation, issues)
First occurred: 6:01:43 PM (4 occurrences)
Last logged: 6:01:43 PM

<Error evaluating condition in ‘Master Bath Exhaust’: In ‘condition’ (item 1 of 2): In ‘or’ (item 3 of 18): In ‘and’ (item 1 of 2): In ‘template’ condition: UndefinedError: ‘dict object’ has no attribute ‘entity_id’
Error evaluating condition in ‘Cole Bathroom Humidity Exhaust’: In ‘condition’ (item 1 of 2): In ‘or’ (item 3 of 18): In ‘and’ (item 1 of 2): In ‘template’ condition: UndefinedError: ‘dict object’ has no attribute ‘entity_id’
Error evaluating condition in ‘Laundry Room Exhaust’: In ‘condition’ (item 1 of 2): In ‘or’ (item 3 of 18): In ‘and’ (item 1 of 2): In ‘template’ condition: UndefinedError: ‘dict object’ has no attribute ‘entity_id’
Error evaluating condition in ‘Master Commode Exhaust’: In ‘condition’ (item 1 of 2): In ‘or’ (item 3 of 18): In ‘and’ (item 1 of 2): In ‘template’ condition: UndefinedError: ‘dict object’ has no attribute ‘entity_id’>

Any ideas of how to solve this?

@Honkykong7777

Could you please provide us your YAML of just one automation as they are all the same? 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 :grinning:


alias: Cole Bathroom Humidity Exhaustalias: Cole Bathroom Humidity Exhaust
description: ""
use_blueprint:
  path: Blackshome/bathroom-humidity-exhaust-fan.yaml
  input:
    trigger: sensor.cole_bathroom_humidity_derivative
    fan_switch:
      device_id: dea63c28fb2c54f6c70b9c33c68f1176
    include_manual_fan_switch: enable_manual_fan_switch_auto_off
    manual_fan_switch:
      - input_boolean.cole_bathroom_humidity_toggle_helper
    manual_fan_switch_time_delay: 15
    month_winter_mode:
      - "1"
      - "2"
      - "12"
      - "11"
      - "10"
    include_winter_mode: winter_mode_disabled
    bathroom_humidity_sensor: sensor.cole_bathroom_humidity_switch_aht2x_humidity_2

description: ""
use_blueprint:
  path: Blackshome/bathroom-humidity-exhaust-fan.yaml
  input:
    trigger: sensor.cole_bathroom_humidity_derivative
    fan_switch:
      device_id: dea63c28fb2c54f6c70b9c33c68f1176
    include_manual_fan_switch: enable_manual_fan_switch_auto_off
    manual_fan_switch:
      - input_boolean.cole_bathroom_humidity_toggle_helper
    manual_fan_switch_time_delay: 15
    month_winter_mode:
      - "1"
      - "2"
      - "12"
      - "11"
      - "10"
    include_winter_mode: winter_mode_disabled
    bathroom_humidity_sensor: sensor.cole_bathroom_humidity_switch_aht2x_humidity_2

@Honkykong7777

Thanks! It looks like you’ve selected a device in the FAN input. To make things work correctly, be sure to expand the device and select the specific fan entity in all your automations. That should get everything working smoothly.

Here’s a link to my Sensor Light blueprint that shows how to expand down to the entity level: click here.

While the guide isn’t written specifically for this blueprint, the process is the same across all of mine
 and using the entity directly is the most reliable approach.

Blacky :grinning:

That fixed it! Thanks so much!

@Honkykong7777

Thanks for letting us know
Your welcome, enjoy!

Blacky :grinning: