mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 17:57:55 +00:00
Do not show graphite warnings if no new_state in event (#36292)
It is not correct to show warning about "unexpected event type" if EVENT_STATE_CHANGED have no new_state field. We should show this warning only if it is real unexpected event type. Run task_done() before continue, because we should tell the queue that the processing on the task is complete after get().
This commit is contained in:
parent
7197ef76a6
commit
6ed68d8ced
@ -139,7 +139,16 @@ class GraphiteFeeder(threading.Thread):
|
||||
_LOGGER.debug("Event processing thread stopped")
|
||||
self._queue.task_done()
|
||||
return
|
||||
if event.event_type == EVENT_STATE_CHANGED and event.data.get("new_state"):
|
||||
if event.event_type == EVENT_STATE_CHANGED:
|
||||
if not event.data.get("new_state"):
|
||||
_LOGGER.debug(
|
||||
"Skipping %s without new_state for %s",
|
||||
event.event_type,
|
||||
event.data["entity_id"],
|
||||
)
|
||||
self._queue.task_done()
|
||||
continue
|
||||
|
||||
_LOGGER.debug(
|
||||
"Processing STATE_CHANGED event for %s", event.data["entity_id"]
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user