Skip to content
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

Convert SUN_IRRADIANCE Unit from W*h to kJ #19

Merged
merged 1 commit into from
Oct 30, 2023
Merged

Conversation

fl0x53
Copy link
Contributor

@fl0x53 fl0x53 commented Oct 25, 2023

Convert reported 'global_radiation_last_hour' from W*h/m^2 to kJ/m^2 by multiplying with 3.6

Convert reported 'global_radiation_last_hour' from W*h/m^2 to kJ/m^2 by multiplying with 3.6
@FL550
Copy link
Owner

FL550 commented Oct 30, 2023

Hi, as DWD is delivering this value in this format, I'd rather like to leave it this way. Or do you have any specific reasons for your PR?

@fl0x53
Copy link
Contributor Author

fl0x53 commented Oct 30, 2023

Yes, I do have 😄:
There is a unit mismatch when using get_forecast_data() vs. get_reported_weather() for attribute SUN_IRRADIANCE
The first uses Rad1h in kJ/m^2 (as of MOSMIX description), the latter global_radiation_last_hour in W/m^2 per one hour ("letzte Stunde").

For example, this leads in HA to values that are 3.6 times smaller than expected.

@FL550
Copy link
Owner

FL550 commented Oct 30, 2023

Ah, I see! There was a problem regarding this some time ago.

Thanks for your PR!

@FL550 FL550 merged commit ab584f6 into FL550:main Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants