From 5f0a21fd934749a34c2bbde7529c9b944e0b6b94 Mon Sep 17 00:00:00 2001 From: bittles Date: Sun, 1 Jan 2023 23:49:33 -0500 Subject: [PATCH] trying to pull right part of payload --- custom_components/ecovacs/sucksbumper.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/custom_components/ecovacs/sucksbumper.py b/custom_components/ecovacs/sucksbumper.py index 50c6637..b46ee73 100644 --- a/custom_components/ecovacs/sucksbumper.py +++ b/custom_components/ecovacs/sucksbumper.py @@ -971,9 +971,10 @@ class EcoVacsXMPP(ClientXMPP): s(as_dict) if as_dict is None: - other_part = message.get_payload() - _LOGGER.debug("handle_ctl called with get_payload(), the other part:") - _LOGGER.debug(other_part) + try: + other_part = message.get_payload()[1][0] + _LOGGER.debug("handle_ctl called with get_payload()[1][0], the other part:") + _LOGGER.debug(other_part) def _ctl_to_dict(self, xml): result = xml.attrib.copy()