Traceback (most recent call last):


 "uvloop/cbhandles.pyx", line 64, in uvloop.loop.Handle._run


 "/usr/src/app/homeassistant/helpers/event.py", line 82, in state_change_listener

event.data.get('new_state'))


 "/usr/src/app/homeassistant/core.py", line 333, in async_run_job

target(*args)


 "/usr/src/app/homeassistant/components/utility_meter/sensor.py", line 94, in async_reading

old_state.state in [STATE_UNKNOWN, STATE_UNAVAILABLE],
AttributeError: 'NoneType' object has no attribute 'state'

Traceback (most recent call last):


 "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run

self._context.run(self._callback, *self._args)


 "/usr/local/lib/python3.7/site-packages/aiohttp/web_ws.py", line 102, in _send_heartbeat

self._loop.create_task(self._writer.ping())
# type: ignore
AttributeError: 'NoneType' object has no attribute 'ping'
