mix methods to get payload and convert to string

This commit is contained in:
bittles
2023-01-02 15:47:38 -05:00
parent 0170a9e177
commit 5a3cc283be
+6 -1
View File
@@ -946,8 +946,13 @@ class EcoVacsXMPP(ClientXMPP):
self.ctl_subscribers.append(function) self.ctl_subscribers.append(function)
def _handle_ctl(self, message): def _handle_ctl(self, message):
the_good_part = str(message.payload.decode("utf-8")) _LOGGER.debug("message in handle_ctl is :")
_LOGGER.debug(message)
# the_good_part = str(message.payload.decode("utf-8"))
# the_good_part = message.get_payload()[0][0] # the_good_part = message.get_payload()[0][0]
the_good_part = str(message.get_payload().decode("utf-8"))
_LOGGER.debug("the_good_part in handle_ctl is :")
_LOGGER.debug(message)
# other_part = "{'ret': 'ok'}" # other_part = "{'ret': 'ok'}"
# try: # try:
# other_part = message.get_payload()[0][0][0] # other_part = message.get_payload()[0][0][0]