diff --git a/homeassistant/auth/permissions/__init__.py b/homeassistant/auth/permissions/__init__.py index 694ea2b7379..101c331b842 100644 --- a/homeassistant/auth/permissions/__init__.py +++ b/homeassistant/auth/permissions/__init__.py @@ -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.""" diff --git a/homeassistant/components/adax/climate.py b/homeassistant/components/adax/climate.py index 1abd83fdbfc..674329aaf6b 100644 --- a/homeassistant/components/adax/climate.py +++ b/homeassistant/components/adax/climate.py @@ -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, diff --git a/homeassistant/components/asuswrt/sensor.py b/homeassistant/components/asuswrt/sensor.py index 5392b419bca..4b865bfb0e3 100644 --- a/homeassistant/components/asuswrt/sensor.py +++ b/homeassistant/components/asuswrt/sensor.py @@ -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 diff --git a/homeassistant/components/climacell/sensor.py b/homeassistant/components/climacell/sensor.py index 1ba5bbe3a34..07bc4790b5f 100644 --- a/homeassistant/components/climacell/sensor.py +++ b/homeassistant/components/climacell/sensor.py @@ -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, diff --git a/homeassistant/components/climacell/weather.py b/homeassistant/components/climacell/weather.py index 865c2baa330..cb0783c6bee 100644 --- a/homeassistant/components/climacell/weather.py +++ b/homeassistant/components/climacell/weather.py @@ -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, diff --git a/homeassistant/components/co2signal/config_flow.py b/homeassistant/components/co2signal/config_flow.py index e3862d6347c..e7f94e4d603 100644 --- a/homeassistant/components/co2signal/config_flow.py +++ b/homeassistant/components/co2signal/config_flow.py @@ -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" diff --git a/homeassistant/components/econet/climate.py b/homeassistant/components/econet/climate.py index fe50855d559..24bac516466 100644 --- a/homeassistant/components/econet/climate.py +++ b/homeassistant/components/econet/climate.py @@ -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, diff --git a/homeassistant/components/generic_hygrostat/__init__.py b/homeassistant/components/generic_hygrostat/__init__.py index 568863adb73..b58c98b1d0d 100644 --- a/homeassistant/components/generic_hygrostat/__init__.py +++ b/homeassistant/components/generic_hygrostat/__init__.py @@ -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" diff --git a/homeassistant/components/gogogate2/cover.py b/homeassistant/components/gogogate2/cover.py index 073c48e55b8..fb5871e8636 100644 --- a/homeassistant/components/gogogate2/cover.py +++ b/homeassistant/components/gogogate2/cover.py @@ -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, diff --git a/homeassistant/components/group/binary_sensor.py b/homeassistant/components/group/binary_sensor.py index 24d6cb86aa1..613b21571de 100644 --- a/homeassistant/components/group/binary_sensor.py +++ b/homeassistant/components/group/binary_sensor.py @@ -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), diff --git a/homeassistant/components/hyperion/camera.py b/homeassistant/components/hyperion/camera.py index 809449543af..d172d00c021 100644 --- a/homeassistant/components/hyperion/camera.py +++ b/homeassistant/components/hyperion/camera.py @@ -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," diff --git a/homeassistant/components/ialarm/alarm_control_panel.py b/homeassistant/components/ialarm/alarm_control_panel.py index a33162b7afd..fc758dd6175 100644 --- a/homeassistant/components/ialarm/alarm_control_panel.py +++ b/homeassistant/components/ialarm/alarm_control_panel.py @@ -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.""" diff --git a/homeassistant/components/keenetic_ndms2/binary_sensor.py b/homeassistant/components/keenetic_ndms2/binary_sensor.py index e8f7df02489..aa46c0fab02 100644 --- a/homeassistant/components/keenetic_ndms2/binary_sensor.py +++ b/homeassistant/components/keenetic_ndms2/binary_sensor.py @@ -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 diff --git a/homeassistant/components/kraken/config_flow.py b/homeassistant/components/kraken/config_flow.py index 68443705767..b821f7a5920 100644 --- a/homeassistant/components/kraken/config_flow.py +++ b/homeassistant/components/kraken/config_flow.py @@ -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.""" diff --git a/homeassistant/components/litejet/config_flow.py b/homeassistant/components/litejet/config_flow.py index 4f8128bd6dc..3e5422518f4 100644 --- a/homeassistant/components/litejet/config_flow.py +++ b/homeassistant/components/litejet/config_flow.py @@ -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.""" diff --git a/homeassistant/components/litejet/scene.py b/homeassistant/components/litejet/scene.py index 5ae0aec9559..2f2ab244e1e 100644 --- a/homeassistant/components/litejet/scene.py +++ b/homeassistant/components/litejet/scene.py @@ -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" diff --git a/homeassistant/components/lyric/api.py b/homeassistant/components/lyric/api.py index 4d955165174..3b23f802ded 100644 --- a/homeassistant/components/lyric/api.py +++ b/homeassistant/components/lyric/api.py @@ -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.""" diff --git a/homeassistant/components/lyric/config_flow.py b/homeassistant/components/lyric/config_flow.py index 73040d51e1e..38341113206 100644 --- a/homeassistant/components/lyric/config_flow.py +++ b/homeassistant/components/lyric/config_flow.py @@ -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 diff --git a/homeassistant/components/meteoclimatic/sensor.py b/homeassistant/components/meteoclimatic/sensor.py index d3ecb44ce70..e4f7a1525d5 100644 --- a/homeassistant/components/meteoclimatic/sensor.py +++ b/homeassistant/components/meteoclimatic/sensor.py @@ -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 diff --git a/homeassistant/components/modbus/__init__.py b/homeassistant/components/modbus/__init__.py index b7a1e9db8e7..720e57605ce 100644 --- a/homeassistant/components/modbus/__init__.py +++ b/homeassistant/components/modbus/__init__.py @@ -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}) diff --git a/homeassistant/components/modbus/binary_sensor.py b/homeassistant/components/modbus/binary_sensor.py index d3a8578f47d..171486639f4 100644 --- a/homeassistant/components/modbus/binary_sensor.py +++ b/homeassistant/components/modbus/binary_sensor.py @@ -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( diff --git a/homeassistant/components/modbus/climate.py b/homeassistant/components/modbus/climate.py index 1b1a09cf9cb..a526e7cc2f9 100644 --- a/homeassistant/components/modbus/climate.py +++ b/homeassistant/components/modbus/climate.py @@ -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( diff --git a/homeassistant/components/modbus/cover.py b/homeassistant/components/modbus/cover.py index 805f07bad40..152239e88c7 100644 --- a/homeassistant/components/modbus/cover.py +++ b/homeassistant/components/modbus/cover.py @@ -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( diff --git a/homeassistant/components/modbus/fan.py b/homeassistant/components/modbus/fan.py index 349ae0d0619..62532cc93ac 100644 --- a/homeassistant/components/modbus/fan.py +++ b/homeassistant/components/modbus/fan.py @@ -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( diff --git a/homeassistant/components/modbus/light.py b/homeassistant/components/modbus/light.py index f0f2541ad0f..cc5936050e8 100644 --- a/homeassistant/components/modbus/light.py +++ b/homeassistant/components/modbus/light.py @@ -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( diff --git a/homeassistant/components/modbus/sensor.py b/homeassistant/components/modbus/sensor.py index 6702e6f22d1..4cf642ca44b 100644 --- a/homeassistant/components/modbus/sensor.py +++ b/homeassistant/components/modbus/sensor.py @@ -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( diff --git a/homeassistant/components/modbus/switch.py b/homeassistant/components/modbus/switch.py index 86cba7c36ff..5844daf648e 100644 --- a/homeassistant/components/modbus/switch.py +++ b/homeassistant/components/modbus/switch.py @@ -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( diff --git a/homeassistant/components/motioneye/camera.py b/homeassistant/components/motioneye/camera.py index e7ff75812f6..3e8df99e0aa 100644 --- a/homeassistant/components/motioneye/camera.py +++ b/homeassistant/components/motioneye/camera.py @@ -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"] diff --git a/homeassistant/components/motioneye/config_flow.py b/homeassistant/components/motioneye/config_flow.py index a5f92a3ce09..a767cf7ecad 100644 --- a/homeassistant/components/motioneye/config_flow.py +++ b/homeassistant/components/motioneye/config_flow.py @@ -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.""" diff --git a/homeassistant/components/mullvad/config_flow.py b/homeassistant/components/mullvad/config_flow.py index 1b330d4f6a3..5b6ef78133f 100644 --- a/homeassistant/components/mullvad/config_flow.py +++ b/homeassistant/components/mullvad/config_flow.py @@ -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.""" diff --git a/homeassistant/components/myq/cover.py b/homeassistant/components/myq/cover.py index e8e06dc3b22..4379137b3f1 100644 --- a/homeassistant/components/myq/cover.py +++ b/homeassistant/components/myq/cover.py @@ -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.""" diff --git a/homeassistant/components/myq/light.py b/homeassistant/components/myq/light.py index d8154d7c427..fb3666b62b7 100644 --- a/homeassistant/components/myq/light.py +++ b/homeassistant/components/myq/light.py @@ -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.""" diff --git a/homeassistant/components/mysensors/config_flow.py b/homeassistant/components/mysensors/config_flow.py index 920cb40b7ab..aea15e7b8ae 100644 --- a/homeassistant/components/mysensors/config_flow.py +++ b/homeassistant/components/mysensors/config_flow.py @@ -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.""" diff --git a/homeassistant/components/mysensors/cover.py b/homeassistant/components/mysensors/cover.py index bab7a07a867..9219097bea4 100644 --- a/homeassistant/components/mysensors/cover.py +++ b/homeassistant/components/mysensors/cover.py @@ -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): diff --git a/homeassistant/components/netgear/__init__.py b/homeassistant/components/netgear/__init__.py index 395773c5fe3..301fb780c1b 100644 --- a/homeassistant/components/netgear/__init__.py +++ b/homeassistant/components/netgear/__init__.py @@ -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.""" diff --git a/homeassistant/components/netgear/sensor.py b/homeassistant/components/netgear/sensor.py index d5b8bfd368e..57ffe6f98f2 100644 --- a/homeassistant/components/netgear/sensor.py +++ b/homeassistant/components/netgear/sensor.py @@ -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", diff --git a/homeassistant/components/ozw/websocket_api.py b/homeassistant/components/ozw/websocket_api.py index bb55a686db8..45c0a113841 100644 --- a/homeassistant/components/ozw/websocket_api.py +++ b/homeassistant/components/ozw/websocket_api.py @@ -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" diff --git a/homeassistant/components/panasonic_viera/remote.py b/homeassistant/components/panasonic_viera/remote.py index 8f3fab80215..acd1d49f1be 100644 --- a/homeassistant/components/panasonic_viera/remote.py +++ b/homeassistant/components/panasonic_viera/remote.py @@ -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.""" diff --git a/homeassistant/components/plaato/binary_sensor.py b/homeassistant/components/plaato/binary_sensor.py index 27150692d6f..52213d46791 100644 --- a/homeassistant/components/plaato/binary_sensor.py +++ b/homeassistant/components/plaato/binary_sensor.py @@ -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.""" diff --git a/homeassistant/components/plaato/config_flow.py b/homeassistant/components/plaato/config_flow.py index 79a4657c312..3bd3e9f0063 100644 --- a/homeassistant/components/plaato/config_flow.py +++ b/homeassistant/components/plaato/config_flow.py @@ -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.""" diff --git a/homeassistant/components/screenlogic/binary_sensor.py b/homeassistant/components/screenlogic/binary_sensor.py index 649e6925408..f5d95d03be2 100644 --- a/homeassistant/components/screenlogic/binary_sensor.py +++ b/homeassistant/components/screenlogic/binary_sensor.py @@ -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} diff --git a/homeassistant/components/screenlogic/sensor.py b/homeassistant/components/screenlogic/sensor.py index 7e8a0dbf60b..357e771f6be 100644 --- a/homeassistant/components/screenlogic/sensor.py +++ b/homeassistant/components/screenlogic/sensor.py @@ -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", diff --git a/homeassistant/components/smarttub/__init__.py b/homeassistant/components/smarttub/__init__.py index a396b50840d..89ad9222e7a 100644 --- a/homeassistant/components/smarttub/__init__.py +++ b/homeassistant/components/smarttub/__init__.py @@ -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"] diff --git a/homeassistant/components/smarttub/binary_sensor.py b/homeassistant/components/smarttub/binary_sensor.py index 6ddeccadc74..a3422e27d8d 100644 --- a/homeassistant/components/smarttub/binary_sensor.py +++ b/homeassistant/components/smarttub/binary_sensor.py @@ -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" diff --git a/homeassistant/components/smarttub/climate.py b/homeassistant/components/smarttub/climate.py index be564c84a94..b089098546f 100644 --- a/homeassistant/components/smarttub/climate.py +++ b/homeassistant/components/smarttub/climate.py @@ -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 = { diff --git a/homeassistant/components/smarttub/config_flow.py b/homeassistant/components/smarttub/config_flow.py index 652aec746a1..88ec38e8d63 100644 --- a/homeassistant/components/smarttub/config_flow.py +++ b/homeassistant/components/smarttub/config_flow.py @@ -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} ) diff --git a/homeassistant/components/smarttub/entity.py b/homeassistant/components/smarttub/entity.py index 4bf20868ee0..49d5e94d76e 100644 --- a/homeassistant/components/smarttub/entity.py +++ b/homeassistant/components/smarttub/entity.py @@ -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.""" diff --git a/homeassistant/components/smarttub/light.py b/homeassistant/components/smarttub/light.py index 1e4229ee4e6..8d03879a0a5 100644 --- a/homeassistant/components/smarttub/light.py +++ b/homeassistant/components/smarttub/light.py @@ -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.""" diff --git a/homeassistant/components/smarttub/sensor.py b/homeassistant/components/smarttub/sensor.py index 9922792ba12..690873cc8bf 100644 --- a/homeassistant/components/smarttub/sensor.py +++ b/homeassistant/components/smarttub/sensor.py @@ -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" diff --git a/homeassistant/components/smarttub/switch.py b/homeassistant/components/smarttub/switch.py index 7cab25e6cf7..4ce8d7a6838 100644 --- a/homeassistant/components/smarttub/switch.py +++ b/homeassistant/components/smarttub/switch.py @@ -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.""" diff --git a/homeassistant/components/sonarr/__init__.py b/homeassistant/components/sonarr/__init__.py index f0969d063c1..b2cc13abc37 100644 --- a/homeassistant/components/sonarr/__init__.py +++ b/homeassistant/components/sonarr/__init__.py @@ -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: diff --git a/homeassistant/components/sonos/binary_sensor.py b/homeassistant/components/sonos/binary_sensor.py index 8583132521c..730a6367edd 100644 --- a/homeassistant/components/sonos/binary_sensor.py +++ b/homeassistant/components/sonos/binary_sensor.py @@ -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" diff --git a/homeassistant/components/sonos/config_flow.py b/homeassistant/components/sonos/config_flow.py index 3fa3bbb8fa8..745d3db3890 100644 --- a/homeassistant/components/sonos/config_flow.py +++ b/homeassistant/components/sonos/config_flow.py @@ -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.""" diff --git a/homeassistant/components/sonos/sensor.py b/homeassistant/components/sonos/sensor.py index 1a13e6f55f4..a71ac7cef21 100644 --- a/homeassistant/components/sonos/sensor.py +++ b/homeassistant/components/sonos/sensor.py @@ -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.""" diff --git a/homeassistant/components/stream/hls.py b/homeassistant/components/stream/hls.py index 39ea9a5e8c0..50b002b52b4 100644 --- a/homeassistant/components/stream/hls.py +++ b/homeassistant/components/stream/hls.py @@ -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: diff --git a/homeassistant/components/surepetcare/lock.py b/homeassistant/components/surepetcare/lock.py index 8351eea161b..bb55514409a 100644 --- a/homeassistant/components/surepetcare/lock.py +++ b/homeassistant/components/surepetcare/lock.py @@ -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 diff --git a/homeassistant/components/surepetcare/sensor.py b/homeassistant/components/surepetcare/sensor.py index 508ad030922..c0441d0a7fd 100644 --- a/homeassistant/components/surepetcare/sensor.py +++ b/homeassistant/components/surepetcare/sensor.py @@ -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 diff --git a/homeassistant/components/syncthing/config_flow.py b/homeassistant/components/syncthing/config_flow.py index e6a5c994834..7421a385f08 100644 --- a/homeassistant/components/syncthing/config_flow.py +++ b/homeassistant/components/syncthing/config_flow.py @@ -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, diff --git a/homeassistant/components/syncthing/sensor.py b/homeassistant/components/syncthing/sensor.py index 924f8aaf669..e88636b814b 100644 --- a/homeassistant/components/syncthing/sensor.py +++ b/homeassistant/components/syncthing/sensor.py @@ -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.""" diff --git a/homeassistant/components/syncthru/binary_sensor.py b/homeassistant/components/syncthru/binary_sensor.py index 7c4bd6fa8d1..1c402fbf836 100644 --- a/homeassistant/components/syncthru/binary_sensor.py +++ b/homeassistant/components/syncthru/binary_sensor.py @@ -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, diff --git a/homeassistant/components/unifi/switch.py b/homeassistant/components/unifi/switch.py index e419e2b4410..eebd5014cb5 100644 --- a/homeassistant/components/unifi/switch.py +++ b/homeassistant/components/unifi/switch.py @@ -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" diff --git a/homeassistant/components/velbus/climate.py b/homeassistant/components/velbus/climate.py index 68d92bf43d0..cdb049266b5 100644 --- a/homeassistant/components/velbus/climate.py +++ b/homeassistant/components/velbus/climate.py @@ -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.""" diff --git a/homeassistant/components/velbus/cover.py b/homeassistant/components/velbus/cover.py index 1003d341c93..53fd32fad34 100644 --- a/homeassistant/components/velbus/cover.py +++ b/homeassistant/components/velbus/cover.py @@ -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.""" diff --git a/homeassistant/components/velbus/light.py b/homeassistant/components/velbus/light.py index 482bdb53e94..a252930b49d 100644 --- a/homeassistant/components/velbus/light.py +++ b/homeassistant/components/velbus/light.py @@ -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.""" diff --git a/homeassistant/components/velbus/switch.py b/homeassistant/components/velbus/switch.py index 6b9609cc857..70c7e1eb457 100644 --- a/homeassistant/components/velbus/switch.py +++ b/homeassistant/components/velbus/switch.py @@ -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.""" diff --git a/homeassistant/components/waze_travel_time/__init__.py b/homeassistant/components/waze_travel_time/__init__.py index 1b9db0e947a..fa605d19c49 100644 --- a/homeassistant/components/waze_travel_time/__init__.py +++ b/homeassistant/components/waze_travel_time/__init__.py @@ -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: diff --git a/homeassistant/components/wemo/binary_sensor.py b/homeassistant/components/wemo/binary_sensor.py index a7f1824cf4b..1341d5526a3 100644 --- a/homeassistant/components/wemo/binary_sensor.py +++ b/homeassistant/components/wemo/binary_sensor.py @@ -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.""" diff --git a/homeassistant/components/wemo/fan.py b/homeassistant/components/wemo/fan.py index 501011f841a..00f9b77aa61 100644 --- a/homeassistant/components/wemo/fan.py +++ b/homeassistant/components/wemo/fan.py @@ -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" diff --git a/homeassistant/components/wemo/light.py b/homeassistant/components/wemo/light.py index 13f375ad726..4339e964b62 100644 --- a/homeassistant/components/wemo/light.py +++ b/homeassistant/components/wemo/light.py @@ -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 ) diff --git a/homeassistant/components/wemo/switch.py b/homeassistant/components/wemo/switch.py index a9ee2579c47..d1240d034b5 100644 --- a/homeassistant/components/wemo/switch.py +++ b/homeassistant/components/wemo/switch.py @@ -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" diff --git a/homeassistant/components/xiaomi_miio/binary_sensor.py b/homeassistant/components/xiaomi_miio/binary_sensor.py index 28553c159fe..a28c449e5cb 100644 --- a/homeassistant/components/xiaomi_miio/binary_sensor.py +++ b/homeassistant/components/xiaomi_miio/binary_sensor.py @@ -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" diff --git a/homeassistant/components/zha/alarm_control_panel.py b/homeassistant/components/zha/alarm_control_panel.py index dd705e44798..1ba5f1b73f8 100644 --- a/homeassistant/components/zha/alarm_control_panel.py +++ b/homeassistant/components/zha/alarm_control_panel.py @@ -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 = { diff --git a/homeassistant/components/zha/core/channels/security.py b/homeassistant/components/zha/core/channels/security.py index 0800fee1374..5ef0ee3d9fa 100644 --- a/homeassistant/components/zha/core/channels/security.py +++ b/homeassistant/components/zha/core/channels/security.py @@ -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): diff --git a/homeassistant/components/zha/core/registries.py b/homeassistant/components/zha/core/registries.py index 1e41c313836..8b2c4d11fbf 100644 --- a/homeassistant/components/zha/core/registries.py +++ b/homeassistant/components/zha/core/registries.py @@ -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 diff --git a/homeassistant/components/zwave_js/triggers/value_updated.py b/homeassistant/components/zwave_js/triggers/value_updated.py index fdf2589073e..7ebdb4f3748 100644 --- a/homeassistant/components/zwave_js/triggers/value_updated.py +++ b/homeassistant/components/zwave_js/triggers/value_updated.py @@ -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 . PLATFORM_TYPE = f"{DOMAIN}.{__name__.rsplit('.', maxsplit=1)[-1]}" diff --git a/homeassistant/helpers/entity_platform.py b/homeassistant/helpers/entity_platform.py index 5fb095c4f02..0d966cde313 100644 --- a/homeassistant/helpers/entity_platform.py +++ b/homeassistant/helpers/entity_platform.py @@ -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.""" diff --git a/tests/components/climacell/test_config_flow.py b/tests/components/climacell/test_config_flow.py index faa3748be69..476f2ba3bee 100644 --- a/tests/components/climacell/test_config_flow.py +++ b/tests/components/climacell/test_config_flow.py @@ -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.""" diff --git a/tests/components/climacell/test_init.py b/tests/components/climacell/test_init.py index d90a0c00181..5ee50c6d0ec 100644 --- a/tests/components/climacell/test_init.py +++ b/tests/components/climacell/test_init.py @@ -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, diff --git a/tests/components/climacell/test_sensor.py b/tests/components/climacell/test_sensor.py index c642457b63e..8c075942cea 100644 --- a/tests/components/climacell/test_sensor.py +++ b/tests/components/climacell/test_sensor.py @@ -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" diff --git a/tests/components/climacell/test_weather.py b/tests/components/climacell/test_weather.py index 90efdea3c8c..e3e15889e44 100644 --- a/tests/components/climacell/test_weather.py +++ b/tests/components/climacell/test_weather.py @@ -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: diff --git a/tests/components/hyperion/test_camera.py b/tests/components/hyperion/test_camera.py index daed1ec2cc9..a32663d7725 100644 --- a/tests/components/hyperion/test_camera.py +++ b/tests/components/hyperion/test_camera.py @@ -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 = { diff --git a/tests/components/litejet/test_light.py b/tests/components/litejet/test_light.py index 1961843c8b0..86b3dd84367 100644 --- a/tests/components/litejet/test_light.py +++ b/tests/components/litejet/test_light.py @@ -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" diff --git a/tests/components/litejet/test_switch.py b/tests/components/litejet/test_switch.py index dfcb9801093..d8fb2ef39c9 100644 --- a/tests/components/litejet/test_switch.py +++ b/tests/components/litejet/test_switch.py @@ -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" diff --git a/tests/components/modbus/conftest.py b/tests/components/modbus/conftest.py index 9b85d23df1c..4c8df13fbe6 100644 --- a/tests/components/modbus/conftest.py +++ b/tests/components/modbus/conftest.py @@ -21,8 +21,6 @@ TEST_MODBUS_HOST = "modbusHost" TEST_PORT_TCP = 5501 TEST_PORT_SERIAL = "usb01" -_LOGGER = logging.getLogger(__name__) - @dataclass class ReadResult: diff --git a/tests/components/motioneye/test_config_flow.py b/tests/components/motioneye/test_config_flow.py index dffcc4660d8..591bbaa4c7d 100644 --- a/tests/components/motioneye/test_config_flow.py +++ b/tests/components/motioneye/test_config_flow.py @@ -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.""" diff --git a/tests/components/motioneye/test_web_hooks.py b/tests/components/motioneye/test_web_hooks.py index ac84bd405cd..55e7e31d9b9 100644 --- a/tests/components/motioneye/test_web_hooks.py +++ b/tests/components/motioneye/test_web_hooks.py @@ -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" diff --git a/tests/components/netgear/test_config_flow.py b/tests/components/netgear/test_config_flow.py index ad060b60d36..b81171196c0 100644 --- a/tests/components/netgear/test_config_flow.py +++ b/tests/components/netgear/test_config_flow.py @@ -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" diff --git a/tests/components/sia/test_config_flow.py b/tests/components/sia/test_config_flow.py index a91822c7846..6b1517601f4 100644 --- a/tests/components/sia/test_config_flow.py +++ b/tests/components/sia/test_config_flow.py @@ -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,