From aac3d0f31ea1db7e588ec21ed8cefa6b55663cae Mon Sep 17 00:00:00 2001 From: bittles Date: Mon, 2 Jan 2023 15:59:06 -0500 Subject: [PATCH] will see if i can get full payload to send to dict but if not will break down to seperate --- custom_components/ecovacs/sucksbumper.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/custom_components/ecovacs/sucksbumper.py b/custom_components/ecovacs/sucksbumper.py index 11f23e5..90e7bb4 100644 --- a/custom_components/ecovacs/sucksbumper.py +++ b/custom_components/ecovacs/sucksbumper.py @@ -950,7 +950,7 @@ class EcoVacsXMPP(ClientXMPP): _LOGGER.debug(message) # the_good_part = str(message.payload.decode("utf-8")) # the_good_part = message.get_payload()[0][0] - the_good_part = str(message.get_payload()) + the_good_part = message.get_payload() _LOGGER.debug("the_good_part in handle_ctl is :") _LOGGER.debug(message) # other_part = "{'ret': 'ok'}" @@ -981,9 +981,8 @@ class EcoVacsXMPP(ClientXMPP): # except IndexError: # _LOGGER.debug("No extra payload") - def _ctl_to_dict(self, xmlstring): + def _ctl_to_dict(self, xml): #Including changes from jasonarends @ 28da7c2 below - xml = ET.fromstring(xmlstring) result = xml.attrib.copy() if 'td' not in result: # This happens for commands with no response data, such as PlaySound