hi, as this is not an issue but a request, I’ll put it here, so more people can see it/learn from your answer.
I want to plot absolute humidity based on my Relative humidity and temp LTS values.
I’ve found this formula (as well as the usual psychrometric diagrams, unusable for computer use):
Absolute Humidity (grams/m3) = (6.112 × e^[(17.67 × T)/(T+243.5)] × rh × 2.1674)/(273.15+T).
(from How to convert relative humidity to absolute humidity | carnotcycle)
I know it would be most efficient to have the Abs Hum to be calculated using a template sensor in HA at data point storage time and then the LTS of them being used for plotting.
But if I do that, then I have to wait a long time till I build up enough history to be useful.
If it’s part of a lambda as well (initially), then I could use the stored LTS values to calculate it on-the-fly, at run-time, also for my historic values. It might be (too) slow, but I think if I keep the number of data points per graph low, it might be feasible. In the meantime, I’ll build up my history using the template sensor(s).
Unfortunately, I don’t know enough about the lambda syntax to convert the formula into working code. For lambdas, I used normally the good old copy-paste-adjust adagio… Poor me. But it works!
Thanks.
PS, this is the current result. The colours for Temp and humidity are not matching 100%, but that will be a small fix. The Abs. Humidity will be a 3rd graph, below the current 2:
Yes, it’s rather cold in the house, but I’m away for 2 weeks, since 9th (evening), so very little natural and no artificial heating, in a 1970’s house…