diff --git a/app/wyzebridge/wyze_commands.py b/app/wyzebridge/wyze_commands.py index 9e35099a..6f637f1f 100644 --- a/app/wyzebridge/wyze_commands.py +++ b/app/wyzebridge/wyze_commands.py @@ -58,6 +58,7 @@ "rtsp": "K10600SetRtspSwitch", "quick_response": "K11635ResponseQuickMessage", "spotlight": "K10646SetSpotlightStatus", + "floodlight": "K12060SetFloodLightSwitch", } CMD_VALUES = { diff --git a/app/wyzecam/tutk/tutk_protocol.py b/app/wyzecam/tutk/tutk_protocol.py index 66b5107e..b011ad2a 100644 --- a/app/wyzecam/tutk/tutk_protocol.py +++ b/app/wyzecam/tutk/tutk_protocol.py @@ -1229,6 +1229,21 @@ def __init__(self): super().__init__(10820) +class K12060SetFloodLightSwitch(TutkWyzeProtocolMessage): + """ + A message used to set the flood light switch. + """ + + def __init__(self, value): + super().__init__(12060) + + assert 1 <= value <= 2, "value must be 1 or 2" + self.value: int = value + + def encode(self) -> bytes: + return encode(self.code, bytes([self.value])) + + def encode(code: int, data: Optional[bytes]) -> bytes: data_len = 0 if data is None else len(data) encoded_msg = bytearray([0] * (16 + data_len))