Sort imports

This commit is contained in:
Jules 2023-12-26 18:04:57 +01:00
parent caa0455db8
commit 0a82f58fb5
Signed by: jdejaegh
GPG key ID: 99D6D184CA66933A
6 changed files with 28 additions and 32 deletions

View file

@ -3,8 +3,8 @@
# File inspired from https://github.com/ludeeus/integration_blueprint # File inspired from https://github.com/ludeeus/integration_blueprint
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.const import CONF_ZONE from homeassistant.const import CONF_ZONE
from homeassistant.core import HomeAssistant
from .const import DOMAIN, PLATFORMS from .const import DOMAIN, PLATFORMS
from .coordinator import IrmKmiCoordinator from .coordinator import IrmKmiCoordinator

View file

@ -1,14 +1,14 @@
"""API Client for IRM KMI weather""" """API Client for IRM KMI weather"""
from __future__ import annotations from __future__ import annotations
import logging
import asyncio import asyncio
import hashlib
import logging
import socket import socket
from datetime import datetime
import aiohttp import aiohttp
import async_timeout import async_timeout
import hashlib
from datetime import datetime
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)

View file

@ -1,6 +1,6 @@
import logging import logging
import voluptuous as vol
import voluptuous as vol
from homeassistant.components.zone import DOMAIN as ZONE_DOMAIN from homeassistant.components.zone import DOMAIN as ZONE_DOMAIN
from homeassistant.config_entries import ConfigFlow from homeassistant.config_entries import ConfigFlow
from homeassistant.const import CONF_ZONE from homeassistant.const import CONF_ZONE

View file

@ -1,16 +1,14 @@
from homeassistant.components.weather import ( from homeassistant.components.weather import (ATTR_CONDITION_CLEAR_NIGHT,
ATTR_CONDITION_CLOUDY, ATTR_CONDITION_CLOUDY,
ATTR_CONDITION_EXCEPTIONAL,
ATTR_CONDITION_FOG, ATTR_CONDITION_FOG,
ATTR_CONDITION_SNOWY_RAINY,
ATTR_CONDITION_LIGHTNING_RAINY, ATTR_CONDITION_LIGHTNING_RAINY,
ATTR_CONDITION_PARTLYCLOUDY, ATTR_CONDITION_PARTLYCLOUDY,
ATTR_CONDITION_POURING, ATTR_CONDITION_POURING,
ATTR_CONDITION_RAINY, ATTR_CONDITION_RAINY,
ATTR_CONDITION_SNOWY, ATTR_CONDITION_SNOWY,
ATTR_CONDITION_SUNNY, ATTR_CONDITION_SNOWY_RAINY,
ATTR_CONDITION_CLEAR_NIGHT, ATTR_CONDITION_SUNNY)
ATTR_CONDITION_EXCEPTIONAL
)
from homeassistant.const import Platform from homeassistant.const import Platform
DOMAIN = 'irm_kmi' DOMAIN = 'irm_kmi'

View file

@ -1,22 +1,20 @@
"""Example integration using DataUpdateCoordinator.""" """Example integration using DataUpdateCoordinator."""
from datetime import timedelta, datetime
import logging import logging
from datetime import datetime, timedelta
from typing import List from typing import List
import async_timeout import async_timeout
from homeassistant.components.weather import Forecast from homeassistant.components.weather import Forecast
from homeassistant.const import ATTR_LATITUDE, ATTR_LONGITUDE from homeassistant.const import ATTR_LATITUDE, ATTR_LONGITUDE
from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.update_coordinator import ( from homeassistant.helpers.update_coordinator import (DataUpdateCoordinator,
DataUpdateCoordinator, UpdateFailed)
UpdateFailed,
)
from .data import IrmKmiForecast
from .const import OUT_OF_BENELUX, IRM_KMI_TO_HA_CONDITION_MAP as CDT_MAP
from .api import IrmKmiApiClient, IrmKmiApiError from .api import IrmKmiApiClient, IrmKmiApiError
from .const import IRM_KMI_TO_HA_CONDITION_MAP as CDT_MAP
from .const import OUT_OF_BENELUX
from .data import IrmKmiForecast
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)

View file

@ -1,15 +1,15 @@
import logging import logging
from typing import List from typing import List
from homeassistant.components.weather import WeatherEntity, WeatherEntityFeature, Forecast from homeassistant.components.weather import (Forecast, WeatherEntity,
from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo WeatherEntityFeature)
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import UnitOfTemperature, UnitOfSpeed, UnitOfPrecipitationDepth, UnitOfPressure from homeassistant.const import (UnitOfPrecipitationDepth, UnitOfPressure,
UnitOfSpeed, UnitOfTemperature)
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.update_coordinator import ( from homeassistant.helpers.update_coordinator import CoordinatorEntity
CoordinatorEntity,
)
from . import DOMAIN from . import DOMAIN
from .coordinator import IrmKmiCoordinator from .coordinator import IrmKmiCoordinator