🚽 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

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

Version: 1.7 :fire:

Most common automation used for a toilet exhaust fan. It will make sure you remove the smells after the fact :partying_face:

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

:newspaper: The Automation Process:

  • Triggers on a light or a motion sensor and turns the fan ON. The trigger can be anything you like that has an ON and OFF state.
  • When the light or motion sensor is triggered a time delay is activated and turns the fan OFF Automatically.
  • The fan will stay ON if the light is turned back ON or the motion sensor detects motion before the time delay turns the fan OFF. It will then reset the time delay when the switch is turned Off or after last motion is detected.
  • You have the option to invert the trigger so when you turn the light OFF the fan will turn ON.
  • You have the option to set the “Trigger Wait Time”. This can help assume a number 2 is in progress and the fan is required.
  • You have the option to set a start time, an end time and select weekdays. This will only allow the automation to run between the time periods.

:rocket: CHANGELOG

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
:shower: Bathroom Humidity Exhaust Fan
:hourglass_flowing_sand: Entity - Run ON Timer
:gear: Turn Light, Switch or Scene On & Off with Trigger Conditions
:thermometer: Temperature Control Exhaust Fan
:snowflake: Temperature Control Exhaust Fan - Inverted
:nazar_amulet: Push Button Relay - Contactor
:stopwatch: Timer Relay - Run ON Timer
:on: Smart Relay - Contactor

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

5 Likes

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

@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: 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