-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solar Radiance is scaled when read from sensor even if already given in target unit #461
Comments
thanks, that is a bug then. |
somewhere during the collecting of the weatherdata it seems like an unnecessary conversion is hitting. can you please install the latest version, turn on debug logging (like you had) and then try to update the weatherdata, and post the logs - you should see a bunch of log statements with |
Thanks for the update. I gave it a try after updating to the new version. The log output is down below. I don't know if you changed anything in the different steps but there is no conversion any more - just as one would expect it to be. 2024-08-09 10:14:30.526 INFO (MainThread) [custom_components.smart_irrigation] Updating zone Rasen oben |
My initial guess was that the error occurs during the conversion to metric system as there is one case where "from_unit" is set to W/m2. This would've explained the transformation (but only if the "from_unit" would have been misinterpreted). But currently (without any changes in my sensor group) it seems to look good. |
I didn't change any logic just added debug. It am wondering if you maybe changed the unit but never moved away from it / deselected it, so it actually still had the old setting in the file? Just guessing here. Closing this for now, glad it looks like its resolved. |
Yes, I’m also happy 😉 |
What happened?
The value for the solar radiance sensor seems to be multiplied by the conversion factor from W/m2 to MJ/day/m2 even if the sensor already has the target unit.
See chart below with a sensor value of ~8.57 and the log output with 0.741644 which is roughly a factor of 0.0864
I tried to find some clues in issue #363, however, as far as I understood this was in a setup with continuous updates for sensors.
How to reproduce
Continuous updates for sensors is disabled
I created a sensor based on the solar radiance data of my weather station (in W/m2). This sensor aggregates the solar radiance values over one day and converts the value to MJ per day /m2

In the sensor group I select last value and the corresponding unit

Relevant log output
Which version are you running?
2024.7.2
Diagnostics file
Additional information
config_entry-smart_irrigation-0f088d3d2840348cf5a2ff15d2ce2bef.json
The text was updated successfully, but these errors were encountered: