diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2023-05-31 09:22:00 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2023-06-03 01:01:27 +0300 |
commit | 0f0a5fd44867b684bcbafd102b6b769ae61229b4 (patch) | |
tree | d4845bd3295159c06041b25753af4eb2d7b59461 /src/home/mqtt/payload/relay.py | |
parent | 3e3753d726f8a02d98368f20f77dd9fa739e3d80 (diff) |
wip
Diffstat (limited to 'src/home/mqtt/payload/relay.py')
-rw-r--r-- | src/home/mqtt/payload/relay.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/home/mqtt/payload/relay.py b/src/home/mqtt/payload/relay.py deleted file mode 100644 index 4902991..0000000 --- a/src/home/mqtt/payload/relay.py +++ /dev/null @@ -1,22 +0,0 @@ -from .base_payload import MqttPayload -from .esp import ( - OTAResultPayload, - OTAPayload, - InitialDiagnosticsPayload, - DiagnosticsPayload -) - - -class PowerPayload(MqttPayload): - FORMAT = '=12sB' - PACKER = { - 'state': lambda n: int(n), - 'secret': lambda s: s.encode('utf-8') - } - UNPACKER = { - 'state': lambda n: bool(n), - 'secret': lambda s: s.decode('utf-8') - } - - secret: str - state: bool |