Skip to content

Commit

Permalink
Remove "unavailable" and "unknown" filters from Kafka integration (ho…
Browse files Browse the repository at this point in the history
  • Loading branch information
leosperry authored Jul 9, 2024
1 parent 592cfc9 commit 4a22b95
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions homeassistant/components/apache_kafka/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
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
Expand Down Expand Up @@ -121,7 +119,7 @@ def _encode_event(self, event: Event[EventStateChangedData]) -> bytes | None:
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
Expand Down

0 comments on commit 4a22b95

Please sign in to comment.