Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
msvisser committed Nov 19, 2023
1 parent 602ebc8 commit 5945ee2
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 8 deletions.
1 change: 0 additions & 1 deletion custom_components/remeha_home/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import config_entry_oauth2_flow
from homeassistant.helpers import aiohttp_client
from homeassistant.helpers.aiohttp_client import async_get_clientsession

from .api import RemehaHomeOAuth2Implementation, RemehaHomeAPI
Expand Down
5 changes: 3 additions & 2 deletions custom_components/remeha_home/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ async def async_set_manual(self, climate_zone_id: str, setpoint: float):
response.raise_for_status()

async def async_set_schedule(self, climate_zone_id: str, heating_program_id: int):
"""
Set a climate zone to schedule mode.
"""Set a climate zone to schedule mode.
The supplied heating program id should match the current heating program id.
"""
response = await self._async_api_request(
Expand Down Expand Up @@ -139,6 +139,7 @@ class RemehaHomeOAuth2Implementation(AbstractOAuth2Implementation):
"""Custom OAuth2 implementation for the Remeha Home integration."""

def __init__(self, session: ClientSession) -> None:
"""Create a Remeha Home OAuth2 implementation."""
self._session = session

@property
Expand Down
5 changes: 3 additions & 2 deletions custom_components/remeha_home/binary_sensor.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Platform for binary sensor integration."""
from __future__ import annotations
import logging
from typing import Callable
from collections.abc import Callable


from homeassistant.components.binary_sensor import (
Expand All @@ -27,7 +27,7 @@
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
) -> None:
"""Setup the Remeha Home sensor entities from a config entry."""
"""Set up the Remeha Home sensor entities from a config entry."""
coordinator = hass.data[DOMAIN][entry.entry_id]["coordinator"]

entities = []
Expand Down Expand Up @@ -77,6 +77,7 @@ def __init__(
entity_description: BinarySensorEntityDescription,
transform_func: Callable[[str], bool],
) -> None:
"""Create a Remeha Home binary sensor entity."""
super().__init__(coordinator)
self.entity_description = entity_description
self.transform_func = transform_func
Expand Down
3 changes: 2 additions & 1 deletion custom_components/remeha_home/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async def async_setup_entry(
entry: ConfigEntry,
async_add_entities: AddEntitiesCallback,
) -> None:
"""Setup the Remeha Home climate entity from a config entry."""
"""Set up the Remeha Home climate entity from a config entry."""
api = hass.data[DOMAIN][entry.entry_id]["api"]
coordinator = hass.data[DOMAIN][entry.entry_id]["coordinator"]

Expand Down Expand Up @@ -90,6 +90,7 @@ def __init__(
coordinator: RemehaHomeUpdateCoordinator,
climate_zone_id: str,
) -> None:
"""Create a Remeha Home climate entity."""
super().__init__(coordinator)
self.api = api
self.coordinator = coordinator
Expand Down
1 change: 1 addition & 0 deletions custom_components/remeha_home/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class RemehaHomeLoginFlowHandler(AbstractOAuth2FlowHandler, domain=DOMAIN):
CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL

def __init__(self):
"""Create a Remeha Home login flow."""
super().__init__()
self.flow_impl: RemehaHomeOAuth2Implementation = None # type: ignore

Expand Down
1 change: 1 addition & 0 deletions custom_components/remeha_home/coordinator.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Coordinator for fetching the Remeha Home data."""
from datetime import timedelta
import logging

Expand Down
3 changes: 2 additions & 1 deletion custom_components/remeha_home/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
) -> None:
"""Setup the Remeha Home sensor entities from a config entry."""
"""Set up the Remeha Home sensor entities from a config entry."""
coordinator = hass.data[DOMAIN][entry.entry_id]["coordinator"]

entities = []
Expand Down Expand Up @@ -68,6 +68,7 @@ def __init__(
item_id: str,
entity_description: SensorEntityDescription,
) -> None:
"""Create a Remeha Home sensor entity."""
super().__init__(coordinator)
self.entity_description = entity_description
self.item_id = item_id
Expand Down
4 changes: 3 additions & 1 deletion custom_components/remeha_home/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
) -> None:
"""Setup the Remeha Home switch entities from a config entry."""
"""Set up the Remeha Home switch entities from a config entry."""
api = hass.data[DOMAIN][entry.entry_id]["api"]
coordinator = hass.data[DOMAIN][entry.entry_id]["coordinator"]

Expand Down Expand Up @@ -52,6 +52,7 @@ def __init__(
climate_zone_id: str,
entity_description: SwitchEntityDescription,
) -> None:
"""Create a Remeha Home switch entity."""
super().__init__(coordinator)
self.api = api
self.climate_zone_id = climate_zone_id
Expand Down Expand Up @@ -86,6 +87,7 @@ def __init__(
coordinator: RemehaHomeUpdateCoordinator,
climate_zone_id: str,
) -> None:
"""Create a Remeha Home fireplace mode switch entity."""
super().__init__(
api,
coordinator,
Expand Down

0 comments on commit 5945ee2

Please sign in to comment.