mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +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,
|
CONF_USERNAME,
|
||||||
EVENT_HOMEASSISTANT_STOP,
|
EVENT_HOMEASSISTANT_STOP,
|
||||||
EVENT_STATE_CHANGED,
|
EVENT_STATE_CHANGED,
|
||||||
STATE_UNAVAILABLE,
|
|
||||||
STATE_UNKNOWN,
|
|
||||||
)
|
)
|
||||||
from homeassistant.core import Event, EventStateChangedData, HomeAssistant
|
from homeassistant.core import Event, EventStateChangedData, HomeAssistant
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
@ -121,7 +119,7 @@ class KafkaManager:
|
|||||||
state = event.data["new_state"]
|
state = event.data["new_state"]
|
||||||
if (
|
if (
|
||||||
state is None
|
state is None
|
||||||
or state.state in (STATE_UNKNOWN, "", STATE_UNAVAILABLE)
|
or state.state == ""
|
||||||
or not self._entities_filter(state.entity_id)
|
or not self._entities_filter(state.entity_id)
|
||||||
):
|
):
|
||||||
return None
|
return None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user