Add clean_status for IOT
Add clean_status for IOT - Reports cleaning or paused
This commit is contained in:
@@ -403,6 +403,14 @@ class VacBot():
|
|||||||
_LOGGER.warning("Unknown cleaning status '" + type + "'")
|
_LOGGER.warning("Unknown cleaning status '" + type + "'")
|
||||||
self.clean_status = type
|
self.clean_status = type
|
||||||
self.vacuum_status = type
|
self.vacuum_status = type
|
||||||
|
|
||||||
|
if self.vacuum['iot']:
|
||||||
|
cleaning = event.get('st', None)
|
||||||
|
if cleaning == 'p':
|
||||||
|
self.clean_status = 'paused'
|
||||||
|
else:
|
||||||
|
self.clean_status = 'cleaning'
|
||||||
|
|
||||||
fan = event.get('speed', None)
|
fan = event.get('speed', None)
|
||||||
if fan is not None:
|
if fan is not None:
|
||||||
try:
|
try:
|
||||||
|
|||||||
+2
-1
@@ -215,7 +215,8 @@ def run(actions, debug):
|
|||||||
vacbot = VacBot(api.uid, api.REALM, api.resource, api.user_access_token, vacuum, config['continent'])
|
vacbot = VacBot(api.uid, api.REALM, api.resource, api.user_access_token, vacuum, config['continent'])
|
||||||
#vacbot.connect_and_wait_until_ready()(
|
#vacbot.connect_and_wait_until_ready()(
|
||||||
|
|
||||||
vacbot.run(Clean('spotarea', 'normal', 'start', '2'))
|
#vacbot.run(Clean('spotarea', 'normal', 'start', '2'))
|
||||||
|
vacbot.request_all_statuses()
|
||||||
|
|
||||||
# for action in actions:
|
# for action in actions:
|
||||||
# click.echo("performing " + str(action.vac_command))
|
# click.echo("performing " + str(action.vac_command))
|
||||||
|
|||||||
Reference in New Issue
Block a user