Hey,
I have 3 ventilation units in my home that can supply air inside. The manual has rough m3/h figures for each speed setting, but it’s not exposed anywhere. I’d like to have automations that determine an air replacement rate and adjust fans accordingly. For this, I’d like to have a sensor that shows current flow rate that I can use in automations, and I’d like a way to get a target fan speed to achieve a given flow rate, but I have no idea what tools I have for this. I tried setting up a simple compensation entity, assuming the data points mapping will just be applied, but I see slightly different values to what I’d expect, like I have a data point [100, 60], I’d assume at 100% fan speed the value would be 60, but in reality it’s 64. Is there an easy solution for this use case? Am I missing something?
Thanks
Share the compensation sensor config you used.
Sure thing, it looks as simple as it gets to me.
dining_room_airflow:
unique_id: dining_room_projected_airflow
name: Projected Airflow
source: fan.dining_room_zephyr_fan
attribute: percentage
data_points:
- [0, 0]
# - [1, 15]
# - [15, 30]
# - [57, 45]
- [100, 60]
device_class: volume_flow_rate
unit_of_measurement: 'm³/h'
Well those points aren’t linear.
And the default degree is 1 (linear):
So if you had not commented out the intermediate points then you were getting predictions as per the thin line:
I think I restarted after commenting it out, but evidence shows otherwise. I have read the documentation, but I don’t fully understand what degree means for me. I might not have the right terminology here, but what I’m looking for should be fairly simple, by linear interpolation I’ve just meant connecting each defined point by a straight line. I understand I could probably write some form of integration and do everything in python, but since we have derived sensors and the compensation feature, it’d be surprising for a lookup table like functionality to be off the table.
The compensation integration does not support that.
Degree refers to how many terms the polynomial you are trying to fit to your data has. In most cases the higher the degree the higher the accuracy, but not always:
Thank you for clarification! I was afraid this might be the case. Do you know of any other configuration construct that might fit my use case?


