I recently noticed the rest calls I make to a bunch of my internal servers are no longer working. Getting loads of errors in the log like:
2020-11-14 16:14:08 ERROR (MainThread) [homeassistant.components.sensor] rest: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 357, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 466, in async_device_update
await task
File "/usr/src/homeassistant/homeassistant/components/rest/sensor.py", line 207, in async_update
await self.rest.async_update()
File "/usr/src/homeassistant/homeassistant/components/rest/data.py", line 52, in async_update
response = await self._async_client.request(
File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1371, in request
response = await self.send(
File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1406, in send
response = await self._send_handling_auth(
File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1444, in _send_handling_auth
response = await self._send_handling_redirects(
File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1476, in _send_handling_redirects
response = await self._send_single_request(request, timeout)
File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1502, in _send_single_request
(status_code, headers, stream, ext,) = await transport.arequest(
File "/usr/local/lib/python3.8/site-packages/httpcore/_async/connection_pool.py", line 208, in arequest
connection = await self._get_connection_from_pool(origin)
File "/usr/local/lib/python3.8/site-packages/httpcore/_async/connection_pool.py", line 248, in _get_connection_from_pool
if connection.is_socket_readable():
File "/usr/local/lib/python3.8/site-packages/httpcore/_async/connection.py", line 169, in is_socket_readable
return self.connection is not None and self.connection.is_socket_readable()
File "/usr/local/lib/python3.8/site-packages/httpcore/_async/http11.py", line 205, in is_socket_readable
return self.socket.is_readable()
File "/usr/local/lib/python3.8/site-packages/httpcore/_backends/asyncio.py", line 179, in is_readable
return is_socket_readable(sock.fileno())
AttributeError: 'NoneType' object has no attribute 'fileno'
And even though I didn’t change anything in my rest calls I did check a few of them and they still return the expected results when using curl from the HA server.
Thoughts?