Update SpotArea
Update SpotArea and CLI command to more closely reflect the app Library: SpotArea namedarea -> area SpotArea customarea -> map_position CLI Commands: spotclean -> area Ex: sucks area 0,1 - will clean areas 0 and 1 / A and B area options: --map-postion|-p - will clean a specified map coordinate Ex: sucks area -p "-602,1812,800,723" - will clean the specified custom map coordinates
This commit is contained in:
+9
-4
@@ -179,10 +179,15 @@ def edge(frequency, minutes):
|
||||
return CliAction(Edge(), wait=TimeWait(minutes * 60))
|
||||
|
||||
|
||||
@cli.command(help='spotcleans provided room(s)')
|
||||
@click.argument('room', type=click.STRING)
|
||||
def spotclean(room):
|
||||
return CliAction(SpotArea('start', room), wait=StatusWait('charge_status', 'returning'))
|
||||
@cli.command(help='cleans provided area(s), ex: "0,1"',context_settings={"ignore_unknown_options": True}) #ignore_unknown for map coordinates with negatives
|
||||
@click.option("--map-position","-p", is_flag=True, help='clean provided map position instead of area, ex: "-602,1812,800,723"')
|
||||
@click.argument('area', type=click.STRING, required=True)
|
||||
def area(area, map_position):
|
||||
if map_position:
|
||||
return CliAction(SpotArea('start', map_position=area), wait=StatusWait('charge_status', 'returning'))
|
||||
else:
|
||||
return CliAction(SpotArea('start', area=area), wait=StatusWait('charge_status', 'returning'))
|
||||
|
||||
|
||||
@cli.command(help='returns to charger')
|
||||
def charge():
|
||||
|
||||
Reference in New Issue
Block a user