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.
For detect smelly side effect you need right sensor (H2S, metan, âŚ).
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.
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
Fixed a bug when using âTrigger Wait Optionâ. In one scenario the fan would not turn off.
Enjoy
Blacky
New Features
-
By-pass Options - This allows you to add a by-pass to the automation. you have 3 by-pass options.
- Enable the By-pass - Turn fan ON
- Enable the By-pass - Turn fan OFF
- Enable the By-pass - Keep the fan current state
What can this now do?
- Allow manual control of you fan.
- Allow you to create a run on timer for the fan.
- Allow you to use this blueprint with my other blueprints.
Example on how to use it with my Bathroom Humidity Exhaust Fan
If you are using my âBathroom Humidity Exhaust Fanâ blueprint and you would like to give priority to it and disable this automation to then return back to normal when the âBathroom Humidity Exhaust Fanâ blueprint finishes then you would do the following.
-
First create a toggle helper and enter it into âEnable the By-pass - Turn fan ONâ or âEnable the By-pass - Keep the fan current stateâ as shown below.
-
Then in my âBathroom Humidity Exhaust Fanâ blueprint you would enter this same helper into the âFan Switchâ as shown below.
-
If you are using low speed in my âBathroom Humidity Exhaust Fanâ blueprint you would enter this same helper into the âFan Switchâ & âLow Speed Switchâ as shown below.
-
That is it your done
If you like this blueprint? Consider hitting the button in the top post
If you like my blueprints, and would like to show your support or just say thank you? Click Here
Enjoy
Blacky
New Features
- Trigger Wait Option - Now works with âInvert Triggerâ.
If you like this blueprint? Consider hitting the button in the top post
If you like my blueprints, and would like to show your support or just say thank you? Click Here
Enjoy
Blacky
New Features
- HA Restart Option - You now have the option to enable a Home Assistant Restart Option. This will now turn the fan OFF in the set time delay when HA restarts. We have made it an enable / disable option as if you are using one of my other blueprint like Bathroom Humidity Exhaust Fan blueprint and the same fan is used in that automation then do not need to enable this option as âBathroom Humidity Exhaust Fanâ blueprint already has a built in safeguard when HA restarts. This will prevent conflicts and why it is an option to enable or disable.
If you like this blueprint? Consider hitting the button in the top post
If you like my blueprints, and would like to show your support or just say thank you? Click Here
Enjoy
Blacky
Hi Blacky,
Thank you for your efforts in making HA more usable with these insanely good blueprints.
I was wondering if there was a way to link this with âSensor Lightâ so the light automation is disabled while the fan is on.
The only way i can do this, i believe is by adding the Bathroom Humidity Exhaust Fan.
Thank you in advance for your help.
Hi @ripblade
Firstly welcome to the community
Your welcome and thanks for your kind words.
You would have to create a template sensor. So I will do one better for you, I will add the same automation link as used in the bathroom humidity exhaust fan blueprint⌠I will need to think about all the logic when using light, toilet, humidity blueprints all together⌠but I will keep you updated. Keep an eye out for a new update in the next few days.
EDIT: Can you explain to me your set up so I can understand your use case. Can you also let me know what is your trigger.
Blacky
Hi Blacky,
Thanks for getting back to me! I appreciate the time spent.
I have 2 workflows using your blueprints:
Powder Room
- Sensor Lights blueprint triggers lights on motion and turns off when no motion is detected unless powder room door is closed
- Toilet Exhaust Fan blueprint triggers the fan based on door contact sensor closing (sensor lights disabled ideally while this is happening - bypassing above logic)
2.1 - i do have a problem currently using the contact door sensor and cant seem to have this logic work even in inverted mode. Basically fan only turns on for the allocated time and turns off regardless is the door is open or closed.
Bathroom
- Sensor Lights blueprint triggers lights on motion and turns off when no motion is detected unless bathroom door is closed
- Toilet Exhaust Fan blueprint triggers the fan based on door contact sensor closing (sensor lights disabled ideally while this is happening), fan is turned off 2 mins after door is open (disabled by below and bypass above logic)
- Bathroom Humidity Exhaust Fan will turn on the fan if humidity is too high even when the door is open and will turn off when humidity returns (bypass above logic)
I hope that is clear and thank you for your help in advance.
Side question is there a way for the Toilet Exhaust Fan to turn off the fan based on how long the door has been closed? trying to track a quick toilet use vs a longer one where i would want the fan on longer after door is open
No problem.
All this is possible⌠there is some work to do.
For your powder room and your bathroom using the door as the trigger can be unreliable because sometimes you close the toilet door and your not even using it. You are also trying to turn it ON when the door is closed and turn OFF when the door is close . Good thing is I have a solution for you. What you need to do is create a template sensor I call " Bee In The Hive â. This works with your motion sensor and your door sensor. If the door is closed and motion is detected it knows the bee in in the hive and turn ON, nice hay . I have a post in my sensor light blueprint on template sensors but it will work perfectly for this Click Here. Once you create the template sensor " Bee In The Hive â use this for your toilet trigger and your sensor light group your motion sensor and " Bee In The Hive " for the trigger, then you will not need a by-apss in the sensor light.
Have a look at my set up Click Here.
You will not need this once you create " Bee In The Hive â. Here is my settings⌠for me when the light is on for 2 min the fan will come on and when I turn the light OFF the time delay starts. If the light is ON for les then 2 min the fan will not come on. Rather than the light as the trigger use then " Bee In The Hive â.
Hope this helps you⌠let us know how you get on.
Blacky
Hey there,
Sorry it took a while, I rushed in and didnt read the instructions properly and had a week of hell before i figure out what I did wrong.
This Bee In The Hive is an ingenious workaround!
I had to bump up the timer to 30 sec (motion sensors lowest refresh rate) but so far it seems to work, a few quirks which im sure iâll figure out.
Now to try and make this work in the bathrooms!
Thanks again.
PS: any word on the bypass option for this blueprint so it can be bypassed by Bathroom Humidity Exhaust Fan
Hey Blacky,
Wondering why you choose to use the light as a trigger for your fans instead of the Bee In The Hive + motion sensor group?
Thanks!
It is a nice sensor I do like it a lot, and it is so simple once you know.
The bathroom humidity blueprint has a âAutomation Link Optionâ so you can by-pass this blueprint. I would say the bathroom humidity blueprint should have priority. Let me know if this works?
For me I have separate room for my toilets, they are not in the bathroom. I dont have a motion or a door sensors for the toilet room and I just use the light with âTrigger Wait Option " and time so the fan will not run when we are sleeping. Works perfectly for me. I donât use the " Bee In The Hive â for the toilets.
Blacky
Hey @Blacky can I get some help please?
I have both this automation installed and running and bathroom humidity exhaust fan automations. They seem to be conflicting with each other - and switching the fan off when it shouldnt be turned off (even though technically it should be turned off due to derivative sensor).
So I have a binary sensor that shows the state of a physical switch from a Shelly 2.5. This is what I use to facilitate toilet exhaust fan operation. A person needs to turn the switch on (to turn on non smart lights) when having a shower (shower is also in the same bathroom as the toilet). The same goes for using the toilet - turn on the physical switch to turn the light on in the bathroom - HA knows when the bathroom light is on due to the Shelly.
- âToilet Exhaust Fanâ automation should turn on the fan after 2 minutes of binary_sensor.bathroom_light_switch being turned on. This works fine.
- âToilet Exhaust Fanâ automation should turn off the fan after 5 minutes of binary_sensor.bathroom_light_switch being turned off. This works fine in isolation.
- âBathroom Humidity Exhaust Fanâ automation turns the fan on when sensor.ensuite_bathroom_humidity_derivative rises to +2.5%. This works fine.
- âBathroom Humidity Exhaust Fanâ automation turns the fan off when sensor.ensuite_bathroom_humidity_derivative drops to -2.3%. This works fine in isolation.
However, what I am seeing is the fan going off while someone is showering - humidity derivative appears to have master control as the values are telling HA to turn the fan off. Overall this isnt good because I am the only one (of 4) that opens the window when showering (better to get the humidity out naturally as well as via the fan). Sadly, I have noticed as of yesterday mould has started to build up very quickly.
What I want to happen is âToilet Exhaust Fanâ to take the lead - if the light is on for more than the 3 minute timer, turn on the fan regardless of humidity levels. Then, when someone turns off the bathroom light, if the humidity is still too high, the âBathroom Humidity Exhaust Fanâ to continue to bring down the humidity level
What I dont want to happen is the â Bathroom Humidity Exhaust Fanâ take the lead and turn off the fan even though the bathroom light is on.
Can you help?
Here are the yaml configs:
Bathroom Humidity Exhaust Fan
alias: Fan - Ensuite - Toilet Exhaust Fan
description: ""
use_blueprint:
path: Blackshome/toilet-exhaust-fan.yaml
input:
entity_trigger: binary_sensor.bathroom_light_switch
fan_switch: fan.ensuite_fan_combined
trigger_bypass: input_boolean.ensuite_fan_automation
include_bypass:
- bypass_enabled
- bypass_enabled_turn_on
time_delay: 5
trigger_wait_option: wait_for_trigger
bypass_fan_on:
- input_boolean.ensuite_bathroom_fan_automation_link_bypass
include_bypass_auto_off:
- bypass_auto_off_enabled_on
trigger_wait_time: 2
Bathroom Humidity Exhaust Fan
alias: Fan - Ensuite - Bathroom Humidity Exhaust Fan
description: ""
use_blueprint:
path: Blackshome/bathroom-humidity-exhaust-fan.yaml
input:
trigger: sensor.ensuite_bathroom_humidity_derivative
fan_switch:
entity_id:
- fan.ensuite_fan_combined
- input_boolean.ensuite_bathroom_fan_automation_link_bypass
bathroom_humidity_sensor: sensor.ensuite_humidity_sensor_humidity
rising_humidity: 2.5
falling_humidity: -2.3
include_max_humidity: maximum_humidity_enabled
max_humidity: 75
fan_speed_low:
- fan.fan_idle_speed
time_out: 40
include_fan_speed: fan_speed_disabled
winter_include_max_humidity: maximum_humidity_disabled
winter_max_humidity: 85
include_winter_mode: winter_mode_disabled
month_winter_mode:
- "1"
- "2"
- "3"
- "10"
- "11"
- "12"
winter_rising_humidity: 2
winter_falling_humidity: -2
winter_time_out: 40
winter_include_fan_speed: fan_speed_disabled
manual_fan_switch: []
include_manual_fan_switch: disable_manual_fan_switch
include_automation_link: disable_automation_link
automation_link:
- input_boolean.ensuite_bathroom_fan_automation_link_bypass
include_bypass: bypass_disabled
bypass_options: []
Hi James
First lets do some house keeping. Please delete the line as shown below and save. If you happy and it easy you could recreate the toilet exhaust fan just encase I missed something.
Then lets look at the toilet exhaust fan automation first. You have an auto off for the bypass. If you have this for a reason⌠like to run the fan for x amount of time to then get turned OFF then all is good⌠but create a new by-pass entity and use the by-pass in the humidity blueprint not here. In this automation disable the by-pass auto OFF.
Now lets look at your bathroom humidity exhaust fan automation. In the fan switch enter your by-pass used in the toilet automation that does not have an auto OFF for it. I have allowed for this to be entered into the fan switch for when you use both of these 2 blueprint together (maybe I should document it in a FAQ). Donât use the automation link for the toilet blueprint. Again if you wanted a by-pass to turn the fan on for x amount of time to then turn OFF create a new by-pass entity (toggle helper) and use the by-pass in this blueprint.
So now the same bypass should be in the toilet blueprint by-pass and the humidity blueprint fan switch.
Now what will happen.
- Toilet works as you said. = All good.
-
- When the bathroom humidity exhaust fan automation is triggered it will turn the by-pass ON and OFF with the fan. When it is ON the toilet blueprint will be disabled. = All good.
- When the bypass goes OFF and the light is still ON the fan will turn OFF until you turn the light OFF and back ON. = Not so good but normally at this point your done. If the light is OFF the fan will turn OFF. I could be wrong on this point as I have so many options in blueprints. If so let me know and I will check the code.
This should workâŚlet me know how you go.
Blacky
Thank you @Blacky. I rebuilt automation as recommended and didnt select the âEnable the by-pass auto off - Turn fan ON optionâ that I had selected before (had it enabled before as I thought it was related to the the bypass being on for more than 60 minutes and the automation would then switch the fan and bypass off)
Fan switch in humidity automation is just used by the Toilet Exhaust Fan in âBy-pass Switch - Turn Fan ONâ only
I dont think point 3 should occur now?
Your welcome.
If you are happy try it out for a week and then provide some feedback. I think point 3 needs to be resolved.
Blacky
Hi - firstly I love the idea of this blueprint, and appreciate all the effort youâve put into it. However, Iâm having some trouble and Iâm hoping you may be able to assist.
I have two bathrooms using this but have set up both identically. Both are experiencing the same issue.
I donât have any smart devices near those bathrooms yet, so I added Hue Indoor Motion Sensors and Hue Smart Plugs on the exhaust fans. Iâm trying to use your blueprint with these two devices.
The first problem I had was the fan would never be triggered. I think this was due to the Motion Sensors detecting motion and clearing quite rapidly, and therefore resetting the blueprint. Could you confirm that would be an issue?
In an attempt to solve it, I added a couple of helpers and automation so that an input_boolean for each bathroom will only clear if no motion is detected for 30 seconds. This seems to have improved the problem of the trigger flipping too rapidly.
Now, the issue I have is the fans not turning off. Often Iâll walk past and hear the fan still on 30 minutes after use. Iâve tried tracing your blueprint, but you have so much logic in there!
Appreciate any suggestions!