fix some bugs

This commit is contained in:
Andrey
2020-12-28 23:32:24 +03:00
parent c4b597d019
commit 7822f50500
2 changed files with 5 additions and 2 deletions

View File

@@ -145,6 +145,7 @@ class MegaD:
ftr.set_result(json.loads(msg.payload).get('value'))
except Exception as exc:
self.lg.warning(f'could not parse {msg.payload}: {exc}')
ftr.set_result(None)
unsub = await self.mqtt.async_subscribe(
topic=f'{self.mqtt_id}/{port}',
msg_callback=cb,