This was working, but suddenly it quit. I am now getting the following in the log file:
2020-02-06 18:05:27 WARNING (MainThread) [homeassistant.components.weather] Setup of weather platform nws is taking over 10 seconds.
2020-02-06 18:05:35 ERROR (MainThread) [homeassistant.components.nws.weather] Error updating observation from station KBUR: 502, message=‘Bad Gateway’, url='https://api.weather.gov/stations/KBUR/observations
2020-02-06 18:05:35 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 424, in _async_add_entity
await entity.async_update_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 284, in async_update_ha_state
self._async_write_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 327, in _async_write_ha_state
attr.update(self.state_attributes or {})
File “/usr/src/homeassistant/homeassistant/components/weather/init.py”, line 169, in state_attributes
self.precision,
File “/usr/src/homeassistant/homeassistant/helpers/temperature.py”, line 23, in display_temp
raise TypeError(f"Temperature is not a number: {temperature}")
TypeError: Temperature is not a number: 68
Is this just a situation where the NWS server is down, or is something else going on? The bad gateway error would point to a server issue, but why am I getting the rest of the errors?
The NWS API server was down for awhile. When it came back up they also switched the API data format. There is a fix that will hopefully go live in the next 0.105.x release.
The server at least for weather info seems to be down again or I could check whether it is still true…
It was reported by a few users and my own observation that all numeric values except for a rare few are now being reported as strings. I tried randomly picking forecast points and observation stations and they all had the same behavior.
I have almost never seen the weather API service issues page provide info on actual outages. But they are obviously systemic outages, as I get reports from multiple users that it is all down simultaneously.
Looks like it’s down again. Is this just another outage, or another API change?
Here is what it says in the log:
2020-05-03 09:39:56 ERROR (MainThread) [homeassistant.components.weather] The nws platform for the weather integration does not support platform setup. Please remove it from your config.
2020-05-03 09:39:58 WARNING (zeroconf-Engine) [zeroconf] Exception occurred:
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/zeroconf/init.py”, line 1275, in handle_read
data, (addr, port, *v6) = socket.recvfrom(_MAX_MSG_ABSOLUTE)
OSError: [Errno 9] Bad file descriptor
I’m assuming you just upgraded to 0.109.x. Check the breaking change section in the release notes. It is only configured through the UI now (not decided by me).
For someone having issues, can someone put an issue on the home assistant GitHub? This will probably help motivate the core devs to accept the change I am going to make.
@MatthewFlamm If you tell me the best way to word the issue I would be more than happy to open an issue for this. I “can’t” even edit the UI to try the Lovelace configuration for NWS so it’s a bit frustrating for them to just pull the plug on handling your own configuration.