From 05a5e6c2ffc617ce92308389fd6928e3744cc496 Mon Sep 17 00:00:00 2001 From: Jonni Liljamo Date: Mon, 14 Apr 2025 21:34:22 +0300 Subject: [PATCH] chore: fix a few lints --- custom_components/ouman_eh800/__init__.py | 8 ++++---- custom_components/ouman_eh800/const.py | 2 +- custom_components/ouman_eh800/eh800.py | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/custom_components/ouman_eh800/__init__.py b/custom_components/ouman_eh800/__init__.py index e750ef9..487dbae 100644 --- a/custom_components/ouman_eh800/__init__.py +++ b/custom_components/ouman_eh800/__init__.py @@ -36,7 +36,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: config[CONF_PASSWORD], ) # Do an initial update straight away. - await eh800.update() + _ = await eh800.update() device = OumanEH800Device(hass, eh800, entry) @@ -49,9 +49,9 @@ class OumanEH800Device: """Ouman EH-800 Device instance.""" def __init__(self, hass: HomeAssistant, device: EH800, entry: ConfigEntry) -> None: - self._hass = hass - self.device = device - self.entry = entry + self._hass: HomeAssistant = hass + self.device: EH800 = device + self.entry: ConfigEntry = entry @Throttle(UPDATE_INTERVAL) async def async_update( diff --git a/custom_components/ouman_eh800/const.py b/custom_components/ouman_eh800/const.py index 858552f..6d6c778 100644 --- a/custom_components/ouman_eh800/const.py +++ b/custom_components/ouman_eh800/const.py @@ -1,4 +1,4 @@ -""" Ouman EH-800 consts """ +"""Ouman EH-800 consts""" DOMAIN = "ouman_eh800" diff --git a/custom_components/ouman_eh800/eh800.py b/custom_components/ouman_eh800/eh800.py index 0229d0f..7683c21 100644 --- a/custom_components/ouman_eh800/eh800.py +++ b/custom_components/ouman_eh800/eh800.py @@ -85,12 +85,12 @@ class EH800: def __init__( self, hass: HomeAssistant, host: str, port: int, username: str, password: str ) -> None: - self._uri = f"http://{host}:{port}" - self._login = f"uid={username};pwd={password};" + self._uri: str = f"http://{host}:{port}" + self._login: str = f"uid={username};pwd={password};" self._client: AsyncClient = get_async_client(hass) - self._request_query = "request?" + self._request_query: str = "request?" for value in VALUES: self._request_query += f"{value.register};" @@ -163,7 +163,7 @@ class EH800: return True - async def update_value(self, key, new_value) -> None: + async def update_value(self, key: str, new_value) -> None: """Update a value via the API.""" value = [value for value in VALUES if value.key == key][0] _LOGGER.debug( -- 2.44.1