Skip to content

Commit

Permalink
Return int from view_input
Browse files Browse the repository at this point in the history
  • Loading branch information
Jalle19 committed Sep 12, 2024
1 parent 8bcdf39 commit 6f51127
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions custom_components/extron/extron.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ def __init__(self, device: ExtronDevice) -> None:
def get_device(self) -> ExtronDevice:
return self._device

async def view_input(self):
return await self._device.run_command("$")
async def view_input(self) -> int:
return int(await self._device.run_command("$"))

async def select_input(self, input: int):
await self._device.run_command(f"{str(input)}$")
Expand Down Expand Up @@ -154,8 +154,8 @@ def __init__(self, device: ExtronDevice) -> None:
def get_device(self) -> ExtronDevice:
return self._device

async def view_input(self):
return await self._device.run_command("!")
async def view_input(self) -> int:
return int(await self._device.run_command("!"))

async def select_input(self, input: int):
await self._device.run_command(f"{str(input)}!")

0 comments on commit 6f51127

Please sign in to comment.