diff --git a/midealocal/devices/e1/message.py b/midealocal/devices/e1/message.py index 9e39615b..345e7060 100644 --- a/midealocal/devices/e1/message.py +++ b/midealocal/devices/e1/message.py @@ -53,6 +53,24 @@ def _body(self) -> bytearray: return bytearray([power, 0x00, 0x00, 0x00]) +class MessageWork(MessageE1Base): + """E1 message work.""" + + def __init__(self, protocol_version: int) -> None: + """Initialize E1 message work.""" + super().__init__( + protocol_version=protocol_version, + message_type=MessageType.set, + body_type=BodyType.X08, + ) + self.work_status = 0x3 + self.mode = 0 + + @property + def _body(self) -> bytearray: + return bytearray([self.work_status, self.mode, 0x00, 0x00]) + + class MessageLock(MessageE1Base): """E1 message lock.""" diff --git a/midealocal/message.py b/midealocal/message.py index 416c2952..55589e7e 100644 --- a/midealocal/message.py +++ b/midealocal/message.py @@ -30,6 +30,7 @@ class BodyType(IntEnum): X05 = 0x05 X06 = 0x06 X07 = 0x07 + X08 = 0x08 X0A = 0x0A X11 = 0x11 X21 = 0x21