Skip to content

Commit

Permalink
remove power state check in command function
Browse files Browse the repository at this point in the history
  • Loading branch information
bezmi committed Dec 2, 2022
1 parent bbd1645 commit 639d236
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/jvc_projector_remote/jvcprojector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]):
Expand Down

0 comments on commit 639d236

Please sign in to comment.