From 70288f42cb3b728df84977258ba590f563bf49df Mon Sep 17 00:00:00 2001 From: Maikel Punie Date: Thu, 12 Dec 2024 06:12:44 +0100 Subject: [PATCH] Fix typing mistakes (#129) --- velbusaio/controller.py | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/velbusaio/controller.py b/velbusaio/controller.py index ff36a54..8aa8fce 100644 --- a/velbusaio/controller.py +++ b/velbusaio/controller.py @@ -13,7 +13,22 @@ import serial import serial_asyncio_fast -from velbusaio.channels import Channel +from velbusaio.channels import ( + Blind, + Button, + ButtonCounter, + Channel, + Dimmer, + EdgeLit, + LightSensor, + Memo, + Relay, + SelectedProgram, + Sensor, + SensorNumber, + Temperature, + ThermostatChannel, +) from velbusaio.exceptions import VelbusConnectionFailed from velbusaio.handler import PacketHandler from velbusaio.helpers import get_cache_dir @@ -203,7 +218,23 @@ async def send(self, msg: Message) -> None: ) ) - def get_all(self, class_name: str) -> list[Channel]: + def get_all( + self, class_name: str + ) -> list[ + Blind + | Button + | ButtonCounter + | Sensor + | ThermostatChannel + | Dimmer + | Temperature + | SensorNumber + | LightSensor + | Relay + | EdgeLit + | Memo + | SelectedProgram + ]: """Get all channels.""" lst = [] for addr, mod in (self.get_modules()).items():