@@ -50,13 +50,16 @@ def __init__(
50
50
async def watch_state (self ):
51
51
"""State watcher from VacDevice"""
52
52
_LOGGER .debug (
53
- "VacDevice: starting state watcher for= %s (%s)" , self .name , self .sub_type
53
+ "VacDevice: starting state watcher for= %s (%s)" ,
54
+ self .name ,
55
+ self .sub_type ,
54
56
)
55
57
try :
56
58
await self .refresh_handler (self .name , self .sub_type )
57
59
except Exception as watch_excpt :
58
60
_LOGGER .exception (
59
- "Error on watch_state starting refresh_handler %s" , watch_excpt
61
+ "Error on watch_state starting refresh_handler %s" ,
62
+ watch_excpt ,
60
63
)
61
64
62
65
def on_message (self , ws , message ):
@@ -76,7 +79,9 @@ async def load_maps(self):
76
79
return False
77
80
78
81
map_data = await self .get_reuse_map_by_id (
79
- self .robot_status [self .ACTIVE_MAP_ID_PROP ], self .sub_type , self .name
82
+ self .robot_status [self .ACTIVE_MAP_ID_PROP ],
83
+ self .sub_type ,
84
+ self .name ,
80
85
)
81
86
if map_data :
82
87
self .map = VacMap (map_data )
@@ -237,37 +242,31 @@ async def turn_on(self):
237
242
"""Turn ON vacuum"""
238
243
working_payload = {self .ASK_STATUS : self .CLEAN_MODE_AUTO }
239
244
await self .send_command (self .name , self .sub_type , working_payload )
240
- return
241
245
242
246
async def turn_off (self ):
243
247
"""Turn OFF vacuum"""
244
248
working_payload = {self .ASK_STATUS : self .CHARGE_MODE_RETURNING }
245
249
await self .send_command (self .name , self .sub_type , working_payload )
246
- return
247
250
248
251
async def pause (self ):
249
252
"""Pause vacuum"""
250
253
working_payload = {self .ASK_STATUS : self .CLEAN_MODE_STOP }
251
254
await self .send_command (self .name , self .sub_type , working_payload )
252
- return
253
255
254
256
async def clean_spot (self ):
255
257
"""Clean spot command"""
256
258
working_payload = {self .ASK_STATUS : self .CLEAN_MODE_SPOT }
257
259
await self .send_command (self .name , self .sub_type , working_payload )
258
- return
259
260
260
261
async def locate (self ):
261
262
"""Locate vacuum"""
262
263
working_payload = {self .ASK_STATUS : self .ROBOT_LOCATION_SOUND }
263
264
await self .send_command (self .name , self .sub_type , working_payload )
264
- return
265
265
266
266
async def return_to_base (self ):
267
267
"""Return to base command"""
268
268
working_payload = {self .ASK_STATUS : self .CHARGE_MODE_RETURNING }
269
269
await self .send_command (self .name , self .sub_type , working_payload )
270
- return
271
270
272
271
async def goto (self , point : str ):
273
272
"""GoTo point command"""
@@ -276,7 +275,6 @@ async def goto(self, point: str):
276
275
self .GOTO_POINT : point ,
277
276
}
278
277
await self .send_command (self .name , self .sub_type , working_payload )
279
- return
280
278
281
279
async def clean_rect (self , rectangle : str ):
282
280
"""Clean rectangle command"""
@@ -285,7 +283,6 @@ async def clean_rect(self, rectangle: str):
285
283
self .RECTANGLE_INFO : rectangle ,
286
284
}
287
285
await self .send_command (self .name , self .sub_type , working_payload )
288
- return
289
286
290
287
async def voice_mode (self , state : str ):
291
288
"""Voice mode"""
@@ -294,7 +291,6 @@ async def voice_mode(self, state: str):
294
291
await self .send_command (self .name , self .sub_type , working_payload )
295
292
else :
296
293
_LOGGER .error ("Voice mode can't be set with value : %s " , state )
297
- return
298
294
299
295
async def undisturb_mode (self , state : str ):
300
296
"""Undisturb mode"""
@@ -303,7 +299,6 @@ async def undisturb_mode(self, state: str):
303
299
await self .send_command (self .name , self .sub_type , working_payload )
304
300
else :
305
301
_LOGGER .error ("Undisturb mode can't be set with value : %s " , state )
306
- return
307
302
308
303
async def clean_room (self , room_ids_list : list ):
309
304
"""Clean room command"""
0 commit comments