core: History component stucks

Home Assistant release with the issue: 103.4

Last working Home Assistant release (if known): 102.x

Operating environment (Hass.io/Docker/Windows/etc.): Docker

Integration: https://www.home-assistant.io/integrations/history/

Description of problem:

  1. After startup, history is getting recorded and everything is fine.
  2. Suddenly after some time, nothing gets recorded and everything is stuck to last received value.
  3. However, sensor last received value is always updated. See below image, where sensor latest value is around 44.8%, however graph is stuck around 61 %

image

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

history:

Traceback (if applicable): No traceback is generated at the time history is stuck (21:23) But after few minutes, have below errors (not sure if below errors and issue is related, but experts may decide this)

2019-12-29 21:31:58 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback handle_subscribe_events.<locals>.forward_events(<Event ifttt_...ceived[L]: 21>) at /usr/src/homeassistant/homeassistant/components/websocket_api/commands.py:69
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 75, in forward_events
    connection.send_message(messages.event_message(msg["id"], event.as_dict()))
  File "/usr/src/homeassistant/homeassistant/core.py", line 491, in as_dict
    "data": dict(self.data),
TypeError: 'int' object is not iterable
2019-12-29 21:31:58 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback handle_subscribe_events.<locals>.forward_events(<Event ifttt_...ceived[L]: 21>) at /usr/src/homeassistant/homeassistant/components/websocket_api/commands.py:69
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 75, in forward_events
    connection.send_message(messages.event_message(msg["id"], event.as_dict()))
  File "/usr/src/homeassistant/homeassistant/core.py", line 491, in as_dict
    "data": dict(self.data),
TypeError: 'int' object is not iterable

Additional information: Only restarting home assistant makes history component working again.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (5 by maintainers)

Most upvoted comments

Ahhhhhhhhhhhhhhhhhaaaaaaaa… I have several IFTTT webhooks reporting temperature to my Home Assistant. And thanks to your comment, I reviewed all of them. And found out debug code (guess what : It was not dictionary value, but hardcoded value) in one of them which now I have removed. Hopefully issue will never pop up again.

based on forum, deleted database completely and restarted HA again. After working for a while, issue popped up again.