I’m trying to automate ventilation unit based on CO2 level, my goal is to keep it below 900. I’m trying to avoid simple approach like set fan high if CO2 > 900 because fans makes noise which may not be pleasant during night, so i would like to change speed in multiple steps as long as CO2 level do not drop. First idea was to write automation for each speed based on time which CO2 was above 900, but that lots of automatons so i decide to experiment with different approach in which, i’m dynamically change “numeric_state” trigger “for” attribute, I know numeric_state triggers fire when boundary is crossed, but with for attribute time is also a boundary which i will dynamically changing.
Does anybody used automation like that, will it work stable?
Seems reasonable.
But from what you’ve said, I’d do it slightly differently.
I’d set up a binary sensor depending on time of day and CO2 level as to whether you want the fan on or off.
Then set up another sensor to determine fan speed (this would be updated by the binary sensor and the CO2 level) any change in this runs an automation to switch the fan on or off and at what speed.
You can have the levels and times set from the UI with input_number ‘s and input_datetime’ s
Thanks for fast response
Just for clarification by vent unit i mean Heat recovery ventilation (HRV) so it should run all the time as long as windows are closed.
So you suggest to handle this by template sensors, which state is based on current conditions? and automate based on this. Right?
I do not get this sentence:
How this sensor will determine speed? State of this sensor should be “current fan speed” + 10% if CO2 > high limit and “current fan speed” - 10% if CO2 < low limit?
Ten run automation every 10 minutes to check condition sensor and set speed based on speed sensor?
My goal is to find optimal van speed for current CO2 conditions.
After some running time looks like my approach doesn’t work as i would expected, it doesn’t trigger every 10 minutes when CO2 is above limit:/
Number threshold triggers only trigger on thresholds, so if your value is already above the limit it won’t trigger again until it goes below and comes back up.
So you have window and door sensors. - any open - unit off
You have (in your head at least) that it should not run ‘high’ during sleep period.
And you have a lower co2 limit from which you want the unit to run at minimum level.
Combine these into the binary_sensor
The benefit of running with the sensors is that they will ensure the automation will fire and update on any change, sidestepping the numeric threshold issue
You have 5 speeds - off, low, medium, high, boost
These are affected by time (the sleep period) the co2 level (>900=low, >1000=medium etc.) occupancy and the binary sensor
From this you will know if you want the unit on and how fast
Set the co2 levels from the front end
Observe the results and tweak the numbers till you achieve a result you are happy with.
Presumably the co2 sensor updates on a time basis or a delta value (usual sensor type thing) so just run on that basis
@Mutt Thanks for all valuable info, now i have a loots of stuff to think about.
Now, I’m convinced that simple approach will not work, it will quickly speed up the fan to max speed, not my goal. I need to take a closer look at trending integration.
Why ?
If you want to maintain a value then your unit should be able to do that.
Your co2 levels should remain steady for a given occupancy.
These are massively slugged conditions where the inertia of your breathing will make bugger all difference. Have the family exercise together and co2 production may step up a bit, have a few friends round for dinner or to watch a game ditto. Host a party then that’s a different story but keeping all the doors and windows shut will be difficult as you’ll need to lose more heat than anything else.
So if it comes on at 900, goes to medium at 950 (or whatever) and high at 1000 then you’ll probably find that it never goes above medium, but there’s always the option to go to boost at 1050 ?
Keep it as simple as possible, but maintain as wide a range of options as you can.
If you need help with the sensors and the script, we can do that too.
Here is screen of CO2 from one of my kid room, big spike is during bed time (reading etc, fan was low all the time).
I don’t thing reacting on such short spike with fast speed is reasonable because soon it will drop because one person leaves the room, trend would flatten such cases.
Still it is important point, to keep thinks simple. i will prepare simple automation and see how it operates for some time.
@Mutt Sure no problem.
Well, sensor is near room entry door on opposite wall to air inlet and bed, around 2 meters above floor, not the best location. Plot is from 11m2 room, with closed door and 2 persons CO2 rise pretty quick, and everything above 800ppm become unpleasant. Also my vent unit is not very powerful, that why i need to figure out the way to react on unpleasant conditions pretty quick. Now when air become bad it takes long time until comfort is back.