diff --git a/homeassistant/components/fibaro/__init__.py b/homeassistant/components/fibaro/__init__.py index cdfa7f6a864..8b41c4f404f 100644 --- a/homeassistant/components/fibaro/__init__.py +++ b/homeassistant/components/fibaro/__init__.py @@ -186,12 +186,13 @@ class FibaroController: resolver = FibaroStateResolver(state) for event in resolver.get_events(): - fibaro_id = event.fibaro_id + # event does not always have a fibaro id, therefore it is + # essential that we first check for relevant event type if ( event.event_type.lower() == "centralsceneevent" - and fibaro_id in self._event_callbacks + and event.fibaro_id in self._event_callbacks ): - for callback in self._event_callbacks[fibaro_id]: + for callback in self._event_callbacks[event.fibaro_id]: callback(event) def register(self, device_id: int, callback: Any) -> None: