Skip to content

Commit

Permalink
Import sorting and removal of unneeded dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
arjenbos committed Jul 18, 2023
1 parent 21a289f commit 03540e1
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 24 deletions.
8 changes: 4 additions & 4 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import logging

from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant

from .api import ControllerApi
from .const import DOMAIN, PLATFORMS

from homeassistant.core import HomeAssistant
from homeassistant.config_entries import ConfigEntry

_LOGGER = logging.getLogger(__name__)


async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
"""Set up Alpha Home from config entry."""
_LOGGER.info("Setting up Alpha Home component")
_LOGGER.debug("Setting up Alpha Home component")

controller_api = ControllerApi(entry.data['controller_ip'], entry.data['username'], entry.data['password'])

Expand Down
9 changes: 4 additions & 5 deletions api.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import base64
import logging
import urllib
from urllib.parse import unquote

import requests
import logging

from backports.pbkdf2 import pbkdf2_hmac
from urllib.parse import unquote
from Crypto.Hash import SHA256
from Crypto.Cipher import AES
from Crypto.Hash import SHA256
from backports.pbkdf2 import pbkdf2_hmac

_LOGGER = logging.getLogger(__name__)

Expand Down
20 changes: 10 additions & 10 deletions climate.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
"""Platform for sensor integration."""
from __future__ import annotations

import logging
from datetime import timedelta

from homeassistant.components.climate import ClimateEntity, ClimateEntityDescription, ClimateEntityFeature, HVACAction, \
HVACMode

from .api import ControllerApi, Thermostat
from .const import DOMAIN

from datetime import timedelta
from homeassistant.const import (
ATTR_TEMPERATURE,
UnitOfTemperature,
)
from homeassistant.core import callback
from homeassistant.helpers.entity import DeviceInfo
import logging
from homeassistant.helpers.update_coordinator import (
CoordinatorEntity,
DataUpdateCoordinator,
)
from homeassistant.const import (
ATTR_TEMPERATURE,
UnitOfTemperature,
)

from .api import ControllerApi, Thermostat
from .const import DOMAIN

_LOGGER = logging.getLogger(__name__)

Expand Down
7 changes: 3 additions & 4 deletions config_flow.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
from .const import DOMAIN

import logging
from typing import Any
from . import ControllerApi

import voluptuous as vol

from homeassistant import config_entries, exceptions
from homeassistant.data_entry_flow import FlowResult

from . import ControllerApi
from .const import DOMAIN

_LOGGER = logging.getLogger(__name__)

DATA_SCHEMA = vol.Schema({
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"documentation": "https://arjen.dev",
"integration_type": "hub",
"iot_class": "local_polling",
"requirements": ["backports.pbkdf2==0.1", "crypto==1.4.1", "pycryptodome==3.17"],
"requirements": ["backports.pbkdf2==0.1", "pycryptodome==3.17"],
"version": "0.1.0",
"config_flow": true
}

0 comments on commit 03540e1

Please sign in to comment.