8989
9090
9191class TUYA_CODES (StrEnum ):
92- MODE = "5"
93- STATE = "15"
94- # FAN_SPEED = "102"
95- FAN_SPEED = "130"
9692 BATTERY_LEVEL = "104"
93+ STATE = "15"
9794 ERROR_CODE = "106"
98- CLEANING_TIME = "109"
95+ MODE = "5"
96+ FAN_SPEED = "102"
9997 CLEANING_AREA = "110"
98+ CLEANING_TIME = "109"
99+ AUTO_RETURN = "135"
100100 DO_NOT_DISTURB = "107"
101- DO_NOT_DISTURB2 = "139"
102101 BOOST_IQ = "118"
103- AUTO_RETURN = "135"
104- RETURN_HOME = "101" # boolean
105- A_111 = "111" # 65?
106- A_122 = "122" # continue
107- A_131 = "131" # false
108- A_137 = "137" # 0
109- HARDWARE_CODE = "115" # decoded
110- A_112 = "112" # decoded clean record?
111- A_113 = "113" # decoded
112- CLEAN_STATISTIC = "114" # decoded
113- MULTI_MAPS = "117" # decoded
114102
115103
116104TUYA_CONSUMABLES_CODES = ["142" , "116" ]
@@ -364,14 +352,7 @@ def update_entity_values(self):
364352 # self.map_data = self.tuyastatus.get("121")
365353 # self.erro_msg? = self.tuyastatus.get("124")
366354 if self .robovac_supported & RoboVacEntityFeature .CONSUMABLES :
367- _LOGGER .debug ("Support Consumables" )
368355 for CONSUMABLE_CODE in TUYA_CONSUMABLES_CODES :
369- _LOGGER .debug ("Consumable code is: {}" .format (CONSUMABLE_CODE ))
370- _LOGGER .debug (
371- "Consumables value is: {}" .format (
372- self .tuyastatus .get (CONSUMABLE_CODE )
373- )
374- )
375356 if (
376357 CONSUMABLE_CODE in self .tuyastatus
377358 and self .tuyastatus .get (CONSUMABLE_CODE ) is not None
@@ -381,18 +362,10 @@ def update_entity_values(self):
381362 "ascii"
382363 )
383364 )
384- _LOGGER .debug (
385- "Consumables decoded value is: {}" .format (consumables )
386- )
387365 if (
388366 "consumable" in consumables
389367 and "duration" in consumables ["consumable" ]
390368 ):
391- _LOGGER .debug (
392- "Consumables encoded value is: {}" .format (
393- consumables ["consumable" ]["duration" ]
394- )
395- )
396369 self ._attr_consumables = consumables ["consumable" ]["duration" ]
397370
398371 async def async_locate (self , ** kwargs ):
@@ -432,7 +405,7 @@ async def async_set_fan_speed(self, fan_speed, **kwargs):
432405 fan_speed = "Boost_IQ"
433406 elif fan_speed == "Pure" :
434407 fan_speed = "Quiet"
435- await self .vacuum .async_set ({"130 " : fan_speed })
408+ await self .vacuum .async_set ({"102 " : fan_speed })
436409
437410 async def async_send_command (
438411 self , command : str , params : dict | list | None = None , ** kwargs
0 commit comments