🚽 Toilet Exhaust Fan - Time Delay - Trigger Wait Time - Time

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

GitHub Link

:toilet: Let it go, let it blow - Enjoy a breath of fresh air with your smart fan control :poop::seedling:

Like this blueprint? Consider hitting the :heart: button below :+1:

Version: 2.5 :fire:

Need help? :eyes: See our FAQ: Click Here

:newspaper: The Automation Process:

  • Triggering:
    • When a light is turned ON or a binary sensor is activated, it will turn on the exhaust fan.
    • If the trigger is activated again before the time delay ends, the automation resets.
  • Time Delay:
    • When the light is turned OFF or the binary sensor is clear, a time delay is activated, which automatically turns the exhaust fan OFF.
  • Invert Trigger Option:
    • The option to invert the trigger allows the exhaust fan to turn ON when the light is turned OFF.
  • Trigger Wait Option:
    • This setting is ideal for instances when the fan isn’t necessary during a brief use (e.g., for a short visit), but for longer use (e.g., for an extended visit) that typically requires the fan, the light being ON for a set amount of time will prompt the fan to turn ON.
  • Manual Fan Switch Option:
    • Provides independent control over the fan (ON/OFF) while maintaining automation trigger.
    • Opt to use the auto-off feature for manual control.
  • Time-Based Options:
    • Specify precise start and end times along with weekday selections to define when the automation should run.
    • This is a good option if you would like to disable the fan at night when everyone is sleeping, so the fan noise doesn’t wake anyone up.
  • Bypass Options:
    • Use “Bypass Options” for manual bypassing of trigger sensors, providing manual control and additional customization.
  • Custom Conditions:
    • Enter any custom conditions to further customize the automation process.
  • Blueprint Add-On Integration:
    • :shower: Bathroom Humidity Exhaust Fan - Step into the future of freshness - customize it your way and let the automated fan system handle the humidity control for you!
  • HA Restart Safeguard:
    • An option for safeguarding the automation process in case of a Home Assistant restart.

:rocket: CHANGELOG

Version: 2.5 - 19 April-24 Invert mode can now use wait time. New layout. Bug fix when by-pass invert mode.
Version: 2.4 - 28 Jan-24 Bug fix when by-pass turns OFF.
Version: 2.3 - 18 Jan-24 Added logic to manual fan switch.
Version: 2.2 - 16 Jan-24 Update logic on manual fan switch.
Version: 2.1 - 13 Jan-24 Added manual fan switch and global conditions options. Maintenance items. fixed bugs in by-pass and inverted trigger option.
Version: 2.0 - 10 Oct-23 Added a HA restart option.
Version: 1.9 - 8 Oct-23 Trigger wait time now works with inverted trigger.
Version: 1.8 - 8 Oct-23 Added by-pass options.
Version: 1.7 - 31 March-23 Bug fix when using “Trigger Wait Option”.
Version: 1.6 - 30 March-23 Added an option to invert the trigger.
Version: 1.5 - 28 March-23 Update to include any domain.
Version: 1.4 - 26 Jan-23 Added weekday selection.
Version: 1.3 - 14 Jan-23 Added “Trigger Wait Option” & “Time Option”
Version: 1.2 - 7 Nov-22 Update description and wording.
Version: 1.1 - 23 Oct-22 Initial release

:shield: MY OTHER BLUEPRINTS

:bulb: Sensor Light - Motion Sensor - Door Sensor - Sun Elevation - LUX Value - Scenes - Time
:infinity: Sensor Light Add On - Media & Movie Lights - House Alarm Lights - Smoke Alarm Lights & Exhaust Fans + More
:shower: Bathroom Humidity Exhaust Fan
:low_battery: Low Battery Notifications & Actions
:vibration_mode: Appliance Notifications & Actions - Washing Machine - Clothes Dryer - Dish Washer - ETC
:loudspeaker: Notifications & Announcements
:calendar: Calendar Notifications & Actions
:round_pushpin: State Notifications & Actions
:hourglass_flowing_sand: Entity - Run ON Timer
:stopwatch: Trigger - Run ON Timer
:gear: Turn Light, Switch or Scene On & Off with Trigger Conditions
:magic_wand: Manual light control with auto OFF
:door: Closet, Pantry, and Cupboard Lighting
:timer_clock: Timer
:thermometer: Temperature Control Exhaust Fan
:snowflake: Temperature Control Exhaust Fan - Inverted
:eight_spoked_asterisk: Toggle Switch - Turn ON & OFF Entities
:nazar_amulet: Press Button - Turn ON & OFF Entities
:on: Switch - Turn ON & OFF Entities

Like this blueprint? Consider hitting the :heart: button below :+1:

20 Likes

Would be great to combine this with a humidity exhaust option to have both common use case in 1.

1 Like

@homelord

Humidity gets a bit tricky. I have a different blueprint for “Bathroom Exhaust Fan” it turns on a fan when humidity increases.

What is your scenario?

@Blacky I saw today your blueprint and find it a nice idee. But is it possible to turn the fan only on if the light is longer then 2 minutes on?

Hi @daschmidt

Thanks for your kind words, glad you like it.

Good idea I will add this option to the blueprint! :grinning:

Working on it now.

1 Like

Hi @daschmidt

Sorry for the delay. I have done all the code and just testing it now. I will upload it once all the testing is done.

FAQ

Q: Can we link the Toilet Exhaust Fan blueprint with the Bathroom Humidity Exhaust Fan blueprint as my bathroom has a toilet and a shower?

A Yes, please follow these steps Click Here.

Q: I am using the inverted trigger option and every time I turn OFF the by-pass the fan comes ON. Can I stop this from happening?

A Yes, use the wait time. If you would like it to work without waiting then set this time to “0”. This will stop the fan coming ON when turning the by-pass OFF and using the inverted trigger option.

Q: I am using a motion sensor and the trigger wait time but the fan never comes ON? or, I am using a motion sensor and the trigger wait time but the automation is not working correctly?

A Motion sensors tend to go ON and OFF (detected and clear) in a short time period. The trigger wait time requires the trigger to be ON and remain ON for a set amount of minutes before it will turn the fan ON. The trigger wait time is best suited when using a trigger like a light or a sensor that remains ON until you leave the bathroom. If you are keen to use some type of motion sensing maybe try using a presence detectors or maybe have a short delay OFF in your motion sensor.

Q: I would like to set a different value but the slider is not letting me?

A Just simply type the number value you would like in the field and click save. A red line will appear under the number you have entered but once you click save, exit the automation and go back into it the red line will not be there.

New update 1.3

Added 2 new options

  • The trigger (Light) must be ON for a set time (Trigger Wait Time) before the fan will turn ON. This is a good option if you are doing a number 1 and the fan is not required. If you are doing a number 2 then this normally takes longer than a number 1 so if the light is ON for X amount of time then the fan will come ON.
  • You have the option to set a start time and an end time. This will only allow the automation to run between the time periods. This is a good option if you would like to disable the fan at night when everyone is sleeping so the fan noise doesn’t wake anyone up.

Enjoy

Blacky :grinning:

thanks, will try it when I come home.

Tried it from away with my wife(she is home).
Something looksstrange. The fan go on when the light go on.
Take a look today evening when i come home

A short question if the fan is running and after 5min the light goes on again start the time again?

Tricky

If the fan goes ON and the wait time is 3 min and the delay time is 5 min. If you turn the light on again and the delay has 2 min left the fan will go OFF in the delay time(2 min) and the automation restarts from when the light was turned ON. If your in and out in 2 min the fan will go OFF as you exit and stay OFF. If you are longer than 3 min the fan will come ON again.

If you have 4 min left to go and your longer than 3 min the fan will stay ON and then go OFF on time delay once you turn the light OFF.

Hope that right… just run some checks and see how you go.

you have to select the option for “Trigger Wait Option (Optional)” & select “Use the wait time”

1 Like

New update 1.4

Added the option to select weekdays under the time options.

Enjoy

Blacky :grinning:

Hi, I’m newbie to HA. Thanks for your blueprints, they are perfect examples of automation. :slight_smile: I have cloned this blueprint with a few changes.

  1. I have a standard dumb fan in ceiling with a smart switch behind it. But since I want to have the fans in the fan category, I used the helper to change the “switch” to “fan”. Item “switch.id” was hidden for selection, selecting “fan.id” doesn’t work in script. Because the “fan” category has its own on/off methods. Changing the on/off command in “actions” from “switch.turn_” to “fan.turn_” solved this problem. I don’t know if there is a more universal method of defining it, regardless of the switch category.
  2. The second version is to start the fan after the light goes out, not while the person is inside with the light on. Simply moved the order of actions - turning on the fan after turning off the light. :slight_smile:

@Kaacz

Firstly welcome to the community.

1: I will do an update that will resolve this and it will be plug and play. Thanks for letting me know.

2: No problem, the only problem I can see… if someone enters immediately after you done :thinking:. But it HA so you can do anything you like :+1:.

New update 1.5

Updated so you can turn ON and OFF any domain other than just a switch.

Enjoy

Blacky :grinning:

1 Like

Thanks for elegant solution for 1).

About 2) …
I have used the Sonoff Mini (in follow mode with a rocker-switch) as a switch element for the fan. At any time, anyone can manually turn off/on the fan locally. For example, if he doesn’t want to sit under a noisy fan.
I will probably change the logic to:

  • trigger light on
  • wait for some time (for case “2”)
  • set fan on
  • wait for light off
  • set fan on
  • wait for fan after-delay
  • set fan off

If someone turns off the fan during the “mission”, it will be ensured that the fan starts for delay time when he leaves (light off). If the fan is still running, nothing happens, just a redundant command.

Better suggestion. Get a TVOC sensor (with temperature and humidity) and just use that to trigger the fan, when it detects the smelly side effects of a no. 2 in progress and/or your humidity going through the roof.

1 Like

For detect smelly side effect you need right sensor (H2S, metan, …). :smiley:

@Kaacz

I have developed it for 3 more option if the trigger is inverted (light from on to off = fan on). I have done the testing and it works, but will probably do some more tests. Just need to clean it up before I release it (version 1.6). Once I am 100% happy I will release it. Probably be in a day or two.

New update 1.6

Added “Trigger Options”. You can now select “Normal Mode” or “Invert Trigger”.

Normal Mode (Default) - This will start the fan when the trigger goes from an OFF to ON state. Example, Light turned ON or motion sensor detected.

Invert Trigger - This will start the fan when the trigger goes from an ON to OFF state. Example, Light turned OFF. It is not recommended to use this option when using a motion sensor.

Enjoy

Blacky :grinning:

New update 1.7

Fixed a bug when using “Trigger Wait Option”. In one scenario the fan would not turn off.

Enjoy

Blacky :grinning:

1 Like