Skip to content

Commit c413f0d

Browse files
author
jalcaras
committed
refactor: remove useless return, style
1 parent 20a2ef5 commit c413f0d

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

custom_components/weback_vacuum/vacdevice.py

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,16 @@ def __init__(
5050
async def watch_state(self):
5151
"""State watcher from VacDevice"""
5252
_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,
5456
)
5557
try:
5658
await self.refresh_handler(self.name, self.sub_type)
5759
except Exception as watch_excpt:
5860
_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,
6063
)
6164

6265
def on_message(self, ws, message):
@@ -76,7 +79,9 @@ async def load_maps(self):
7679
return False
7780

7881
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,
8085
)
8186
if map_data:
8287
self.map = VacMap(map_data)
@@ -237,37 +242,31 @@ async def turn_on(self):
237242
"""Turn ON vacuum"""
238243
working_payload = {self.ASK_STATUS: self.CLEAN_MODE_AUTO}
239244
await self.send_command(self.name, self.sub_type, working_payload)
240-
return
241245

242246
async def turn_off(self):
243247
"""Turn OFF vacuum"""
244248
working_payload = {self.ASK_STATUS: self.CHARGE_MODE_RETURNING}
245249
await self.send_command(self.name, self.sub_type, working_payload)
246-
return
247250

248251
async def pause(self):
249252
"""Pause vacuum"""
250253
working_payload = {self.ASK_STATUS: self.CLEAN_MODE_STOP}
251254
await self.send_command(self.name, self.sub_type, working_payload)
252-
return
253255

254256
async def clean_spot(self):
255257
"""Clean spot command"""
256258
working_payload = {self.ASK_STATUS: self.CLEAN_MODE_SPOT}
257259
await self.send_command(self.name, self.sub_type, working_payload)
258-
return
259260

260261
async def locate(self):
261262
"""Locate vacuum"""
262263
working_payload = {self.ASK_STATUS: self.ROBOT_LOCATION_SOUND}
263264
await self.send_command(self.name, self.sub_type, working_payload)
264-
return
265265

266266
async def return_to_base(self):
267267
"""Return to base command"""
268268
working_payload = {self.ASK_STATUS: self.CHARGE_MODE_RETURNING}
269269
await self.send_command(self.name, self.sub_type, working_payload)
270-
return
271270

272271
async def goto(self, point: str):
273272
"""GoTo point command"""
@@ -276,7 +275,6 @@ async def goto(self, point: str):
276275
self.GOTO_POINT: point,
277276
}
278277
await self.send_command(self.name, self.sub_type, working_payload)
279-
return
280278

281279
async def clean_rect(self, rectangle: str):
282280
"""Clean rectangle command"""
@@ -285,7 +283,6 @@ async def clean_rect(self, rectangle: str):
285283
self.RECTANGLE_INFO: rectangle,
286284
}
287285
await self.send_command(self.name, self.sub_type, working_payload)
288-
return
289286

290287
async def voice_mode(self, state: str):
291288
"""Voice mode"""
@@ -294,7 +291,6 @@ async def voice_mode(self, state: str):
294291
await self.send_command(self.name, self.sub_type, working_payload)
295292
else:
296293
_LOGGER.error("Voice mode can't be set with value : %s ", state)
297-
return
298294

299295
async def undisturb_mode(self, state: str):
300296
"""Undisturb mode"""
@@ -303,7 +299,6 @@ async def undisturb_mode(self, state: str):
303299
await self.send_command(self.name, self.sub_type, working_payload)
304300
else:
305301
_LOGGER.error("Undisturb mode can't be set with value : %s ", state)
306-
return
307302

308303
async def clean_room(self, room_ids_list: list):
309304
"""Clean room command"""

0 commit comments

Comments
 (0)