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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,7 +1,6 @@
"""Config flow for kraken integration."""
from __future__ import annotations
import logging
from typing import Any
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 .utils import get_tradable_asset_pairs
_LOGGER = logging.getLogger(__name__)
class KrakenConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow for kraken."""

View file

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

View file

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

View file

@ -1,5 +1,4 @@
"""API for Honeywell Lyric bound to Home Assistant OAuth."""
import logging
from typing import cast
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.aiohttp_client import async_get_clientsession
_LOGGER = logging.getLogger(__name__)
class ConfigEntryLyricClient(LyricClient):
"""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
_LOGGER = logging.getLogger(__name__)
class OAuth2FlowHandler(
config_entry_oauth2_flow.AbstractOAuth2FlowHandler, domain=DOMAIN

View file

@ -1,6 +1,4 @@
"""Support for Meteoclimatic sensor."""
import logging
from homeassistant.components.sensor import SensorEntity, SensorEntityDescription
from homeassistant.config_entries import ConfigEntry
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
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,4 @@
"""Support for MyQ-Enabled Garage Doors."""
import logging
from pymyq.const import DEVICE_TYPE_GATE as MYQ_DEVICE_TYPE_GATE
from pymyq.errors import MyQError
@ -17,8 +15,6 @@ from homeassistant.exceptions import HomeAssistantError
from . import MyQEntity
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):
"""Set up mysq covers."""

View file

@ -1,6 +1,4 @@
"""Support for MyQ-Enabled lights."""
import logging
from pymyq.errors import MyQError
from homeassistant.components.light import LightEntity
@ -10,8 +8,6 @@ from homeassistant.exceptions import HomeAssistantError
from . import MyQEntity
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):
"""Set up myq lights."""

View file

@ -1,7 +1,6 @@
"""Config flow for MySensors."""
from __future__ import annotations
import logging
import os
from typing import Any
@ -46,8 +45,6 @@ from .const import (
)
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:
"""Create a schema with options common to all gateway types."""

View file

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

View file

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

View file

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

View file

@ -1,6 +1,4 @@
"""Web socket API for OpenZWave."""
import logging
from openzwavemqtt.const import (
ATTR_CODE_SLOT,
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 .lock import ATTR_USERCODE
_LOGGER = logging.getLogger(__name__)
DRY_RUN = "dry_run"
TYPE = "type"
ID = "id"

View file

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

View file

@ -1,7 +1,5 @@
"""Support for Plaato Airlock sensors."""
import logging
from pyplaato.plaato import PlaatoKeg
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 .entity import PlaatoEntity
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Plaato from a config entry."""

View file

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

View file

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

View file

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

View file

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

View file

@ -1,8 +1,6 @@
"""Platform for binary sensor integration."""
from __future__ import annotations
import logging
from smarttub import SpaError, SpaReminder
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 .entity import SmartTubEntity, SmartTubSensorBase
_LOGGER = logging.getLogger(__name__)
# whether the reminder has been snoozed (bool)
ATTR_REMINDER_SNOOZED = "snoozed"

View file

@ -1,6 +1,4 @@
"""Platform for climate integration."""
import logging
from smarttub import Spa
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 .entity import SmartTubEntity
_LOGGER = logging.getLogger(__name__)
PRESET_DAY = "day"
PRESET_MODES = {

View file

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

View file

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

View file

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

View file

@ -1,6 +1,5 @@
"""Platform for sensor integration."""
from enum import Enum
import logging
import smarttub
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 .entity import SmartTubSensorBase
_LOGGER = logging.getLogger(__name__)
# the desired duration, in hours, of the cycle
ATTR_DURATION = "duration"
ATTR_CYCLE_LAST_UPDATED = "cycle_last_updated"

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,7 +1,6 @@
"""Support for Sure PetCare Flaps/Pets sensors."""
from __future__ import annotations
import logging
from typing import cast
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 .entity import SurePetcareEntity
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback

View file

@ -1,6 +1,4 @@
"""Config flow for syncthing integration."""
import logging
import aiosyncthing
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
_LOGGER = logging.getLogger(__name__)
DATA_SCHEMA = vol.Schema(
{
vol.Required(CONF_URL, default=DEFAULT_URL): str,

View file

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

View file

@ -1,7 +1,5 @@
"""Support for Samsung Printers with SyncThru web interface."""
import logging
from pysyncthru import SyncThru, SyncthruState
from homeassistant.components.binary_sensor import (
@ -18,8 +16,6 @@ from homeassistant.helpers.update_coordinator import (
from . import device_identifiers
from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
SYNCTHRU_STATE_PROBLEM = {
SyncthruState.INVALID: True,
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 deep packet inspection (DPI) restriction groups.
"""
import logging
from typing import Any
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_entity_base import UniFiBase
_LOGGER = logging.getLogger(__name__)
BLOCK_SWITCH = "block"
DPI_SWITCH = "dpi"
POE_SWITCH = "poe"

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,5 @@
"""Support for WeMo binary sensors."""
import asyncio
import logging
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 .entity import WemoEntity
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up WeMo binary sensors."""

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,5 @@
"""Alarm control panels on Zigbee Home Automation networks."""
import functools
import logging
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 .entity import ZhaEntity
_LOGGER = logging.getLogger(__name__)
STRICT_MATCH = functools.partial(ZHA_ENTITIES.strict_match, DOMAIN)
IAS_ACE_STATE_MAP = {

View file

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

View file

@ -4,7 +4,6 @@ from __future__ import annotations
import collections
from collections.abc import Callable
import dataclasses
import logging
from typing import Dict, List
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 .typing import ChannelType
_LOGGER = logging.getLogger(__name__)
GROUP_ENTITY_DOMAINS = [LIGHT, SWITCH, FAN]
PHILLIPS_REMOTE_CLUSTER = 0xFC00

View file

@ -2,7 +2,6 @@
from __future__ import annotations
import functools
import logging
import voluptuous as vol
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.typing import ConfigType
_LOGGER = logging.getLogger(__name__)
# Platform type should be <DOMAIN>.<SUBMODULE_NAME>
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 contextvars import ContextVar
from datetime import datetime, timedelta
import logging
from logging import Logger
from types import ModuleType
from typing import TYPE_CHECKING, Any, Protocol
@ -59,8 +58,6 @@ PLATFORM_NOT_READY_RETRIES = 10
DATA_ENTITY_PLATFORM = "entity_platform"
PLATFORM_NOT_READY_BASE_WAIT_TIME = 30 # seconds
_LOGGER = logging.getLogger(__name__)
class AddEntitiesCallback(Protocol):
"""Protocol type for EntityPlatform.add_entities callback."""

View file

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

View file

@ -1,6 +1,4 @@
"""Tests for Climacell init."""
import logging
import pytest
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
_LOGGER = logging.getLogger(__name__)
async def test_load_and_unload(
hass: HomeAssistant,

View file

@ -2,7 +2,6 @@
from __future__ import annotations
from datetime import datetime
import logging
from typing import Any
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
_LOGGER = logging.getLogger(__name__)
CC_SENSOR_ENTITY_ID = "sensor.climacell_{}"
O3 = "ozone"

View file

@ -2,7 +2,6 @@
from __future__ import annotations
from datetime import datetime
import logging
from typing import Any
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
_LOGGER = logging.getLogger(__name__)
@callback
def _enable_entity(hass: HomeAssistant, entity_name: str) -> None:

View file

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

View file

@ -1,6 +1,4 @@
"""The tests for the litejet component."""
import logging
from homeassistant.components import light
from homeassistant.components.light import ATTR_BRIGHTNESS, ATTR_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
_LOGGER = logging.getLogger(__name__)
ENTITY_LIGHT = "light.mock_load_1"
ENTITY_LIGHT_NUMBER = 1
ENTITY_OTHER_LIGHT = "light.mock_load_2"

View file

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

View file

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

View file

@ -1,5 +1,4 @@
"""Test the motionEye config flow."""
import logging
from unittest.mock import AsyncMock, patch
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
_LOGGER = logging.getLogger(__name__)
async def test_user_success(hass: HomeAssistant) -> None:
"""Test successful user flow."""

View file

@ -1,6 +1,5 @@
"""Test the motionEye camera web hooks."""
import copy
import logging
from typing import Any
from unittest.mock import AsyncMock, call, patch
@ -50,9 +49,6 @@ from . import (
from tests.common import async_capture_events
_LOGGER = logging.getLogger(__name__)
WEB_HOOK_MOTION_DETECTED_QUERY_STRING = (
"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"

View file

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

View file

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