Skip to content

Commit

Permalink
🎨 format from Home Assistant standard
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludy87 committed Feb 10, 2024
1 parent 3e2eff4 commit cbd55be
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 18 deletions.
1 change: 1 addition & 0 deletions custom_components/ecotrend_ista/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import logging

import voluptuous as vol

from homeassistant import config_entries
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_EMAIL, CONF_PASSWORD, Platform
Expand Down
11 changes: 4 additions & 7 deletions custom_components/ecotrend_ista/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,15 @@
from types import MappingProxyType
from typing import Any

from pyecotrend_ista.exception_classes import LoginError
from pyecotrend_ista.pyecotrend_ista import PyEcotrendIsta
import requests
import voluptuous as vol

from homeassistant import config_entries, core
from homeassistant.const import CONF_EMAIL, CONF_PASSWORD
from homeassistant.data_entry_flow import FlowResult
from homeassistant.helpers.selector import (
NumberSelector,
NumberSelectorConfig,
NumberSelectorMode,
)
from pyecotrend_ista.exception_classes import LoginError
from pyecotrend_ista.pyecotrend_ista import PyEcotrendIsta
from homeassistant.helpers.selector import NumberSelector, NumberSelectorConfig, NumberSelectorMode

from .const import CONF_MFA, CONF_UPDATE_INTERVAL, CONF_URL, DOMAIN, MANUFACTURER
from .const_schema import DATA_SCHEMA_EMAIL, URL_SELECTOR
Expand Down
1 change: 1 addition & 0 deletions custom_components/ecotrend_ista/const_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from __future__ import annotations

import voluptuous as vol

from homeassistant.const import CONF_EMAIL, CONF_PASSWORD, CONF_SCAN_INTERVAL
from homeassistant.helpers.selector import (
NumberSelector,
Expand Down
7 changes: 4 additions & 3 deletions custom_components/ecotrend_ista/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
from __future__ import annotations

import datetime
from datetime import timedelta
import json
import logging
import os
from datetime import timedelta
from typing import Any

from pyecotrend_ista.helper_object_de import CustomRaw
from pyecotrend_ista.pyecotrend_ista import PyEcotrendIsta
import requests

from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
from pyecotrend_ista.helper_object_de import CustomRaw
from pyecotrend_ista.pyecotrend_ista import PyEcotrendIsta

from .config_flow import login_account
from .const import CONF_UPDATE_INTERVAL, DOMAIN
Expand Down
6 changes: 1 addition & 5 deletions custom_components/ecotrend_ista/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
from dataclasses import dataclass
from typing import Literal

from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntityDescription,
SensorStateClass,
)
from homeassistant.components.sensor import SensorDeviceClass, SensorEntityDescription, SensorStateClass
from homeassistant.const import EntityCategory, UnitOfEnergy, UnitOfVolume

from .const import (
Expand Down
7 changes: 4 additions & 3 deletions custom_components/ecotrend_ista/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

from __future__ import annotations

from collections.abc import Callable
import datetime
import logging
from collections.abc import Callable
from typing import Any, cast

from pyecotrend_ista.helper_object_de import CustomRaw
from pyecotrend_ista.pyecotrend_ista import PyEcotrendIsta

from homeassistant.components.sensor import RestoreSensor, SensorEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
Expand All @@ -15,8 +18,6 @@
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import StateType
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from pyecotrend_ista.helper_object_de import CustomRaw
from pyecotrend_ista.pyecotrend_ista import PyEcotrendIsta

from .const import (
CONF_TYPE_HEATING_CUSTOM,
Expand Down

0 comments on commit cbd55be

Please sign in to comment.