I’m wondering, if there is any way to limit the turn on until one specific hour? I don’t want for example to start the fan after 23:30 (too much noise)
Got the fan set up and it’s running as expected, thanks for the quick guidance and support on such a cool blueprint. I’ll definitely check out the lighting blueprint!!!
I’ve been running this automation in my en suite for quite some time, I’m going to add this now also for my main bathroom with the manual switch option as well.
My question is in the below, do I need to change the trigger id to be something unique to what I have in the en-suite? Or do I just need to change the entity_ids and can leave trigger id as t1?
- trigger:
- platform: state
entity_id: fan.en_suite_fan
to: "on"
id: "t1"
- platform: state
entity_id: fan.en_suite_fan
to: "off"
binary_sensor:
- name: "Manual En-Suite Fan Switch"
icon: mdi:fan-clock
state: >
{% if trigger.id == 't1' and trigger.to_state.context.parent_id is none %}
on
{% else %}
off
{% endif %}
I have never really tested this. You will just have to try and if it does then you may have to group your sensors and try it with one automation.
Blacky
If anyone’s coming here about the legacy syntax error, I think this is the updated code:
template:
- trigger:
- trigger: state
entity_id: switch.master_bathroom_exhaust_fan
to: "on"
id: "t1"
- trigger: state
entity_id: switch.master_bathroom_exhaust_fan
to: "off"
binary_sensor:
- name: "Manual Fan Switch"
icon: mdi:fan-clock
state: >
{% if trigger.id == 't1' and trigger.to_state.context.parent_id is none %}
on
{% else %}
off
{% endif %}
Based on:
https://whatarewefixing.today/1705/how-to-migrate-home-assistant-2024-8-2024-10-yaml-changes/
If I take a shower and the fan automatically turns on and then the fan turns off after it reaches the time out value that I set, but the humitidy is still above the limit of 95% that I have set to always turn on at, do I have to wait until the humity goes below 95% and back up past 95% to turn back on (which seems to never happen). I think when it it is above 95%, HA automation is not triggered. Is there something i’m doing wrong?
Hi Louis, in order for the humidity to trigger the automation it must go from below to above.
Depending on where you live the humidity should drop below 95% before the fan turns OFF and make sure a time delay runs long enough for this to happen.
The Safeguard - Maximum Run Time should be long enough for you longest shower + some time to allow the humidity to drop.
Blacky
@Blacky It seems that every time the automation finishes I get a Switch.turn off followed immediately by a switch.turn on. Any thoughts where I may be going wrong?
Welcome to the community.
Could you please provide us your YAML of the automation? 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
alias: Shower Extract Fan
description: ""
use_blueprint:
path: Blackshome/bathroom-humidity-exhaust-fan.yaml
input:
trigger: sensor.shower_derivitive_humidity_helper
fan_switch:
entity_id: switch.shower_extract_fan
include_manual_trigger: disable_manual_trigger
include_manual_fan_switch: disable_manual_fan_switch
time_out: 30
include_max_humidity: maximum_humidity_disabled
max_humidity: 100
rising_humidity: 2
falling_humidity: -1
time_delay: 5
@melewis1975 Welcome!
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.
Is that possible?
Thanks
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
Hope this helps.
Blacky
Welcome to the community
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.
{ is_state('binary_sensor.your_window_sensor_here', 'off') }}
Hope this helps
Thanks for your reply .
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