mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 01:38:02 +00:00
Remove "unavailable" and "unknown" filters from Kafka integration (#121602)
This commit is contained in:
parent
592cfc9c17
commit
4a22b95620
@ -16,8 +16,6 @@ from homeassistant.const import (
|
||||
CONF_USERNAME,
|
||||
EVENT_HOMEASSISTANT_STOP,
|
||||
EVENT_STATE_CHANGED,
|
||||
STATE_UNAVAILABLE,
|
||||
STATE_UNKNOWN,
|
||||
)
|
||||
from homeassistant.core import Event, EventStateChangedData, HomeAssistant
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
@ -121,7 +119,7 @@ class KafkaManager:
|
||||
state = event.data["new_state"]
|
||||
if (
|
||||
state is None
|
||||
or state.state in (STATE_UNKNOWN, "", STATE_UNAVAILABLE)
|
||||
or state.state == ""
|
||||
or not self._entities_filter(state.entity_id)
|
||||
):
|
||||
return None
|
||||
|
Loading…
x
Reference in New Issue
Block a user