Add clean_status for IOT

Add clean_status for IOT
- Reports cleaning or paused
This commit is contained in:
Brian Martin
2019-01-13 14:12:29 -05:00
parent 0da4532908
commit c1f6814f8e
2 changed files with 11 additions and 2 deletions
+8
View File
@@ -403,6 +403,14 @@ class VacBot():
_LOGGER.warning("Unknown cleaning status '" + type + "'")
self.clean_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)
if fan is not None:
try:
+2 -1
View File
@@ -215,7 +215,8 @@ def run(actions, debug):
vacbot = VacBot(api.uid, api.REALM, api.resource, api.user_access_token, vacuum, config['continent'])
#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:
# click.echo("performing " + str(action.vac_command))