diff --git a/custom_components/ecovacs/sucksbumper.py b/custom_components/ecovacs/sucksbumper.py index 748642e..d61a2ac 100644 --- a/custom_components/ecovacs/sucksbumper.py +++ b/custom_components/ecovacs/sucksbumper.py @@ -980,19 +980,23 @@ class EcoVacsXMPP(ClientXMPP): return result elif 'type' in result: - result['event'] = result.pop('type') - if xml: - result.update(xml[0].attrib) +# result['event'] = result.pop('type') + if 'errno' in result: + if result['errno'] = '': + result['errno'] = 'handle_life_span' + result['event'] = result.pop('errno') + if xml: + result.update(xml[0].attrib) - for key in result: - if not RepresentsInt(result[key]): #Fix to handle negative int values - result[key] = stringcase.snakecase(result[key]) - - _LOGGER.debug("type detected in result and result is:") - _LOGGER.debug(result) - _LOGGER.debug("end of type detect result") - - return result + for key in result: + if not RepresentsInt(result[key]): #Fix to handle negative int values + result[key] = stringcase.snakecase(result[key]) + + _LOGGER.debug("type detected in result and result is:") + _LOGGER.debug(result) + _LOGGER.debug("end of type detect result") + + return result else: # This happens for commands with no response data, such as PlaySound