np, iâm just starting to understand blueprintâs so I can do some of my own in time.
Well, this is different. For the last 3 years, I have been controlling the bathroom humidity in a crude way, through node-red. I just now happened on this post and will have to read through it. I thought I was the only one interested in this. I am very happy someone else is talking about this subject. Below are my iterations in node-red (the uneducated way, lol).
https://github.com/fixx-er/Project-files
Yeah, this is one blueprint I realy love and it works well. Since using it all the mould issues in the bathroom are gone. In the past, someone in family would forget to turn the fan ON including me, now it never forgets and we use to turn the fan OFF when we would leave the bathroom, now it runs for the correct amount of time before turning OFF.
Blacky
Bathroom Dimmer turned off triggered by automation Bathroom Humidity Exhaust Fan triggered by numeric state of Bathroom De-Humifier
Not sure why the light was turned off. I donât see where I set it to do that? Is this not configurable? Thanks.
Hi Richard
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.
Then I will be able to see what is happening with your automation.
Blacky
Bugs Fixes
- Fixed an error in light transition as shown below. This was probably when you are using zigbee2mqtt.
Transition value 0 is not valid.
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,
First of all what a good Blueprint just what I was looking for. Until yesterday my extractor fan was controlled by my plc, because a remote IO station has broken (which has a long delivery time), I came across this Blueprint which does almost exactly the same as what I programmed in the plc. Only when I took a shower this morning did I notice that the fan wouldnât come on and I turned it on manually to check the logs later. Now I suspect I did something wrong somewhere because I get the following error every time the automation is triggered.
Error log:
Logger: homeassistant.components.automation.hvac_bathroom_humidity_exhaust_fan
Source: components/automation/__init__.py:608
Integration: Automation (documentation, issues)
First occurred: 11:06:59 (6 occurrences)
Last logged: 12:20:26
Error rendering variables: UndefinedError: 'dict object' has no attribute 'entity_id'
Config in /config/automations.yaml:
- id: '1692464664570'
alias: 'HVAC: Bathroom Humidity Exhaust Fan'
description: ''
use_blueprint:
path: Blackshome/bathroom-humidity-exhaust-fan.yaml
input:
trigger: sensor.bathroom_humidity_derivative
fan_switch:
entity_id:
- fan.fan_bathroom_on_off
bathroom_humidity_sensor: sensor.temperature_and_humidity_sensor_bathroom_humidity
time_delay: 15
include_max_humidity: maximum_humidity_disabled
time_out: 45
falling_humidity: -1
I must have done something stupid but I canât see it at the moment
@Hert [quote=âHert, post:184, topic:509992â]
First of all what a good Blueprint just what I was looking for
[/quote]
No problem, your welcome.
Thanks for letting me know and providing all the information I needed . Not your fault, I did something stupid
Fixed it please update to Version 1.8
It had to do with not entering a light entity. Sorry for the brain fart.
Blacky
Bugs Fixes
- Fixed an error in light if nothing was selected. It would prevent the automation from running and throw the below error.
Error rendering variables: UndefinedError: 'dict object' has no attribute 'entity_id'
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
Yes this has solved the problem and I have tested it a few times and everything works properly. This is great now I donât have to make anything myself to control my fan and you have thought of a lot of things I saw when I was browsing your code. Good job.
But I have one question:
While browsing through your code I saw some nice places here and there to add a function to adjust the fan speed. My fan can run at 2 speeds (high and low). What I would like to see is if the function âTurn on the fanâ is called and before âCheck if the lights are enabledâ there is an option to set the low/high bit high, and then after âWait until Humidity Derivative Sensor drops or it times outâ to set the bit low again. So basically when the timer runs âWait the number of minutes that has been set for the time delayâ the fan then runs at low speed, and then of course after this time the fan simply turns off.
I actually programmed almost exactly the same in my PLC as you did here in this blueprint, only this is the difference with what I made.
Also, the humidity had to be close again before I started showering (I took a snapshot of the value 10 min before I started showering and it also had to have dropped within a certain window, I donât know the percentage value now) otherwise the timer restarted and repeated a maximum of 3x. I do not attach much value to the latter because you have the option to set a maximum humidity and a time out value can be entered.
But donât get me wrong this is not an accusation or that I see it as a shortcoming. The blueprint is awesome in itself, just thought before I start experimenting with your blueprint Iâll drop the idea here
Thanks for the update, nice to know it working again
I am working on this blueprint so I will consider your suggestion but it will be some weeks before I release the next new features. I to have a 2 speed fan but only use one speed. Maybe check in again next month.
Blacky
Oh see thatâs good news. I donât really care that it will take a while, Iâm going to test the values of the humidity (decreasing and rising value) first, then I will be a week further haha. Iâve already changed your blueprint to what I said in my previous post.
What did I do:
I actually copied your include_fan_speed_off
and fan_speed
literally and called it âspeed_switchâ
After this I put a choose for the âfan_onâ function if an entity is selected for speed switch then it will execute otherwise not
And for switching to the Timer I did the same, only of course with homeassistant.turn_off
I didnât make this neatly, I looked that I can get it made in the easiest possible way in my situation. Your other flow âFor winter mode when enabled and within the set winter monthsâ I have not changed. For now I have more than enough with this and I am still experimenting with the settings. Iâll keep an eye out for your updates, Iâm curious about your upcoming implementations
I have a request about time delay, ATM TimeDelay starts when the -level is reached ie -1, but if the level drops again after say 5 mins the timer is not reset, so, once the timer end the fan turns off, so it can cause the room humidity to start going up as it has not really had time to level out.
So could you code it so it resets the timer or add an option to reset it if falls below the point where the Delay Timer started.
see attached.
The delay Time started at Orange arrow, but the derivative was still dropping (Pink and Blue), the Delay Time out ended and fan turn off at Green Arrow, which cause the the room humidity to raise again and eventually start the fan again once it reached the derivative high point (Yellow arrow). Restarting the timer each time the derivative goes lower than the set point would help stop this.
Hi Andy,
At what point did you stop having a shower?
I know you would of read the settings guide Click Here.
If the humidity rises again it is a balancing act to get all your settings correct. I have mine so when the fan goes OFF the humidity will rise but not enough for the fan to come back ON. Then the humidity fall again. Good to also add your humidity sensor in your chart as it can help to understand what is happening and if you should run the fan longer. Here are my settings if your interested.
Summer
Winter
Blacky
I saw this happening to me today too and I think itâs kind of the same problem. Only I think jumping back is not that simple, maybe a timer for the trigger would help a lot and in my opinion it is not that difficult to implement.
@Blacky
Could you please take a look (this is the place in my case) on line 1708 here you call the function âWait until Humidity Derivative Sensor drops or it times outâ. If you add a âfor x time conditionâ to this with a variable input, donât you think we can dampen this out.
Hereâs my graph:
On the red line is where he passed over to the timer
Looks like your sensor location is ok. Try lowering your âFalling Humidityâ. Then you may be able to adjust your âTime Delayâ. It is a bit of a âLove Affairâ and it could take 20 showers to get it right, but once you do it works well. I have tried this but found getting the setting right stops the automation always going to the âSafe Guard - Maximum Run Timeâ.
Hi Andy
Now we can see what is happening, ⊠having your settings would be nice but no stress, letâs have a look at it. Below I have added a few things in the hope it will be more clear.
At point âAâ. The red arrow (1.7 - 1.9) looks to be your âRising Humidityâ. Consider raising it to the yellow arrow (3.0). Because it is now 3.0 the point âBâ (fan ON again) may not accrue (try it, see, adjust, try it see, adjust, etc). The red line is where you finished your shower. Point â1â (green arrow) should be your âFalling Humidityâ around -2.0. Looks like your âTime Delayâ is around 15 min so if we take orange line to the green line it is around 20 min but we have a stop / start of the fan so 15 min may be ok. First try and set your âTime Delayâ to 25 min then look at the graph again to fine tune your run time as 25 min is way to long but we will be able to see what is happening. Then it is fine tuning, again, again and again of all your settings.
Sensor, sensor set up and sensor location is the main critical factor because that is the information we need to make it work perfectly. Having it inline with your fan inlet will stop all your problems (air flowing over it when the fan is ON). I also have my humidity sensor report every 60 seconds regardless. The data is not a problem it is the key and all this data gets purged in 10 days. In the past I had other sensors but once I set it up like this âBOOMâ perfect.
As I said in the above post, It is a bit of a âLove Affairâ and it could take 20 showers to get it right, but once you do, it works well. This is why winter and summers is realy nice feature as you can see by my settings it is so different and even 0.1 makes a difference.
Blacky
thanks for taking the time, iâll try to tweak i did have 25mins for delay, now reduce this to 10 mins, and raised the detect point to 3 (was 1) hopefully this will stop the re-actioning. thanks let thw fun begin tweaking.
Thanks Andy, thanks for persisting at it, this is one blueprint I realy love (Game Changer to home automation) and my family love it to. If you have any question I here to help.