Remove "unavailable" and "unknown" filters from Kafka integration (#121602)

This commit is contained in:
Leonard Sperry 2024-07-09 09:16:14 -04:00 committed by GitHub
parent 592cfc9c17
commit 4a22b95620
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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