diff --git a/takway/clients/web_socket_client_utils.py b/takway/clients/web_socket_client_utils.py index adb393b..6f11545 100644 --- a/takway/clients/web_socket_client_utils.py +++ b/takway/clients/web_socket_client_utils.py @@ -177,6 +177,11 @@ class WebSocketClinet: if self.wakeup_event.is_set(): print(f"{datetime.now()}: Wake up by button.") else: + if self.sleep_event.is_set(): + print(f"{datetime.now()}: stay sleep mode.") + recorder.hardware.long_power_status = False + self.sleep_event.clear() + continue if recorder.is_wakeup(data): recorder.hardware.long_power_status = True self.wakeup_event.set()