diff --git a/custom_components/deltadore_tydom/tydom/MessageHandler.py b/custom_components/deltadore_tydom/tydom/MessageHandler.py index 5d7270f..f5ca76e 100644 --- a/custom_components/deltadore_tydom/tydom/MessageHandler.py +++ b/custom_components/deltadore_tydom/tydom/MessageHandler.py @@ -149,6 +149,8 @@ async def parse_response(self, incoming, uri_origin, http_request_line): msg_type = "msg_scenarios" elif "/devices/install" in http_request_line: msg_type = "msg_pairing" + elif "/events" in http_request_line: + msg_type = "msg_event" elif "/ping" in uri_origin: msg_type = "msg_ping" elif data != "" and "cdata" in data: @@ -185,6 +187,10 @@ async def parse_response(self, incoming, uri_origin, http_request_line): parsed = json.loads(data) return await self.parse_devices_metadata(parsed=parsed) + elif msg_type == "msg_event": + LOGGER.debug("Event message, refreshing...") + await self.tydom_client.get_devices_data() + elif msg_type == "msg_html": LOGGER.debug("HTML Response ?")