-
-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
Template weather integration broken #91620
Comments
Hey there @PhracturedBlue, @tetienne, @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) template documentation |
I don't disagree that this issue should probably be handled better by this integration (as it does for the temperature value), but a simple workaround is to define a template that casts the value to a
|
Thanks for the workaround. The one issue is that it's not handling the given configuration properly when the The bigger problem, however, is that it completely borks the integration. The rest should still work, I'd argue, with a error/warning that it doesn't understand my config for the humidity. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
Still needs fixing. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
. |
The problem
Even with static data configured, the template weather integration has an unknown state. This seems to be the offending line.
This is a minimal configuration exhibiting the issue:
Log:
Logger config:
What version of Home Assistant Core has the issue?
core-2023.4.5
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Core
Integration causing the issue
Template Weather Provider
Link to integration documentation on our website
https://www.home-assistant.io/integrations/weather.template/
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Apr 18 17:44:53 homeassistant hass[3446845]: 2023-04-18 17:44:53.487 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved Apr 18 17:44:53 homeassistant hass[3446845]: Traceback (most recent call last): Apr 18 17:44:53 homeassistant hass[3446845]: File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/template_entity.py", line 364, in _async_template_startup Apr 18 17:44:53 homeassistant hass[3446845]: result_info.async_refresh() Apr 18 17:44:53 homeassistant hass[3446845]: File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/event.py", line 953, in async_refresh Apr 18 17:44:53 homeassistant hass[3446845]: self._refresh(None) Apr 18 17:44:53 homeassistant hass[3446845]: File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/event.py", line 1133, in _refresh Apr 18 17:44:53 homeassistant hass[3446845]: self.hass.async_run_hass_job(self._job, event, updates) Apr 18 17:44:53 homeassistant hass[3446845]: File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/core.py", line 593, in async_run_hass_job Apr 18 17:44:53 homeassistant hass[3446845]: hassjob.target(*args) Apr 18 17:44:53 homeassistant hass[3446845]: File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/template_entity.py", line 333, in _handle_results Apr 18 17:44:53 homeassistant hass[3446845]: self.async_write_ha_state() Apr 18 17:44:53 homeassistant hass[3446845]: File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/entity.py", line 568, in async_write_ha_state Apr 18 17:44:53 homeassistant hass[3446845]: self._async_write_ha_state() Apr 18 17:44:53 homeassistant hass[3446845]: File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/entity.py", line 634, in _async_write_ha_state Apr 18 17:44:53 homeassistant hass[3446845]: attr.update(self.state_attributes or {}) Apr 18 17:44:53 homeassistant hass[3446845]: File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/weather/__init__.py", line 606, in state_attributes Apr 18 17:44:53 homeassistant hass[3446845]: data[ATTR_WEATHER_HUMIDITY] = round(humidity) Apr 18 17:44:53 homeassistant hass[3446845]: TypeError: type str doesn't define __round__ method
Additional information
https://github.com/home-assistant/core/blob/dev/homeassistant/components/weather/__init__.py#L606
The text was updated successfully, but these errors were encountered: