DEVELOPMENT ENVIRONMENT

~liljamo/ha-ouman-eh800

05a5e6c2ffc617ce92308389fd6928e3744cc496 — Jonni Liljamo a day ago 5eee86f master
chore: fix a few lints
M custom_components/ouman_eh800/__init__.py => custom_components/ouman_eh800/__init__.py +4 -4
@@ 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(

M custom_components/ouman_eh800/const.py => custom_components/ouman_eh800/const.py +1 -1
@@ 1,4 1,4 @@
""" Ouman EH-800 consts """
"""Ouman EH-800 consts"""

DOMAIN = "ouman_eh800"


M custom_components/ouman_eh800/eh800.py => custom_components/ouman_eh800/eh800.py +4 -4
@@ 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(