You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In connector.py the values for dew_point and temp get rounded and cast to int:
309: ATTR_FORECAST_NATIVE_DEW_POINT: int(round(dew_point - 273.1, 0))
322: ATTR_FORECAST_NATIVE_TEMP: int(round(temp_max - 273.1, 0))
btw: It would be nice to calculate missing values from the forecast, i.e. calculate humidity and absolute_humidity (both missing from dwd forecast) from dew_point and temperature? I can provide formulas if needed.
The text was updated successfully, but these errors were encountered:
Hi @dc6jn
I once made the decision to round, because after all it remains a forecast and temperature values with fractions implies a false accuracy. What is your use-case in needing the fractions of degrees?
Regarding your hint with humidity: I wondered why you were writing this, because the relative humidity is already calculated. However I noticed after checking, that these were not included in the forecast and only in the sensors. I fixed this and will release this soon. And do you really need the absolute humidity? I mean, I can include them, however I don't think many users need them and this will only increase the list of optional forecast attributes.
Version of home_assistant
2025.2.1 (but version independent)
Version of the custom_component
INTEGRATION_VERSION = "2.1.28"
daily
Describe the bug
In connector.py the values for dew_point and temp get rounded and cast to int:
309: ATTR_FORECAST_NATIVE_DEW_POINT: int(round(dew_point - 273.1, 0))
322: ATTR_FORECAST_NATIVE_TEMP: int(round(temp_max - 273.1, 0))
475: ATTR_FORECAST_NATIVE_DEW_POINT: int(round(dew_point - 273.1, 0))
487: ATTR_FORECAST_NATIVE_TEMP: int(round(temp_max - 273.1, 0))
490: ATTR_FORECAST_NATIVE_TEMP_LOW: int(round(temp_min - 273.1, 0))
My suggestion would be to replace it with this:
309: ATTR_FORECAST_NATIVE_DEW_POINT: round(dew_point - 273.1, 1)
322: ATTR_FORECAST_NATIVE_TEMP: round(temp_max - 273.1, 1)
475: ATTR_FORECAST_NATIVE_DEW_POINT: round(dew_point - 273.1, 1)
487: ATTR_FORECAST_NATIVE_TEMP: round(temp_max - 273.1, 1)
490: ATTR_FORECAST_NATIVE_TEMP_LOW: round(temp_min - 273.1, 1)
btw: It would be nice to calculate missing values from the forecast, i.e. calculate humidity and absolute_humidity (both missing from dwd forecast) from dew_point and temperature? I can provide formulas if needed.
The text was updated successfully, but these errors were encountered: