From 4f1bdb3bac41ddc1aaa9b51d6675c7a0a10b9b9b Mon Sep 17 00:00:00 2001 From: Dennis Melzer Date: Wed, 10 Jan 2024 15:11:04 +0100 Subject: [PATCH] Add debug infos --- custom_components/robovac/vacuum.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/custom_components/robovac/vacuum.py b/custom_components/robovac/vacuum.py index 6b94239..6313b9c 100644 --- a/custom_components/robovac/vacuum.py +++ b/custom_components/robovac/vacuum.py @@ -354,7 +354,14 @@ class RoboVacEntity(StateVacuumEntity): # self.map_data = self.tuyastatus.get("121") # self.erro_msg? = self.tuyastatus.get("124") if self.robovac_supported & RoboVacEntityFeature.CONSUMABLES: + _LOGGER.debug("Support Consumables") for CONSUMABLE_CODE in TUYA_CONSUMABLES_CODES: + _LOGGER.debug("Consumable code is: {}".format(CONSUMABLE_CODE)) + _LOGGER.debug( + "Consumables value is: {}".format( + self.tuyastatus.get(CONSUMABLE_CODE) + ) + ) if ( CONSUMABLE_CODE in self.tuyastatus and self.tuyastatus.get(CONSUMABLE_CODE) is not None @@ -364,6 +371,9 @@ class RoboVacEntity(StateVacuumEntity): "ascii" ) ) + _LOGGER.debug( + "Consumables decoded value is: {}".format(consumables) + ) if "consumable" in consumables and "duration" in consumables: self._attr_consumables = consumables["consumable"]["duration"]