This feature allows you to manually trigger the automation, replacing the humidity derivative settings in either âDefault - Summer Modeâ or âWinter Modeâ configurations. Turning it ON initiates the automation process, and turning it OFF starts the time delay. Note that auto triggers can and will override the manual trigger option if activated.
This feature can operate with or without a humidity sensor, which is particularly useful if the humidity sensor malfunctions, allowing time for repairs and reducing stress levels. It is designed with good spouse approval in mind. It can also serve as the primary trigger for the automation if you donât have a humidity sensor and cannot create a humidity derivative sensor.
Additionally, you can customize a manual trigger by creating any template sensor you can imagine. This is a powerful feature that allows you to trigger the automation in various ways.
You can use it with a physical switch on the wall that lets you trigger the automation to turn ON the fan before a shower, aiding in humidity removal before the auto triggers take over. This can be very useful in the colder winter months when humidity levels are high or during quick, colder showers in summer where a humidity derivative sensor may not trigger the automation.
How it works.
When you trigger the manual trigger, it will run the automation turning ON the fan, light and automation link.
It will then wait for the manual trigger to turn OFF by either manually turning it OFF or by the safe guard or auto OFF time delay.
Once turned OFF the automation will then proceed to the time delay in either âDefault - Summer Modeâ or âWinter Modeâ. It will then continue as per your settings you selected in âDefault - Summer Modeâ or âWinter Modeâ.
NOTE: The auto triggers can and will override the manual trigger option if activated at any point. Although this can be used as the main trigger it was designed to add value to the auto triggers.
After using this great blueprint now for several weeks, I understand things around the behavior of the humidity etc all a bit better and have my setup dialed in quite well where I am quite happy with it. I experimented a lot, and tried 3 different Humidity sensors until I landed on this one, and countless mounting positions thereof in the ensuite before I was happy with it all.
I thought to share my graphs showing the relationship between humidity, the derivative, and where the fan turns on and off. Since I used these graphs, it made it much easier for myself to understand the nuts and bolts behind it all. I hope this info might help others in turn.
Thank you again Blacky for this, and all your patience with my ânot-so-smartâ questions at the beginning
I have a question for you about the âmanual_fan_switchâ function. I tried to enable it, although I didnât have much hope that it would work. Namely: you write that the manual switch must be independent. My fan switch is a classic mechanical switch on the wall, with a wifi controller between it and the fan (only one switch is connected). Ultimately, therefore, the fan is always switched by this controller - whether it has been switched on by the mechanical switch, or by an instruction by way of wifi (and therefore automation). The situation can be clearly seen in the definitions of âfan_switchâ and âmanual_fan_switchâ above. This explains the fact that âbypass_auto_off_delayâ doesnât work. Do you think my explanation is correct?
If so: I understand that the automation does not know if the switch was turned on by a human, or by the automation. However: Couldnât some counter be used to track these states:
Switch tripping immediately preceded by an X% rise in the humidity derivative sensor value.
the switch trip was not preceded by a rise in the value of the humidity derivative sensor (and therefore was manually tripped - if this option is enabled)?
Yes you canât use the same switch that controls the fan and the manual fan switch.
Looks like you have a smart plug for the fan and a wifi switch to turn ON the smart plug. If so detach the wifi switch from the smart plug. Then use the smart plug in the automation for the fan and use the wifi switch for your manual control.
Thanks for the quick reply!
No, it is not a smart plug, it is a wifi module (controller) under the switch in the wall, the fan is also built into the wall. I donât want to disconnect it (already because it was very difficult to put all the wires plus the controller into the switch box ).
I am attaching the controller wiring diagram to complete it:
I also found that the automation knows how the switch (controller) was turned on/off. I attach a screenshot of the history of the entity âfan bathroom switchâ in HA, (I am translating from Czech):
Fan bathroom switch on, triggered by automation, Fan bathroom switch on, triggered by numeric state Derivative sensor bathroom
Fan bathroom switch, off
(State 2 is triggered by the manual switch (and interpreted by the controller)).
Thus, it would probably be possible to build this algorithm into your automation:
If the fan is controlled by a controller that allows bypass for a mechanical switch, take into account how the fan was turned on - whether by automation or manually. In case of manual switching, enable âmanual_fan_switchâ and also âbypass_auto_off_delayâ. I donât know how though - Iâll leave that to an expert âŚ
I see in your electrical wiring you have crossed off one switch with a L2. Not sure if it is there but if you get an electrical contractor to add a switch on S2 and just use the switch not L2 as an input then you could use that.
Sure, I only used switch No 1 on the controller, and thatâs because I didnât have a module with a single switch (the module is adapted for a mechanical double switch). Switch 2 is not used, the fan is controlled purely by switch 1.
Adding another mechanical switch is not possible for space reasons. Is it really not possible to solve the situation with automation? I have a similar module for controlling lights, where I want to use your blueprints for common control of entities, while fully preserving the function of the mechanical switch. There I may run into the same problemâŚ
I have looked at this in the past but I will put it on the list to revisit it. I have a new version currently undergoing live testing so I may have to hold this release back.
Sounds interesting, thank you Blacky! I would also be keen to follow this. My setup looks similar to that of vaclavIII where the original wall switches still control the fan and light through the ZB T2 dual relay module, but Iâm currently unsure how to use that in your blueprint and have not yet started to experiment with that whilst i was dialing in the fan / humidity part.
Happy to be a tester if you need one
Hello Blacky (and Vicusj),
I look forward to seeing your new version of the blueprint. I still tried to work around the independent triggering problem by introducing a âhelperâ so that the automation thinks that the manual triggering is a different switch, but I failed (I honestly didnât have much hopeâŚ). I think the problem I described is fairly general - itâs nice to be able to control switches both by automation and manually - relatively independently.
Thanks to both of you for your comments!
Just to add into this to show there is demand, I can also operate my fan via the original wall switch but also control itâs status via a smart relay.
I have looked into it again. It is a little bit tricky in the one automation but I have come up with a solution that could work. Below this post I am going to post a FAQ on how to make your actual fan switch control the fan manually in âManual Fan Switchâ or the âBypassâ. Try it out and let me know how you go.
FAQ - How to use the same âFan Switchâ also in âManual Triggerâ or âManual Fan Switchâ
If your wall-mounted physical switch controls the fan and you want to use this same switch to control the âManual Triggerâ or âManual Fan Switchâ functionality while ensuring your automations continue to work, you must create a trigger-based template binary sensor.
Please follow these steps
Step 1: Create a template binary sensor by adding the code below into your âconfiguration.yamlâ file.
The things you will need to change are:
switch.your_fan_switch_id_here = Replace this with the entity ID of your fan switch used in âFan Switchâ.
The things you can change to your liking are:
Manual Fan Switch = This is the name you would like to call your new binary sensor.
fan-clock = The icon used. You can change it to your preference or remove the line icon: mdi:fan-clock if you donât want an icon. To see what icons you can use click here.
template:
- trigger:
- platform: state
entity_id: switch.your_fan_switch_id_here
to: "on"
id: "t1"
- platform: state
entity_id: switch.your_fan_switch_id_here
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 %}
Step 2: Once you have added it into your âconfiguration.yamlâ file, for it to take effect you have 2 options.
Go into developer tools / under âYAML configuration reloadingâ, click âTemplate Entitiesâ (recommended).
OR
Restart Home Assistant.
Step 3: You can only add it into either the âManual Triggerâ or âManual Fan Switchâ. You can not add it into both choose only one.
Add the new binary sensor into âManual Triggerâ
Thank you, Iâve now added this and will test over the next few days.
How will this work if the fan Is manually switched on and then the humidity spikes after being turned on manually. Will the automation run or will the manual switch auto off time be used?
Awesome! I have done it all and using the Manual Fan Switch option; I can confirm that the auto-off delay works fine. Will give it a shot along with a shower tonight. (i have no doubts though )
Also, thank you for the guidance on doing my first configuration.yaml edit
Hey, Blacky,
manually turning on the fan as per your modification above works great, thanks for your modification.
P.S. P.S. My fear of a similar problem with the combination of manual switch and wifi controller when controlling the lights did not materialize: I used your blueprint âSwitch - Turn ON & OFF Entitiesâ to associate 3 switches (one switch is master, the other 2 slaves) - everything works fine, mechanical on/off and control by automation.
Thanks a lot for your help!
Thanks for letting us know. It is always good if someone tests it out on a different setup.
It is also good to know it working on my other blueprint. A lot of people have been asking for it. I going to post it up on the other blueprints as a FAQ soon. I am just going through the final testing of the next release for this blueprint.