From 639d2362dc54e98111168c5586077e84f62eb693 Mon Sep 17 00:00:00 2001 From: Shahzeb Imran Date: Fri, 2 Dec 2022 22:27:40 +1000 Subject: [PATCH] remove power state check in command function --- src/jvc_projector_remote/jvcprojector.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/jvc_projector_remote/jvcprojector.py b/src/jvc_projector_remote/jvcprojector.py index 7bbd605..5c8399d 100644 --- a/src/jvc_projector_remote/jvcprojector.py +++ b/src/jvc_projector_remote/jvcprojector.py @@ -185,13 +185,6 @@ def power_off(self) -> None: self._send_command(Commands.power, "off") def command(self, command_string: str) -> Optional[str]: - ps = self.power_state() - if (command_string not in ["power-on", "power"]) and ps != "lamp_on": - raise JVCPoweredOffError( - f"Can't execute command: `{command_string}` unless the projector is in state `lamp_on`. " - f"Current power state is: `{ps}`" - ) - commandl: list[str] = command_string.split("-") if not hasattr(Commands, commandl[0]):