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.
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?
@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.
Currently there is no lockout. Maybe look at my 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
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:
Navigate to Settings > Device & Services > Helpers tab at the top.
Click the Create helper button.
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.
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
How could I realise something like this in combination with the Blueprint?
Sorry, I am unfortunately new to HA
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.
Thanks for your help. It works now. However, I have a problem with the whole mechanism, how do I select the remaining options?
Use The Trigger Sensor Bypass Option (Optional) : 2 - Enable the bypass - Turn the fan, lights & automation link OFF
Bypass Switch : my windows sensor (reversed)
Bypass - Extra Option : checked or not? (When you turn the bypass off - Turn the fan, lights & automation link OFF and do not run the automation.)
Use The Bypass Auto OFF Option (Optional) : enabled or disabled?
Use The Trigger Sensor Bypass Option (Optional) : 2 - Enable the bypass - Turn the fan, lights & automation link OFF⌠correct.
Bypass Switch : my windows sensor (reversed)⌠Yes the one you created.
Bypass - Extra Option : checked or not? (When you turn the bypass off - Turn the fan, lights & automation link OFF and do not run the automation.)⌠not checked as when the window opens your sensor (bypass) should go OFF and you would like to run the automation if your trigger is active.
Use The Bypass Auto OFF Option (Optional) : enabled or disabled?.. disabled as when the window is closed and your sensor is ON you donât want it to go OFF.
Humidity increases - window closed - fan does not turn on - this is ok
window opens - fan turns on - this is ok
window closes - fan turns off - this is ok
window opens - fan does not turn on (but should) - this is not ok
Yes, the fan should be ONLY on when the window is open. but it may happen that someone closes the window while it is working⌠then the fan turns off - thatâs ok but in a moment someone opens the window again and the fan should turn on again but it doesnât start anymore.
What I mean is that it should be:
fan on when window open
I close the window - fan turns off
I open the window - fan turns on
I close the window - fan turns off
I open the window - fan turns on
etc.
and it is:
I close the window - fan turns off
I open the window - fan doesnât turn on again
I close the window - no change
I open the window - fan doesnât turn on again
This is because the trigger is not ON. If the Trigger - Humidity Derivative Sensor is above your setpoint then it will come ON. What you may have to do is use the Manual Triggeroption 2 with an auto off time delay. That way if you close the window and you would like it to run again you can trigger it manually.
If the Trigger - Humidity Derivative Sensor was above your Rising Humidity Derivative the fan will come ON when you turn the bypass OFF. You are probably referring to the Bathroom Humidity Sensor being above your Maximum Humidity. I donât think I have added that to the code and will need to look at it. I will put it on my list to do.
Just because you have high humidity doesnât mean your Derivative Sensor is above itâs trigger setting.