diff --git a/homeassistant/components/homekit/__init__.py b/homeassistant/components/homekit/__init__.py index bfae426e57c..4fd88665f36 100644 --- a/homeassistant/components/homekit/__init__.py +++ b/homeassistant/components/homekit/__init__.py @@ -798,10 +798,11 @@ class HomeKit: } ) - entity_states = [] + entity_states: list[State] = [] + entity_filter = self._filter.get_filter() for state in self.hass.states.async_all(): entity_id = state.entity_id - if not self._filter(entity_id): + if not entity_filter(entity_id): continue if ent_reg_ent := ent_reg.async_get(entity_id):