diff --git a/custom_components/enet/__init__.py b/custom_components/enet/__init__.py index 755e326..32808b4 100644 --- a/custom_components/enet/__init__.py +++ b/custom_components/enet/__init__.py @@ -86,7 +86,11 @@ async def _async_update_data(self): while True: event = await self.hub.get_events() if event: - self.handle_event(event) + try: + self.handle_event(event) + except Exception as e: + log.exception("Failed to handle event: %s", event) + def handle_event(self, event_data): """Handle events from Enet Server. Either update value of actuator or