Clean up unused loggers (#57662)

This commit is contained in:
Robert Hillis 2021-10-14 13:03:38 -04:00 committed by GitHub
parent fdc6d9e004
commit 488a636aec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
88 changed files with 0 additions and 292 deletions

View file

@ -2,7 +2,6 @@
from __future__ import annotations from __future__ import annotations
from collections.abc import Callable from collections.abc import Callable
import logging
from typing import Any from typing import Any
import voluptuous as vol import voluptuous as vol
@ -16,8 +15,6 @@ from .util import test_all
POLICY_SCHEMA = vol.Schema({vol.Optional(CAT_ENTITIES): ENTITY_POLICY_SCHEMA}) POLICY_SCHEMA = vol.Schema({vol.Optional(CAT_ENTITIES): ENTITY_POLICY_SCHEMA})
_LOGGER = logging.getLogger(__name__)
class AbstractPermissions: class AbstractPermissions:
"""Default permissions class.""" """Default permissions class."""

View file

@ -1,7 +1,6 @@
"""Support for Adax wifi-enabled home heaters.""" """Support for Adax wifi-enabled home heaters."""
from __future__ import annotations from __future__ import annotations
import logging
from typing import Any from typing import Any
from adax import Adax from adax import Adax
@ -25,8 +24,6 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import ACCOUNT_ID from .const import ACCOUNT_ID
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry( async def async_setup_entry(
hass: HomeAssistant, hass: HomeAssistant,

View file

@ -2,7 +2,6 @@
from __future__ import annotations from __future__ import annotations
from dataclasses import dataclass from dataclasses import dataclass
import logging
from numbers import Real from numbers import Real
from homeassistant.components.sensor import ( from homeassistant.components.sensor import (
@ -114,8 +113,6 @@ CONNECTION_SENSORS: tuple[AsusWrtSensorEntityDescription, ...] = (
), ),
) )
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry( async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities hass: HomeAssistant, entry: ConfigEntry, async_add_entities

View file

@ -2,7 +2,6 @@
from __future__ import annotations from __future__ import annotations
from abc import abstractmethod from abc import abstractmethod
import logging
from pyclimacell.const import CURRENT from pyclimacell.const import CURRENT
@ -21,8 +20,6 @@ from .const import (
ClimaCellSensorEntityDescription, ClimaCellSensorEntityDescription,
) )
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry( async def async_setup_entry(
hass: HomeAssistant, hass: HomeAssistant,

View file

@ -4,7 +4,6 @@ from __future__ import annotations
from abc import abstractmethod from abc import abstractmethod
from collections.abc import Mapping from collections.abc import Mapping
from datetime import datetime from datetime import datetime
import logging
from typing import Any from typing import Any
from pyclimacell.const import ( from pyclimacell.const import (
@ -94,8 +93,6 @@ from .const import (
MAX_FORECASTS, MAX_FORECASTS,
) )
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry( async def async_setup_entry(
hass: HomeAssistant, hass: HomeAssistant,

View file

@ -1,7 +1,6 @@
"""Config flow for Co2signal integration.""" """Config flow for Co2signal integration."""
from __future__ import annotations from __future__ import annotations
import logging
from typing import Any from typing import Any
import voluptuous as vol import voluptuous as vol
@ -15,8 +14,6 @@ from . import APIRatelimitExceeded, CO2Error, InvalidAuth, UnknownError, get_dat
from .const import CONF_COUNTRY_CODE, DOMAIN from .const import CONF_COUNTRY_CODE, DOMAIN
from .util import get_extra_name from .util import get_extra_name
_LOGGER = logging.getLogger(__name__)
TYPE_USE_HOME = "Use home location" TYPE_USE_HOME = "Use home location"
TYPE_SPECIFY_COORDINATES = "Specify coordinates" TYPE_SPECIFY_COORDINATES = "Specify coordinates"
TYPE_SPECIFY_COUNTRY = "Specify country code" TYPE_SPECIFY_COUNTRY = "Specify country code"

View file

@ -1,6 +1,4 @@
"""Support for Rheem EcoNet thermostats.""" """Support for Rheem EcoNet thermostats."""
import logging
from pyeconet.equipment import EquipmentType from pyeconet.equipment import EquipmentType
from pyeconet.equipment.thermostat import ThermostatFanMode, ThermostatOperationMode from pyeconet.equipment.thermostat import ThermostatFanMode, ThermostatOperationMode
@ -28,8 +26,6 @@ from homeassistant.const import ATTR_TEMPERATURE
from . import EcoNetEntity from . import EcoNetEntity
from .const import DOMAIN, EQUIPMENT from .const import DOMAIN, EQUIPMENT
_LOGGER = logging.getLogger(__name__)
ECONET_STATE_TO_HA = { ECONET_STATE_TO_HA = {
ThermostatOperationMode.HEATING: HVAC_MODE_HEAT, ThermostatOperationMode.HEATING: HVAC_MODE_HEAT,
ThermostatOperationMode.COOLING: HVAC_MODE_COOL, ThermostatOperationMode.COOLING: HVAC_MODE_COOL,

View file

@ -1,7 +1,5 @@
"""The generic_hygrostat component.""" """The generic_hygrostat component."""
import logging
import voluptuous as vol import voluptuous as vol
from homeassistant.components.humidifier.const import ( from homeassistant.components.humidifier.const import (
@ -13,8 +11,6 @@ from homeassistant.helpers import config_validation as cv, discovery
DOMAIN = "generic_hygrostat" DOMAIN = "generic_hygrostat"
_LOGGER = logging.getLogger(__name__)
CONF_HUMIDIFIER = "humidifier" CONF_HUMIDIFIER = "humidifier"
CONF_SENSOR = "target_sensor" CONF_SENSOR = "target_sensor"
CONF_MIN_HUMIDITY = "min_humidity" CONF_MIN_HUMIDITY = "min_humidity"

View file

@ -1,8 +1,6 @@
"""Support for Gogogate2 garage Doors.""" """Support for Gogogate2 garage Doors."""
from __future__ import annotations from __future__ import annotations
import logging
from ismartgate.common import ( from ismartgate.common import (
AbstractDoor, AbstractDoor,
DoorStatus, DoorStatus,
@ -28,8 +26,6 @@ from .common import (
get_data_update_coordinator, get_data_update_coordinator,
) )
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry( async def async_setup_entry(
hass: HomeAssistant, hass: HomeAssistant,

View file

@ -1,7 +1,6 @@
"""This platform allows several binary sensor to be grouped into one binary sensor.""" """This platform allows several binary sensor to be grouped into one binary sensor."""
from __future__ import annotations from __future__ import annotations
import logging
from typing import Any from typing import Any
import voluptuous as vol import voluptuous as vol
@ -34,8 +33,6 @@ DEFAULT_NAME = "Binary Sensor Group"
CONF_ALL = "all" CONF_ALL = "all"
REG_KEY = f"{BINARY_SENSOR_DOMAIN}_registry" REG_KEY = f"{BINARY_SENSOR_DOMAIN}_registry"
_LOGGER = logging.getLogger(__name__)
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
{ {
vol.Required(CONF_ENTITIES): cv.entities_domain(BINARY_SENSOR_DOMAIN), vol.Required(CONF_ENTITIES): cv.entities_domain(BINARY_SENSOR_DOMAIN),

View file

@ -8,7 +8,6 @@ import binascii
from collections.abc import AsyncGenerator from collections.abc import AsyncGenerator
from contextlib import asynccontextmanager from contextlib import asynccontextmanager
import functools import functools
import logging
from typing import Any from typing import Any
from aiohttp import web from aiohttp import web
@ -50,8 +49,6 @@ from .const import (
TYPE_HYPERION_CAMERA, TYPE_HYPERION_CAMERA,
) )
_LOGGER = logging.getLogger(__name__)
IMAGE_STREAM_JPG_SENTINEL = "data:image/jpg;base64," IMAGE_STREAM_JPG_SENTINEL = "data:image/jpg;base64,"

View file

@ -1,6 +1,4 @@
"""Interfaces with iAlarm control panels.""" """Interfaces with iAlarm control panels."""
import logging
from homeassistant.components.alarm_control_panel import AlarmControlPanelEntity from homeassistant.components.alarm_control_panel import AlarmControlPanelEntity
from homeassistant.components.alarm_control_panel.const import ( from homeassistant.components.alarm_control_panel.const import (
SUPPORT_ALARM_ARM_AWAY, SUPPORT_ALARM_ARM_AWAY,
@ -10,8 +8,6 @@ from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import DATA_COORDINATOR, DOMAIN from .const import DATA_COORDINATOR, DOMAIN
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass, entry, async_add_entities) -> None: async def async_setup_entry(hass, entry, async_add_entities) -> None:
"""Set up a iAlarm alarm control panel based on a config entry.""" """Set up a iAlarm alarm control panel based on a config entry."""

View file

@ -1,6 +1,4 @@
"""The Keenetic Client class.""" """The Keenetic Client class."""
import logging
from homeassistant.components.binary_sensor import ( from homeassistant.components.binary_sensor import (
DEVICE_CLASS_CONNECTIVITY, DEVICE_CLASS_CONNECTIVITY,
BinarySensorEntity, BinarySensorEntity,
@ -12,8 +10,6 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
from . import KeeneticRouter from . import KeeneticRouter
from .const import DOMAIN, ROUTER from .const import DOMAIN, ROUTER
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry( async def async_setup_entry(
hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities

View file

@ -1,7 +1,6 @@
"""Config flow for kraken integration.""" """Config flow for kraken integration."""
from __future__ import annotations from __future__ import annotations
import logging
from typing import Any from typing import Any
import krakenex import krakenex
@ -17,8 +16,6 @@ from homeassistant.helpers import config_validation as cv
from .const import CONF_TRACKED_ASSET_PAIRS, DEFAULT_SCAN_INTERVAL, DOMAIN from .const import CONF_TRACKED_ASSET_PAIRS, DEFAULT_SCAN_INTERVAL, DOMAIN
from .utils import get_tradable_asset_pairs from .utils import get_tradable_asset_pairs
_LOGGER = logging.getLogger(__name__)
class KrakenConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): class KrakenConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow for kraken.""" """Handle a config flow for kraken."""

View file

@ -1,7 +1,6 @@
"""Config flow for the LiteJet lighting system.""" """Config flow for the LiteJet lighting system."""
from __future__ import annotations from __future__ import annotations
import logging
from typing import Any from typing import Any
import pylitejet import pylitejet
@ -16,8 +15,6 @@ import homeassistant.helpers.config_validation as cv
from .const import CONF_DEFAULT_TRANSITION, DOMAIN from .const import CONF_DEFAULT_TRANSITION, DOMAIN
_LOGGER = logging.getLogger(__name__)
class LiteJetOptionsFlow(config_entries.OptionsFlow): class LiteJetOptionsFlow(config_entries.OptionsFlow):
"""Handle LiteJet options.""" """Handle LiteJet options."""

View file

@ -1,13 +1,10 @@
"""Support for LiteJet scenes.""" """Support for LiteJet scenes."""
import logging
from typing import Any from typing import Any
from homeassistant.components.scene import Scene from homeassistant.components.scene import Scene
from .const import DOMAIN from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
ATTR_NUMBER = "number" ATTR_NUMBER = "number"

View file

@ -1,5 +1,4 @@
"""API for Honeywell Lyric bound to Home Assistant OAuth.""" """API for Honeywell Lyric bound to Home Assistant OAuth."""
import logging
from typing import cast from typing import cast
from aiohttp import BasicAuth, ClientSession from aiohttp import BasicAuth, ClientSession
@ -8,8 +7,6 @@ from aiolyric.client import LyricClient
from homeassistant.helpers import config_entry_oauth2_flow from homeassistant.helpers import config_entry_oauth2_flow
from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.aiohttp_client import async_get_clientsession
_LOGGER = logging.getLogger(__name__)
class ConfigEntryLyricClient(LyricClient): class ConfigEntryLyricClient(LyricClient):
"""Provide Honeywell Lyric authentication tied to an OAuth2 based config entry.""" """Provide Honeywell Lyric authentication tied to an OAuth2 based config entry."""

View file

@ -7,8 +7,6 @@ from homeassistant.helpers import config_entry_oauth2_flow
from .const import DOMAIN from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
class OAuth2FlowHandler( class OAuth2FlowHandler(
config_entry_oauth2_flow.AbstractOAuth2FlowHandler, domain=DOMAIN config_entry_oauth2_flow.AbstractOAuth2FlowHandler, domain=DOMAIN

View file

@ -1,6 +1,4 @@
"""Support for Meteoclimatic sensor.""" """Support for Meteoclimatic sensor."""
import logging
from homeassistant.components.sensor import SensorEntity, SensorEntityDescription from homeassistant.components.sensor import SensorEntity, SensorEntityDescription
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_ATTRIBUTION from homeassistant.const import ATTR_ATTRIBUTION
@ -12,8 +10,6 @@ from homeassistant.helpers.update_coordinator import (
from .const import ATTRIBUTION, DOMAIN, MANUFACTURER, MODEL, SENSOR_TYPES from .const import ATTRIBUTION, DOMAIN, MANUFACTURER, MODEL, SENSOR_TYPES
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry( async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities hass: HomeAssistant, entry: ConfigEntry, async_add_entities

View file

@ -1,7 +1,6 @@
"""Support for Modbus.""" """Support for Modbus."""
from __future__ import annotations from __future__ import annotations
import logging
from typing import cast from typing import cast
import voluptuous as vol import voluptuous as vol
@ -129,8 +128,6 @@ from .validators import (
struct_validator, struct_validator,
) )
_LOGGER = logging.getLogger(__name__)
BASE_SCHEMA = vol.Schema({vol.Optional(CONF_NAME, default=DEFAULT_HUB): cv.string}) BASE_SCHEMA = vol.Schema({vol.Optional(CONF_NAME, default=DEFAULT_HUB): cv.string})

View file

@ -2,7 +2,6 @@
from __future__ import annotations from __future__ import annotations
from datetime import datetime from datetime import datetime
import logging
from homeassistant.components.binary_sensor import BinarySensorEntity from homeassistant.components.binary_sensor import BinarySensorEntity
from homeassistant.const import CONF_BINARY_SENSORS, CONF_NAME, STATE_ON from homeassistant.const import CONF_BINARY_SENSORS, CONF_NAME, STATE_ON
@ -15,7 +14,6 @@ from . import get_hub
from .base_platform import BasePlatform from .base_platform import BasePlatform
PARALLEL_UPDATES = 1 PARALLEL_UPDATES = 1
_LOGGER = logging.getLogger(__name__)
async def async_setup_platform( async def async_setup_platform(

View file

@ -2,7 +2,6 @@
from __future__ import annotations from __future__ import annotations
from datetime import datetime from datetime import datetime
import logging
import struct import struct
from typing import Any from typing import Any
@ -45,7 +44,6 @@ from .const import (
from .modbus import ModbusHub from .modbus import ModbusHub
PARALLEL_UPDATES = 1 PARALLEL_UPDATES = 1
_LOGGER = logging.getLogger(__name__)
async def async_setup_platform( async def async_setup_platform(

View file

@ -2,7 +2,6 @@
from __future__ import annotations from __future__ import annotations
from datetime import datetime from datetime import datetime
import logging
from typing import Any from typing import Any
from homeassistant.components.cover import SUPPORT_CLOSE, SUPPORT_OPEN, CoverEntity from homeassistant.components.cover import SUPPORT_CLOSE, SUPPORT_OPEN, CoverEntity
@ -37,7 +36,6 @@ from .const import (
from .modbus import ModbusHub from .modbus import ModbusHub
PARALLEL_UPDATES = 1 PARALLEL_UPDATES = 1
_LOGGER = logging.getLogger(__name__)
async def async_setup_platform( async def async_setup_platform(

View file

@ -1,7 +1,6 @@
"""Support for Modbus fans.""" """Support for Modbus fans."""
from __future__ import annotations from __future__ import annotations
import logging
from typing import Any from typing import Any
from homeassistant.components.fan import FanEntity from homeassistant.components.fan import FanEntity
@ -16,7 +15,6 @@ from .const import CONF_FANS
from .modbus import ModbusHub from .modbus import ModbusHub
PARALLEL_UPDATES = 1 PARALLEL_UPDATES = 1
_LOGGER = logging.getLogger(__name__)
async def async_setup_platform( async def async_setup_platform(

View file

@ -1,7 +1,6 @@
"""Support for Modbus lights.""" """Support for Modbus lights."""
from __future__ import annotations from __future__ import annotations
import logging
from typing import Any from typing import Any
from homeassistant.components.light import LightEntity from homeassistant.components.light import LightEntity
@ -15,7 +14,6 @@ from .base_platform import BaseSwitch
from .modbus import ModbusHub from .modbus import ModbusHub
PARALLEL_UPDATES = 1 PARALLEL_UPDATES = 1
_LOGGER = logging.getLogger(__name__)
async def async_setup_platform( async def async_setup_platform(

View file

@ -2,7 +2,6 @@
from __future__ import annotations from __future__ import annotations
from datetime import datetime from datetime import datetime
import logging
from typing import Any from typing import Any
from homeassistant.components.sensor import CONF_STATE_CLASS, SensorEntity from homeassistant.components.sensor import CONF_STATE_CLASS, SensorEntity
@ -17,7 +16,6 @@ from .base_platform import BaseStructPlatform
from .modbus import ModbusHub from .modbus import ModbusHub
PARALLEL_UPDATES = 1 PARALLEL_UPDATES = 1
_LOGGER = logging.getLogger(__name__)
async def async_setup_platform( async def async_setup_platform(

View file

@ -1,7 +1,6 @@
"""Support for Modbus switches.""" """Support for Modbus switches."""
from __future__ import annotations from __future__ import annotations
import logging
from typing import Any from typing import Any
from homeassistant.components.switch import SwitchEntity from homeassistant.components.switch import SwitchEntity
@ -15,7 +14,6 @@ from .base_platform import BaseSwitch
from .modbus import ModbusHub from .modbus import ModbusHub
PARALLEL_UPDATES = 1 PARALLEL_UPDATES = 1
_LOGGER = logging.getLogger(__name__)
async def async_setup_platform( async def async_setup_platform(

View file

@ -1,7 +1,6 @@
"""The motionEye integration.""" """The motionEye integration."""
from __future__ import annotations from __future__ import annotations
import logging
from types import MappingProxyType from types import MappingProxyType
from typing import Any from typing import Any
@ -49,8 +48,6 @@ from .const import (
TYPE_MOTIONEYE_MJPEG_CAMERA, TYPE_MOTIONEYE_MJPEG_CAMERA,
) )
_LOGGER = logging.getLogger(__name__)
PLATFORMS = ["camera"] PLATFORMS = ["camera"]

View file

@ -1,7 +1,6 @@
"""Config flow for motionEye integration.""" """Config flow for motionEye integration."""
from __future__ import annotations from __future__ import annotations
import logging
from typing import Any, Dict, cast from typing import Any, Dict, cast
from motioneye_client.client import ( from motioneye_client.client import (
@ -36,8 +35,6 @@ from .const import (
DOMAIN, DOMAIN,
) )
_LOGGER = logging.getLogger(__name__)
class MotionEyeConfigFlow(ConfigFlow, domain=DOMAIN): class MotionEyeConfigFlow(ConfigFlow, domain=DOMAIN):
"""Handle a config flow for motionEye.""" """Handle a config flow for motionEye."""

View file

@ -1,14 +1,10 @@
"""Config flow for Mullvad VPN integration.""" """Config flow for Mullvad VPN integration."""
import logging
from mullvad_api import MullvadAPI, MullvadAPIError from mullvad_api import MullvadAPI, MullvadAPIError
from homeassistant import config_entries from homeassistant import config_entries
from .const import DOMAIN from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow for Mullvad VPN.""" """Handle a config flow for Mullvad VPN."""

View file

@ -1,6 +1,4 @@
"""Support for MyQ-Enabled Garage Doors.""" """Support for MyQ-Enabled Garage Doors."""
import logging
from pymyq.const import DEVICE_TYPE_GATE as MYQ_DEVICE_TYPE_GATE from pymyq.const import DEVICE_TYPE_GATE as MYQ_DEVICE_TYPE_GATE
from pymyq.errors import MyQError from pymyq.errors import MyQError
@ -17,8 +15,6 @@ from homeassistant.exceptions import HomeAssistantError
from . import MyQEntity from . import MyQEntity
from .const import DOMAIN, MYQ_COORDINATOR, MYQ_GATEWAY, MYQ_TO_HASS from .const import DOMAIN, MYQ_COORDINATOR, MYQ_GATEWAY, MYQ_TO_HASS
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up mysq covers.""" """Set up mysq covers."""

View file

@ -1,6 +1,4 @@
"""Support for MyQ-Enabled lights.""" """Support for MyQ-Enabled lights."""
import logging
from pymyq.errors import MyQError from pymyq.errors import MyQError
from homeassistant.components.light import LightEntity from homeassistant.components.light import LightEntity
@ -10,8 +8,6 @@ from homeassistant.exceptions import HomeAssistantError
from . import MyQEntity from . import MyQEntity
from .const import DOMAIN, MYQ_COORDINATOR, MYQ_GATEWAY, MYQ_TO_HASS from .const import DOMAIN, MYQ_COORDINATOR, MYQ_GATEWAY, MYQ_TO_HASS
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up myq lights.""" """Set up myq lights."""

View file

@ -1,7 +1,6 @@
"""Config flow for MySensors.""" """Config flow for MySensors."""
from __future__ import annotations from __future__ import annotations
import logging
import os import os
from typing import Any from typing import Any
@ -46,8 +45,6 @@ from .const import (
) )
from .gateway import MQTT_COMPONENT, is_serial_port, is_socket_address, try_connect from .gateway import MQTT_COMPONENT, is_serial_port, is_socket_address, try_connect
_LOGGER = logging.getLogger(__name__)
def _get_schema_common(user_input: dict[str, str]) -> dict: def _get_schema_common(user_input: dict[str, str]) -> dict:
"""Create a schema with options common to all gateway types.""" """Create a schema with options common to all gateway types."""

View file

@ -2,7 +2,6 @@
from __future__ import annotations from __future__ import annotations
from enum import Enum, unique from enum import Enum, unique
import logging
from typing import Any from typing import Any
from homeassistant.components import mysensors from homeassistant.components import mysensors
@ -16,8 +15,6 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .helpers import on_unload from .helpers import on_unload
_LOGGER = logging.getLogger(__name__)
@unique @unique
class CoverState(Enum): class CoverState(Enum):

View file

@ -1,6 +1,4 @@
"""Support for Netgear routers.""" """Support for Netgear routers."""
import logging
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.exceptions import ConfigEntryNotReady
@ -11,8 +9,6 @@ from .const import DOMAIN, PLATFORMS
from .errors import CannotLoginException from .errors import CannotLoginException
from .router import NetgearRouter from .router import NetgearRouter
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry) -> bool: async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry) -> bool:
"""Set up Netgear component.""" """Set up Netgear component."""

View file

@ -1,6 +1,4 @@
"""Support for Netgear routers.""" """Support for Netgear routers."""
import logging
from homeassistant.components.sensor import ( from homeassistant.components.sensor import (
DEVICE_CLASS_SIGNAL_STRENGTH, DEVICE_CLASS_SIGNAL_STRENGTH,
SensorEntity, SensorEntity,
@ -14,9 +12,6 @@ from homeassistant.helpers.typing import HomeAssistantType
from .router import NetgearDeviceEntity, NetgearRouter, async_setup_netgear_entry from .router import NetgearDeviceEntity, NetgearRouter, async_setup_netgear_entry
_LOGGER = logging.getLogger(__name__)
SENSOR_TYPES = { SENSOR_TYPES = {
"type": SensorEntityDescription( "type": SensorEntityDescription(
key="type", key="type",

View file

@ -1,6 +1,4 @@
"""Web socket API for OpenZWave.""" """Web socket API for OpenZWave."""
import logging
from openzwavemqtt.const import ( from openzwavemqtt.const import (
ATTR_CODE_SLOT, ATTR_CODE_SLOT,
ATTR_LABEL, ATTR_LABEL,
@ -26,8 +24,6 @@ from homeassistant.helpers import config_validation as cv
from .const import ATTR_CONFIG_PARAMETER, ATTR_CONFIG_VALUE, DOMAIN, MANAGER from .const import ATTR_CONFIG_PARAMETER, ATTR_CONFIG_VALUE, DOMAIN, MANAGER
from .lock import ATTR_USERCODE from .lock import ATTR_USERCODE
_LOGGER = logging.getLogger(__name__)
DRY_RUN = "dry_run" DRY_RUN = "dry_run"
TYPE = "type" TYPE = "type"
ID = "id" ID = "id"

View file

@ -1,6 +1,4 @@
"""Remote control support for Panasonic Viera TV.""" """Remote control support for Panasonic Viera TV."""
import logging
from homeassistant.components.remote import RemoteEntity from homeassistant.components.remote import RemoteEntity
from homeassistant.const import CONF_NAME, STATE_ON from homeassistant.const import CONF_NAME, STATE_ON
@ -15,8 +13,6 @@ from .const import (
DOMAIN, DOMAIN,
) )
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Panasonic Viera TV Remote from a config entry.""" """Set up Panasonic Viera TV Remote from a config entry."""

View file

@ -1,7 +1,5 @@
"""Support for Plaato Airlock sensors.""" """Support for Plaato Airlock sensors."""
import logging
from pyplaato.plaato import PlaatoKeg from pyplaato.plaato import PlaatoKeg
from homeassistant.components.binary_sensor import ( from homeassistant.components.binary_sensor import (
@ -13,8 +11,6 @@ from homeassistant.components.binary_sensor import (
from .const import CONF_USE_WEBHOOK, COORDINATOR, DOMAIN from .const import CONF_USE_WEBHOOK, COORDINATOR, DOMAIN
from .entity import PlaatoEntity from .entity import PlaatoEntity
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Plaato from a config entry.""" """Set up Plaato from a config entry."""

View file

@ -1,6 +1,4 @@
"""Config flow for Plaato.""" """Config flow for Plaato."""
import logging
from pyplaato.plaato import PlaatoDeviceType from pyplaato.plaato import PlaatoDeviceType
import voluptuous as vol import voluptuous as vol
@ -24,8 +22,6 @@ from .const import (
PLACEHOLDER_WEBHOOK_URL, PLACEHOLDER_WEBHOOK_URL,
) )
_LOGGER = logging.getLogger(__package__)
class PlaatoConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): class PlaatoConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handles a Plaato config flow.""" """Handles a Plaato config flow."""

View file

@ -1,6 +1,4 @@
"""Support for a ScreenLogic Binary Sensor.""" """Support for a ScreenLogic Binary Sensor."""
import logging
from screenlogicpy.const import DATA as SL_DATA, DEVICE_TYPE, EQUIPMENT, ON_OFF from screenlogicpy.const import DATA as SL_DATA, DEVICE_TYPE, EQUIPMENT, ON_OFF
from homeassistant.components.binary_sensor import ( from homeassistant.components.binary_sensor import (
@ -11,8 +9,6 @@ from homeassistant.components.binary_sensor import (
from . import ScreenlogicEntity from . import ScreenlogicEntity
from .const import DOMAIN from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
SL_DEVICE_TYPE_TO_HA_DEVICE_CLASS = {DEVICE_TYPE.ALARM: DEVICE_CLASS_PROBLEM} SL_DEVICE_TYPE_TO_HA_DEVICE_CLASS = {DEVICE_TYPE.ALARM: DEVICE_CLASS_PROBLEM}

View file

@ -1,6 +1,4 @@
"""Support for a ScreenLogic Sensor.""" """Support for a ScreenLogic Sensor."""
import logging
from screenlogicpy.const import ( from screenlogicpy.const import (
CHEM_DOSING_STATE, CHEM_DOSING_STATE,
DATA as SL_DATA, DATA as SL_DATA,
@ -17,8 +15,6 @@ from homeassistant.components.sensor import (
from . import ScreenlogicEntity from . import ScreenlogicEntity
from .const import DOMAIN from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
SUPPORTED_CHEM_SENSORS = ( SUPPORTED_CHEM_SENSORS = (
"calcium_harness", "calcium_harness",
"current_orp", "current_orp",

View file

@ -1,11 +1,7 @@
"""SmartTub integration.""" """SmartTub integration."""
import logging
from .const import DOMAIN, SMARTTUB_CONTROLLER from .const import DOMAIN, SMARTTUB_CONTROLLER
from .controller import SmartTubController from .controller import SmartTubController
_LOGGER = logging.getLogger(__name__)
PLATFORMS = ["binary_sensor", "climate", "light", "sensor", "switch"] PLATFORMS = ["binary_sensor", "climate", "light", "sensor", "switch"]

View file

@ -1,8 +1,6 @@
"""Platform for binary sensor integration.""" """Platform for binary sensor integration."""
from __future__ import annotations from __future__ import annotations
import logging
from smarttub import SpaError, SpaReminder from smarttub import SpaError, SpaReminder
import voluptuous as vol import voluptuous as vol
@ -16,8 +14,6 @@ from homeassistant.helpers import entity_platform
from .const import ATTR_ERRORS, ATTR_REMINDERS, DOMAIN, SMARTTUB_CONTROLLER from .const import ATTR_ERRORS, ATTR_REMINDERS, DOMAIN, SMARTTUB_CONTROLLER
from .entity import SmartTubEntity, SmartTubSensorBase from .entity import SmartTubEntity, SmartTubSensorBase
_LOGGER = logging.getLogger(__name__)
# whether the reminder has been snoozed (bool) # whether the reminder has been snoozed (bool)
ATTR_REMINDER_SNOOZED = "snoozed" ATTR_REMINDER_SNOOZED = "snoozed"

View file

@ -1,6 +1,4 @@
"""Platform for climate integration.""" """Platform for climate integration."""
import logging
from smarttub import Spa from smarttub import Spa
from homeassistant.components.climate import ClimateEntity from homeassistant.components.climate import ClimateEntity
@ -19,8 +17,6 @@ from homeassistant.util.temperature import convert as convert_temperature
from .const import DEFAULT_MAX_TEMP, DEFAULT_MIN_TEMP, DOMAIN, SMARTTUB_CONTROLLER from .const import DEFAULT_MAX_TEMP, DEFAULT_MIN_TEMP, DOMAIN, SMARTTUB_CONTROLLER
from .entity import SmartTubEntity from .entity import SmartTubEntity
_LOGGER = logging.getLogger(__name__)
PRESET_DAY = "day" PRESET_DAY = "day"
PRESET_MODES = { PRESET_MODES = {

View file

@ -1,6 +1,4 @@
"""Config flow to configure the SmartTub integration.""" """Config flow to configure the SmartTub integration."""
import logging
from smarttub import LoginFailed from smarttub import LoginFailed
import voluptuous as vol import voluptuous as vol
@ -10,9 +8,6 @@ from homeassistant.const import CONF_EMAIL, CONF_PASSWORD
from .const import DOMAIN from .const import DOMAIN
from .controller import SmartTubController from .controller import SmartTubController
_LOGGER = logging.getLogger(__name__)
DATA_SCHEMA = vol.Schema( DATA_SCHEMA = vol.Schema(
{vol.Required(CONF_EMAIL): str, vol.Required(CONF_PASSWORD): str} {vol.Required(CONF_EMAIL): str, vol.Required(CONF_PASSWORD): str}
) )

View file

@ -1,6 +1,4 @@
"""Base classes for SmartTub entities.""" """Base classes for SmartTub entities."""
import logging
import smarttub import smarttub
from homeassistant.helpers.entity import DeviceInfo from homeassistant.helpers.entity import DeviceInfo
@ -12,8 +10,6 @@ from homeassistant.helpers.update_coordinator import (
from .const import DOMAIN from .const import DOMAIN
from .helpers import get_spa_name from .helpers import get_spa_name
_LOGGER = logging.getLogger(__name__)
class SmartTubEntity(CoordinatorEntity): class SmartTubEntity(CoordinatorEntity):
"""Base class for SmartTub entities.""" """Base class for SmartTub entities."""

View file

@ -1,6 +1,4 @@
"""Platform for light integration.""" """Platform for light integration."""
import logging
from smarttub import SpaLight from smarttub import SpaLight
from homeassistant.components.light import ( from homeassistant.components.light import (
@ -22,8 +20,6 @@ from .const import (
from .entity import SmartTubEntity from .entity import SmartTubEntity
from .helpers import get_spa_name from .helpers import get_spa_name
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up entities for any lights in the tub.""" """Set up entities for any lights in the tub."""

View file

@ -1,6 +1,5 @@
"""Platform for sensor integration.""" """Platform for sensor integration."""
from enum import Enum from enum import Enum
import logging
import smarttub import smarttub
import voluptuous as vol import voluptuous as vol
@ -11,8 +10,6 @@ from homeassistant.helpers import config_validation as cv, entity_platform
from .const import DOMAIN, SMARTTUB_CONTROLLER from .const import DOMAIN, SMARTTUB_CONTROLLER
from .entity import SmartTubSensorBase from .entity import SmartTubSensorBase
_LOGGER = logging.getLogger(__name__)
# the desired duration, in hours, of the cycle # the desired duration, in hours, of the cycle
ATTR_DURATION = "duration" ATTR_DURATION = "duration"
ATTR_CYCLE_LAST_UPDATED = "cycle_last_updated" ATTR_CYCLE_LAST_UPDATED = "cycle_last_updated"

View file

@ -1,6 +1,4 @@
"""Platform for switch integration.""" """Platform for switch integration."""
import logging
import async_timeout import async_timeout
from smarttub import SpaPump from smarttub import SpaPump
@ -10,8 +8,6 @@ from .const import API_TIMEOUT, ATTR_PUMPS, DOMAIN, SMARTTUB_CONTROLLER
from .entity import SmartTubEntity from .entity import SmartTubEntity
from .helpers import get_spa_name from .helpers import get_spa_name
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up switch entities for the pumps on the tub.""" """Set up switch entities for the pumps on the tub."""

View file

@ -2,7 +2,6 @@
from __future__ import annotations from __future__ import annotations
from datetime import timedelta from datetime import timedelta
import logging
from sonarr import Sonarr, SonarrAccessRestricted, SonarrError from sonarr import Sonarr, SonarrAccessRestricted, SonarrError
@ -30,7 +29,6 @@ from .const import (
PLATFORMS = ["sensor"] PLATFORMS = ["sensor"]
SCAN_INTERVAL = timedelta(seconds=30) SCAN_INTERVAL = timedelta(seconds=30)
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:

View file

@ -1,7 +1,6 @@
"""Entity representing a Sonos power sensor.""" """Entity representing a Sonos power sensor."""
from __future__ import annotations from __future__ import annotations
import logging
from typing import Any from typing import Any
from homeassistant.components.binary_sensor import ( from homeassistant.components.binary_sensor import (
@ -14,8 +13,6 @@ from .const import SONOS_CREATE_BATTERY
from .entity import SonosEntity from .entity import SonosEntity
from .speaker import SonosSpeaker from .speaker import SonosSpeaker
_LOGGER = logging.getLogger(__name__)
ATTR_BATTERY_POWER_SOURCE = "power_source" ATTR_BATTERY_POWER_SOURCE = "power_source"

View file

@ -1,6 +1,4 @@
"""Config flow for SONOS.""" """Config flow for SONOS."""
import logging
import soco import soco
from homeassistant import config_entries from homeassistant import config_entries
@ -13,8 +11,6 @@ from homeassistant.helpers.typing import DiscoveryInfoType
from .const import DATA_SONOS_DISCOVERY_MANAGER, DOMAIN from .const import DATA_SONOS_DISCOVERY_MANAGER, DOMAIN
from .helpers import hostname_to_uid from .helpers import hostname_to_uid
_LOGGER = logging.getLogger(__name__)
async def _async_has_devices(hass: HomeAssistant) -> bool: async def _async_has_devices(hass: HomeAssistant) -> bool:
"""Return if there are devices that can be discovered.""" """Return if there are devices that can be discovered."""

View file

@ -1,8 +1,6 @@
"""Entity representing a Sonos battery level.""" """Entity representing a Sonos battery level."""
from __future__ import annotations from __future__ import annotations
import logging
from homeassistant.components.sensor import SensorEntity from homeassistant.components.sensor import SensorEntity
from homeassistant.const import DEVICE_CLASS_BATTERY, PERCENTAGE from homeassistant.const import DEVICE_CLASS_BATTERY, PERCENTAGE
from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.helpers.dispatcher import async_dispatcher_connect
@ -11,8 +9,6 @@ from .const import SONOS_CREATE_BATTERY
from .entity import SonosEntity from .entity import SonosEntity
from .speaker import SonosSpeaker from .speaker import SonosSpeaker
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Sonos from a config entry.""" """Set up Sonos from a config entry."""

View file

@ -1,7 +1,6 @@
"""Provide functionality to stream HLS.""" """Provide functionality to stream HLS."""
from __future__ import annotations from __future__ import annotations
import logging
from typing import TYPE_CHECKING, cast from typing import TYPE_CHECKING, cast
from aiohttp import web from aiohttp import web
@ -24,8 +23,6 @@ from .fmp4utils import get_codec_string
if TYPE_CHECKING: if TYPE_CHECKING:
from . import Stream from . import Stream
_LOGGER = logging.getLogger(__name__)
@callback @callback
def async_setup_hls(hass: HomeAssistant) -> str: def async_setup_hls(hass: HomeAssistant) -> str:

View file

@ -1,7 +1,6 @@
"""Support for Sure PetCare Flaps locks.""" """Support for Sure PetCare Flaps locks."""
from __future__ import annotations from __future__ import annotations
import logging
from typing import Any from typing import Any
from surepy.entities import SurepyEntity from surepy.entities import SurepyEntity
@ -16,8 +15,6 @@ from . import SurePetcareDataCoordinator
from .const import DOMAIN from .const import DOMAIN
from .entity import SurePetcareEntity from .entity import SurePetcareEntity
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry( async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback

View file

@ -1,7 +1,6 @@
"""Support for Sure PetCare Flaps/Pets sensors.""" """Support for Sure PetCare Flaps/Pets sensors."""
from __future__ import annotations from __future__ import annotations
import logging
from typing import cast from typing import cast
from surepy.entities import SurepyEntity from surepy.entities import SurepyEntity
@ -23,8 +22,6 @@ from . import SurePetcareDataCoordinator
from .const import DOMAIN, SURE_BATT_VOLTAGE_DIFF, SURE_BATT_VOLTAGE_LOW from .const import DOMAIN, SURE_BATT_VOLTAGE_DIFF, SURE_BATT_VOLTAGE_LOW
from .entity import SurePetcareEntity from .entity import SurePetcareEntity
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry( async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback

View file

@ -1,6 +1,4 @@
"""Config flow for syncthing integration.""" """Config flow for syncthing integration."""
import logging
import aiosyncthing import aiosyncthing
import voluptuous as vol import voluptuous as vol
@ -9,8 +7,6 @@ from homeassistant.const import CONF_TOKEN, CONF_URL, CONF_VERIFY_SSL
from .const import DEFAULT_URL, DEFAULT_VERIFY_SSL, DOMAIN from .const import DEFAULT_URL, DEFAULT_VERIFY_SSL, DOMAIN
_LOGGER = logging.getLogger(__name__)
DATA_SCHEMA = vol.Schema( DATA_SCHEMA = vol.Schema(
{ {
vol.Required(CONF_URL, default=DEFAULT_URL): str, vol.Required(CONF_URL, default=DEFAULT_URL): str,

View file

@ -1,7 +1,5 @@
"""Support for monitoring the Syncthing instance.""" """Support for monitoring the Syncthing instance."""
import logging
import aiosyncthing import aiosyncthing
from homeassistant.components.sensor import SensorEntity from homeassistant.components.sensor import SensorEntity
@ -23,8 +21,6 @@ from .const import (
STATE_CHANGED_RECEIVED, STATE_CHANGED_RECEIVED,
) )
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the Syncthing sensors.""" """Set up the Syncthing sensors."""

View file

@ -1,7 +1,5 @@
"""Support for Samsung Printers with SyncThru web interface.""" """Support for Samsung Printers with SyncThru web interface."""
import logging
from pysyncthru import SyncThru, SyncthruState from pysyncthru import SyncThru, SyncthruState
from homeassistant.components.binary_sensor import ( from homeassistant.components.binary_sensor import (
@ -18,8 +16,6 @@ from homeassistant.helpers.update_coordinator import (
from . import device_identifiers from . import device_identifiers
from .const import DOMAIN from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
SYNCTHRU_STATE_PROBLEM = { SYNCTHRU_STATE_PROBLEM = {
SyncthruState.INVALID: True, SyncthruState.INVALID: True,
SyncthruState.OFFLINE: None, SyncthruState.OFFLINE: None,

View file

@ -4,7 +4,6 @@ Support for controlling power supply of clients which are powered over Ethernet
Support for controlling network access of clients selected in option flow. Support for controlling network access of clients selected in option flow.
Support for controlling deep packet inspection (DPI) restriction groups. Support for controlling deep packet inspection (DPI) restriction groups.
""" """
import logging
from typing import Any from typing import Any
from aiounifi.api import SOURCE_EVENT from aiounifi.api import SOURCE_EVENT
@ -26,8 +25,6 @@ from .const import ATTR_MANUFACTURER, DOMAIN as UNIFI_DOMAIN
from .unifi_client import UniFiClient from .unifi_client import UniFiClient
from .unifi_entity_base import UniFiBase from .unifi_entity_base import UniFiBase
_LOGGER = logging.getLogger(__name__)
BLOCK_SWITCH = "block" BLOCK_SWITCH = "block"
DPI_SWITCH = "dpi" DPI_SWITCH = "dpi"
POE_SWITCH = "poe" POE_SWITCH = "poe"

View file

@ -1,6 +1,4 @@
"""Support for Velbus thermostat.""" """Support for Velbus thermostat."""
import logging
from homeassistant.components.climate import ClimateEntity from homeassistant.components.climate import ClimateEntity
from homeassistant.components.climate.const import ( from homeassistant.components.climate.const import (
HVAC_MODE_HEAT, HVAC_MODE_HEAT,
@ -11,8 +9,6 @@ from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS
from . import VelbusEntity from . import VelbusEntity
from .const import DOMAIN from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up Velbus switch based on config_entry.""" """Set up Velbus switch based on config_entry."""

View file

@ -1,6 +1,4 @@
"""Support for Velbus covers.""" """Support for Velbus covers."""
import logging
from homeassistant.components.cover import ( from homeassistant.components.cover import (
ATTR_POSITION, ATTR_POSITION,
SUPPORT_CLOSE, SUPPORT_CLOSE,
@ -13,8 +11,6 @@ from homeassistant.components.cover import (
from . import VelbusEntity from . import VelbusEntity
from .const import DOMAIN from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up Velbus switch based on config_entry.""" """Set up Velbus switch based on config_entry."""

View file

@ -1,6 +1,4 @@
"""Support for Velbus light.""" """Support for Velbus light."""
import logging
from homeassistant.components.light import ( from homeassistant.components.light import (
ATTR_BRIGHTNESS, ATTR_BRIGHTNESS,
ATTR_FLASH, ATTR_FLASH,
@ -16,8 +14,6 @@ from homeassistant.components.light import (
from . import VelbusEntity from . import VelbusEntity
from .const import DOMAIN from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up Velbus switch based on config_entry.""" """Set up Velbus switch based on config_entry."""

View file

@ -1,5 +1,4 @@
"""Support for Velbus switches.""" """Support for Velbus switches."""
import logging
from typing import Any from typing import Any
from homeassistant.components.switch import SwitchEntity from homeassistant.components.switch import SwitchEntity
@ -7,8 +6,6 @@ from homeassistant.components.switch import SwitchEntity
from . import VelbusEntity from . import VelbusEntity
from .const import DOMAIN from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up Velbus switch based on config_entry.""" """Set up Velbus switch based on config_entry."""

View file

@ -1,6 +1,4 @@
"""The waze_travel_time component.""" """The waze_travel_time component."""
import logging
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_registry import ( from homeassistant.helpers.entity_registry import (
@ -9,7 +7,6 @@ from homeassistant.helpers.entity_registry import (
) )
PLATFORMS = ["sensor"] PLATFORMS = ["sensor"]
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:

View file

@ -1,6 +1,5 @@
"""Support for WeMo binary sensors.""" """Support for WeMo binary sensors."""
import asyncio import asyncio
import logging
from pywemo import Insight, Maker from pywemo import Insight, Maker
@ -10,8 +9,6 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
from .const import DOMAIN as WEMO_DOMAIN from .const import DOMAIN as WEMO_DOMAIN
from .entity import WemoEntity from .entity import WemoEntity
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up WeMo binary sensors.""" """Set up WeMo binary sensors."""

View file

@ -1,7 +1,6 @@
"""Support for WeMo humidifier.""" """Support for WeMo humidifier."""
import asyncio import asyncio
from datetime import timedelta from datetime import timedelta
import logging
import math import math
import voluptuous as vol import voluptuous as vol
@ -26,8 +25,6 @@ from .entity import WemoEntity
SCAN_INTERVAL = timedelta(seconds=10) SCAN_INTERVAL = timedelta(seconds=10)
PARALLEL_UPDATES = 0 PARALLEL_UPDATES = 0
_LOGGER = logging.getLogger(__name__)
ATTR_CURRENT_HUMIDITY = "current_humidity" ATTR_CURRENT_HUMIDITY = "current_humidity"
ATTR_TARGET_HUMIDITY = "target_humidity" ATTR_TARGET_HUMIDITY = "target_humidity"
ATTR_FAN_MODE = "fan_mode" ATTR_FAN_MODE = "fan_mode"

View file

@ -1,6 +1,5 @@
"""Support for Belkin WeMo lights.""" """Support for Belkin WeMo lights."""
import asyncio import asyncio
import logging
from pywemo.ouimeaux_device import bridge from pywemo.ouimeaux_device import bridge
@ -24,8 +23,6 @@ from .const import DOMAIN as WEMO_DOMAIN
from .entity import WemoEntity from .entity import WemoEntity
from .wemo_device import DeviceCoordinator from .wemo_device import DeviceCoordinator
_LOGGER = logging.getLogger(__name__)
SUPPORT_WEMO = ( SUPPORT_WEMO = (
SUPPORT_BRIGHTNESS | SUPPORT_COLOR_TEMP | SUPPORT_COLOR | SUPPORT_TRANSITION SUPPORT_BRIGHTNESS | SUPPORT_COLOR_TEMP | SUPPORT_COLOR | SUPPORT_TRANSITION
) )

View file

@ -1,7 +1,6 @@
"""Support for WeMo switches.""" """Support for WeMo switches."""
import asyncio import asyncio
from datetime import datetime, timedelta from datetime import datetime, timedelta
import logging
from pywemo import CoffeeMaker, Insight, Maker from pywemo import CoffeeMaker, Insight, Maker
@ -16,8 +15,6 @@ from .entity import WemoEntity
SCAN_INTERVAL = timedelta(seconds=10) SCAN_INTERVAL = timedelta(seconds=10)
PARALLEL_UPDATES = 0 PARALLEL_UPDATES = 0
_LOGGER = logging.getLogger(__name__)
# The WEMO_ constants below come from pywemo itself # The WEMO_ constants below come from pywemo itself
ATTR_SENSOR_STATE = "sensor_state" ATTR_SENSOR_STATE = "sensor_state"
ATTR_SWITCH_MODE = "switch_mode" ATTR_SWITCH_MODE = "switch_mode"

View file

@ -2,7 +2,6 @@
from __future__ import annotations from __future__ import annotations
from dataclasses import dataclass from dataclasses import dataclass
import logging
from typing import Callable from typing import Callable
from homeassistant.components.binary_sensor import ( from homeassistant.components.binary_sensor import (
@ -30,9 +29,6 @@ from .const import (
) )
from .device import XiaomiCoordinatedMiioEntity from .device import XiaomiCoordinatedMiioEntity
_LOGGER = logging.getLogger(__name__)
ATTR_NO_WATER = "no_water" ATTR_NO_WATER = "no_water"
ATTR_POWERSUPPLY_ATTACHED = "powersupply_attached" ATTR_POWERSUPPLY_ATTACHED = "powersupply_attached"
ATTR_WATER_TANK_DETACHED = "water_tank_detached" ATTR_WATER_TANK_DETACHED = "water_tank_detached"

View file

@ -1,6 +1,5 @@
"""Alarm control panels on Zigbee Home Automation networks.""" """Alarm control panels on Zigbee Home Automation networks."""
import functools import functools
import logging
from zigpy.zcl.clusters.security import IasAce from zigpy.zcl.clusters.security import IasAce
@ -44,9 +43,6 @@ from .core.helpers import async_get_zha_config_value
from .core.registries import ZHA_ENTITIES from .core.registries import ZHA_ENTITIES
from .entity import ZhaEntity from .entity import ZhaEntity
_LOGGER = logging.getLogger(__name__)
STRICT_MATCH = functools.partial(ZHA_ENTITIES.strict_match, DOMAIN) STRICT_MATCH = functools.partial(ZHA_ENTITIES.strict_match, DOMAIN)
IAS_ACE_STATE_MAP = { IAS_ACE_STATE_MAP = {

View file

@ -7,7 +7,6 @@ https://home-assistant.io/integrations/zha/
from __future__ import annotations from __future__ import annotations
import asyncio import asyncio
import logging
from zigpy.exceptions import ZigbeeException from zigpy.exceptions import ZigbeeException
from zigpy.zcl.clusters import security from zigpy.zcl.clusters import security
@ -42,8 +41,6 @@ NAME = 0
SIGNAL_ARMED_STATE_CHANGED = "zha_armed_state_changed" SIGNAL_ARMED_STATE_CHANGED = "zha_armed_state_changed"
SIGNAL_ALARM_TRIGGERED = "zha_armed_triggered" SIGNAL_ALARM_TRIGGERED = "zha_armed_triggered"
_LOGGER = logging.getLogger(__name__)
@registries.ZIGBEE_CHANNEL_REGISTRY.register(AceCluster.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(AceCluster.cluster_id)
class IasAce(ZigbeeChannel): class IasAce(ZigbeeChannel):

View file

@ -4,7 +4,6 @@ from __future__ import annotations
import collections import collections
from collections.abc import Callable from collections.abc import Callable
import dataclasses import dataclasses
import logging
from typing import Dict, List from typing import Dict, List
import attr import attr
@ -29,7 +28,6 @@ from . import channels as zha_channels # noqa: F401 pylint: disable=unused-impo
from .decorators import CALLABLE_T, DictRegistry, SetRegistry from .decorators import CALLABLE_T, DictRegistry, SetRegistry
from .typing import ChannelType from .typing import ChannelType
_LOGGER = logging.getLogger(__name__)
GROUP_ENTITY_DOMAINS = [LIGHT, SWITCH, FAN] GROUP_ENTITY_DOMAINS = [LIGHT, SWITCH, FAN]
PHILLIPS_REMOTE_CLUSTER = 0xFC00 PHILLIPS_REMOTE_CLUSTER = 0xFC00

View file

@ -2,7 +2,6 @@
from __future__ import annotations from __future__ import annotations
import functools import functools
import logging
import voluptuous as vol import voluptuous as vol
from zwave_js_server.const import CommandClass from zwave_js_server.const import CommandClass
@ -39,8 +38,6 @@ from homeassistant.core import CALLBACK_TYPE, HassJob, HomeAssistant, callback
from homeassistant.helpers import config_validation as cv, device_registry as dr from homeassistant.helpers import config_validation as cv, device_registry as dr
from homeassistant.helpers.typing import ConfigType from homeassistant.helpers.typing import ConfigType
_LOGGER = logging.getLogger(__name__)
# Platform type should be <DOMAIN>.<SUBMODULE_NAME> # Platform type should be <DOMAIN>.<SUBMODULE_NAME>
PLATFORM_TYPE = f"{DOMAIN}.{__name__.rsplit('.', maxsplit=1)[-1]}" PLATFORM_TYPE = f"{DOMAIN}.{__name__.rsplit('.', maxsplit=1)[-1]}"

View file

@ -5,7 +5,6 @@ import asyncio
from collections.abc import Callable, Coroutine, Iterable from collections.abc import Callable, Coroutine, Iterable
from contextvars import ContextVar from contextvars import ContextVar
from datetime import datetime, timedelta from datetime import datetime, timedelta
import logging
from logging import Logger from logging import Logger
from types import ModuleType from types import ModuleType
from typing import TYPE_CHECKING, Any, Protocol from typing import TYPE_CHECKING, Any, Protocol
@ -59,8 +58,6 @@ PLATFORM_NOT_READY_RETRIES = 10
DATA_ENTITY_PLATFORM = "entity_platform" DATA_ENTITY_PLATFORM = "entity_platform"
PLATFORM_NOT_READY_BASE_WAIT_TIME = 30 # seconds PLATFORM_NOT_READY_BASE_WAIT_TIME = 30 # seconds
_LOGGER = logging.getLogger(__name__)
class AddEntitiesCallback(Protocol): class AddEntitiesCallback(Protocol):
"""Protocol type for EntityPlatform.add_entities callback.""" """Protocol type for EntityPlatform.add_entities callback."""

View file

@ -1,5 +1,4 @@
"""Test the ClimaCell config flow.""" """Test the ClimaCell config flow."""
import logging
from unittest.mock import patch from unittest.mock import patch
from pyclimacell.exceptions import ( from pyclimacell.exceptions import (
@ -34,8 +33,6 @@ from .const import API_KEY, MIN_CONFIG
from tests.common import MockConfigEntry from tests.common import MockConfigEntry
_LOGGER = logging.getLogger(__name__)
async def test_user_flow_minimum_fields(hass: HomeAssistant) -> None: async def test_user_flow_minimum_fields(hass: HomeAssistant) -> None:
"""Test user config flow with minimum fields.""" """Test user config flow with minimum fields."""

View file

@ -1,6 +1,4 @@
"""Tests for Climacell init.""" """Tests for Climacell init."""
import logging
import pytest import pytest
from homeassistant.components.climacell.config_flow import ( from homeassistant.components.climacell.config_flow import (
@ -16,8 +14,6 @@ from .const import API_V3_ENTRY_DATA, MIN_CONFIG, V1_ENTRY_DATA
from tests.common import MockConfigEntry from tests.common import MockConfigEntry
_LOGGER = logging.getLogger(__name__)
async def test_load_and_unload( async def test_load_and_unload(
hass: HomeAssistant, hass: HomeAssistant,

View file

@ -2,7 +2,6 @@
from __future__ import annotations from __future__ import annotations
from datetime import datetime from datetime import datetime
import logging
from typing import Any from typing import Any
from unittest.mock import patch from unittest.mock import patch
@ -23,7 +22,6 @@ from .const import API_V3_ENTRY_DATA, API_V4_ENTRY_DATA
from tests.common import MockConfigEntry from tests.common import MockConfigEntry
_LOGGER = logging.getLogger(__name__)
CC_SENSOR_ENTITY_ID = "sensor.climacell_{}" CC_SENSOR_ENTITY_ID = "sensor.climacell_{}"
O3 = "ozone" O3 = "ozone"

View file

@ -2,7 +2,6 @@
from __future__ import annotations from __future__ import annotations
from datetime import datetime from datetime import datetime
import logging
from typing import Any from typing import Any
from unittest.mock import patch from unittest.mock import patch
@ -51,8 +50,6 @@ from .const import API_V3_ENTRY_DATA, API_V4_ENTRY_DATA
from tests.common import MockConfigEntry from tests.common import MockConfigEntry
_LOGGER = logging.getLogger(__name__)
@callback @callback
def _enable_entity(hass: HomeAssistant, entity_name: str) -> None: def _enable_entity(hass: HomeAssistant, entity_name: str) -> None:

View file

@ -4,7 +4,6 @@ from __future__ import annotations
import asyncio import asyncio
import base64 import base64
from collections.abc import Awaitable from collections.abc import Awaitable
import logging
from typing import Callable from typing import Callable
from unittest.mock import AsyncMock, Mock, patch from unittest.mock import AsyncMock, Mock, patch
@ -39,7 +38,6 @@ from . import (
setup_test_config_entry, setup_test_config_entry,
) )
_LOGGER = logging.getLogger(__name__)
TEST_CAMERA_ENTITY_ID = "camera.test_instance_1" TEST_CAMERA_ENTITY_ID = "camera.test_instance_1"
TEST_IMAGE_DATA = "TEST DATA" TEST_IMAGE_DATA = "TEST DATA"
TEST_IMAGE_UPDATE = { TEST_IMAGE_UPDATE = {

View file

@ -1,6 +1,4 @@
"""The tests for the litejet component.""" """The tests for the litejet component."""
import logging
from homeassistant.components import light from homeassistant.components import light
from homeassistant.components.light import ATTR_BRIGHTNESS, ATTR_TRANSITION from homeassistant.components.light import ATTR_BRIGHTNESS, ATTR_TRANSITION
from homeassistant.components.litejet.const import CONF_DEFAULT_TRANSITION from homeassistant.components.litejet.const import CONF_DEFAULT_TRANSITION
@ -8,8 +6,6 @@ from homeassistant.const import ATTR_ENTITY_ID, SERVICE_TURN_OFF, SERVICE_TURN_O
from . import async_init_integration from . import async_init_integration
_LOGGER = logging.getLogger(__name__)
ENTITY_LIGHT = "light.mock_load_1" ENTITY_LIGHT = "light.mock_load_1"
ENTITY_LIGHT_NUMBER = 1 ENTITY_LIGHT_NUMBER = 1
ENTITY_OTHER_LIGHT = "light.mock_load_2" ENTITY_OTHER_LIGHT = "light.mock_load_2"

View file

@ -1,13 +1,9 @@
"""The tests for the litejet component.""" """The tests for the litejet component."""
import logging
from homeassistant.components import switch from homeassistant.components import switch
from homeassistant.const import ATTR_ENTITY_ID, SERVICE_TURN_OFF, SERVICE_TURN_ON from homeassistant.const import ATTR_ENTITY_ID, SERVICE_TURN_OFF, SERVICE_TURN_ON
from . import async_init_integration from . import async_init_integration
_LOGGER = logging.getLogger(__name__)
ENTITY_SWITCH = "switch.mock_switch_1" ENTITY_SWITCH = "switch.mock_switch_1"
ENTITY_SWITCH_NUMBER = 1 ENTITY_SWITCH_NUMBER = 1
ENTITY_OTHER_SWITCH = "switch.mock_switch_2" ENTITY_OTHER_SWITCH = "switch.mock_switch_2"

View file

@ -21,8 +21,6 @@ TEST_MODBUS_HOST = "modbusHost"
TEST_PORT_TCP = 5501 TEST_PORT_TCP = 5501
TEST_PORT_SERIAL = "usb01" TEST_PORT_SERIAL = "usb01"
_LOGGER = logging.getLogger(__name__)
@dataclass @dataclass
class ReadResult: class ReadResult:

View file

@ -1,5 +1,4 @@
"""Test the motionEye config flow.""" """Test the motionEye config flow."""
import logging
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
from motioneye_client.client import ( from motioneye_client.client import (
@ -25,8 +24,6 @@ from . import TEST_URL, create_mock_motioneye_client, create_mock_motioneye_conf
from tests.common import MockConfigEntry from tests.common import MockConfigEntry
_LOGGER = logging.getLogger(__name__)
async def test_user_success(hass: HomeAssistant) -> None: async def test_user_success(hass: HomeAssistant) -> None:
"""Test successful user flow.""" """Test successful user flow."""

View file

@ -1,6 +1,5 @@
"""Test the motionEye camera web hooks.""" """Test the motionEye camera web hooks."""
import copy import copy
import logging
from typing import Any from typing import Any
from unittest.mock import AsyncMock, call, patch from unittest.mock import AsyncMock, call, patch
@ -50,9 +49,6 @@ from . import (
from tests.common import async_capture_events from tests.common import async_capture_events
_LOGGER = logging.getLogger(__name__)
WEB_HOOK_MOTION_DETECTED_QUERY_STRING = ( WEB_HOOK_MOTION_DETECTED_QUERY_STRING = (
"camera_id=%t&changed_pixels=%D&despeckle_labels=%Q&event=%v&fps=%{fps}" "camera_id=%t&changed_pixels=%D&despeckle_labels=%Q&event=%v&fps=%{fps}"
"&frame_number=%q&height=%h&host=%{host}&motion_center_x=%K&motion_center_y=%L" "&frame_number=%q&height=%h&host=%{host}&motion_center_x=%K&motion_center_y=%L"

View file

@ -1,5 +1,4 @@
"""Tests for the Netgear config flow.""" """Tests for the Netgear config flow."""
import logging
from unittest.mock import Mock, patch from unittest.mock import Mock, patch
from pynetgear import DEFAULT_HOST, DEFAULT_PORT, DEFAULT_USER from pynetgear import DEFAULT_HOST, DEFAULT_PORT, DEFAULT_USER
@ -19,8 +18,6 @@ from homeassistant.const import (
from tests.common import MockConfigEntry from tests.common import MockConfigEntry
_LOGGER = logging.getLogger(__name__)
URL = "http://routerlogin.net" URL = "http://routerlogin.net"
SERIAL = "5ER1AL0000001" SERIAL = "5ER1AL0000001"

View file

@ -1,5 +1,4 @@
"""Test the sia config flow.""" """Test the sia config flow."""
import logging
from unittest.mock import patch from unittest.mock import patch
import pytest import pytest
@ -21,9 +20,6 @@ from homeassistant.setup import async_setup_component
from tests.common import MockConfigEntry from tests.common import MockConfigEntry
_LOGGER = logging.getLogger(__name__)
BASIS_CONFIG_ENTRY_ID = 1 BASIS_CONFIG_ENTRY_ID = 1
BASIC_CONFIG = { BASIC_CONFIG = {
CONF_PORT: 7777, CONF_PORT: 7777,