From 6f5112782d186c67ccd5119b256feb92b0c688c4 Mon Sep 17 00:00:00 2001 From: Sam Stenvall Date: Thu, 12 Sep 2024 21:10:26 +0300 Subject: [PATCH] Return int from view_input --- custom_components/extron/extron.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/extron/extron.py b/custom_components/extron/extron.py index 3ac2e7a..4e6e323 100644 --- a/custom_components/extron/extron.py +++ b/custom_components/extron/extron.py @@ -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)}$") @@ -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)}!")