diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2023-01-01 18:47:56 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2023-01-01 18:47:56 +0300 |
commit | 1162a9cc5393cf614654ba763ccfd0298df0765f (patch) | |
tree | ab96d9a73c4bde08263a9f576a6c63bd94359f98 /src/home/mqtt/payload | |
parent | 5e39b5c7c0bbff7317576e72b591754192f98e23 (diff) |
mqtt relay: support OTAResult payload
Diffstat (limited to 'src/home/mqtt/payload')
-rw-r--r-- | src/home/mqtt/payload/relay.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/home/mqtt/payload/relay.py b/src/home/mqtt/payload/relay.py index debc2c8..1a38201 100644 --- a/src/home/mqtt/payload/relay.py +++ b/src/home/mqtt/payload/relay.py @@ -62,6 +62,12 @@ class PowerPayload(MQTTPayload): state: bool +class OTAResultPayload(MQTTPayload): + FORMAT = '=BB' + result: int + error_code: int + + class OTAPayload(MQTTPayload): secret: str filename: str @@ -87,3 +93,4 @@ class OTAPayload(MQTTPayload): # secret = buf[:12].decode() # filename = buf[12:].decode() # return OTAPayload(secret=secret, filename=filename) + |