From a5a45f29e2953bc61a63f72bda1fd8a643efd7b4 Mon Sep 17 00:00:00 2001 From: tkdrob Date: Sun, 14 Feb 2021 07:46:58 -0500 Subject: [PATCH] Cleanup unused loggers (#46510) --- homeassistant/components/agent_dvr/config_flow.py | 3 --- homeassistant/components/airvisual/sensor.py | 4 ---- homeassistant/components/asuswrt/__init__.py | 3 --- homeassistant/components/asuswrt/device_tracker.py | 3 --- homeassistant/components/aurora/binary_sensor.py | 4 ---- homeassistant/components/aurora/sensor.py | 4 ---- homeassistant/components/blueprint/websocket_api.py | 3 --- homeassistant/components/bmw_connected_drive/config_flow.py | 5 ----- homeassistant/components/dyson/air_quality.py | 4 ---- homeassistant/components/dyson/sensor.py | 4 ---- homeassistant/components/econet/binary_sensor.py | 4 ---- homeassistant/components/econet/sensor.py | 5 ----- homeassistant/components/fireservicerota/binary_sensor.py | 4 ---- homeassistant/components/gree/switch.py | 3 --- homeassistant/components/hangouts/const.py | 5 ----- homeassistant/components/homekit/config_flow.py | 3 --- homeassistant/components/homematicip_cloud/__init__.py | 4 ---- homeassistant/components/ipma/const.py | 4 ---- homeassistant/components/izone/discovery.py | 5 ----- homeassistant/components/lutron_caseta/device_trigger.py | 4 ---- homeassistant/components/met/const.py | 4 ---- homeassistant/components/modbus/__init__.py | 4 ---- homeassistant/components/motion_blinds/config_flow.py | 5 ----- homeassistant/components/motion_blinds/sensor.py | 4 ---- homeassistant/components/mqtt/camera.py | 3 --- homeassistant/components/mqtt/config_flow.py | 3 --- homeassistant/components/mqtt/debug_info.py | 3 --- homeassistant/components/mqtt/device_automation.py | 3 --- .../components/mqtt/device_tracker/schema_discovery.py | 3 --- homeassistant/components/mqtt/fan.py | 3 --- homeassistant/components/mqtt/light/__init__.py | 3 --- homeassistant/components/mqtt/lock.py | 3 --- homeassistant/components/mqtt/scene.py | 3 --- homeassistant/components/mqtt/sensor.py | 3 --- homeassistant/components/mqtt/subscription.py | 3 --- homeassistant/components/mqtt/switch.py | 3 --- homeassistant/components/mqtt/vacuum/__init__.py | 3 --- homeassistant/components/mqtt/vacuum/schema_legacy.py | 3 --- homeassistant/components/mqtt/vacuum/schema_state.py | 3 --- homeassistant/components/neato/api.py | 3 --- homeassistant/components/neato/config_flow.py | 2 -- homeassistant/components/nest/device_trigger.py | 3 --- homeassistant/components/nws/weather.py | 3 --- homeassistant/components/ondilo_ico/config_flow.py | 2 -- homeassistant/components/ozw/fan.py | 3 --- homeassistant/components/plaato/sensor.py | 4 ---- homeassistant/components/proxmoxve/binary_sensor.py | 4 ---- homeassistant/components/rachio/webhooks.py | 6 ------ .../components/totalconnect/alarm_control_panel.py | 2 -- homeassistant/components/totalconnect/binary_sensor.py | 4 ---- homeassistant/components/tuya/climate.py | 3 --- homeassistant/components/zha/binary_sensor.py | 3 --- homeassistant/components/zwave_js/api.py | 3 --- homeassistant/components/zwave_js/climate.py | 3 --- homeassistant/components/zwave_js/fan.py | 3 --- tests/components/feedreader/test_init.py | 3 --- tests/components/harmony/conftest.py | 3 --- tests/components/harmony/test_activity_changes.py | 5 ----- tests/components/hyperion/__init__.py | 3 --- tests/components/hyperion/test_config_flow.py | 4 ---- tests/components/hyperion/test_light.py | 3 --- tests/components/hyperion/test_switch.py | 2 -- tests/components/litejet/test_init.py | 3 --- tests/components/litejet/test_scene.py | 3 --- tests/scripts/test_check_config.py | 3 --- 65 files changed, 223 deletions(-) diff --git a/homeassistant/components/agent_dvr/config_flow.py b/homeassistant/components/agent_dvr/config_flow.py index 9448b8d3123..15ef58ced7e 100644 --- a/homeassistant/components/agent_dvr/config_flow.py +++ b/homeassistant/components/agent_dvr/config_flow.py @@ -1,6 +1,4 @@ """Config flow to configure Agent devices.""" -import logging - from agent import AgentConnectionError, AgentError from agent.a import Agent import voluptuous as vol @@ -13,7 +11,6 @@ from .const import DOMAIN, SERVER_URL # pylint:disable=unused-import from .helpers import generate_url DEFAULT_PORT = 8090 -_LOGGER = logging.getLogger(__name__) class AgentFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/airvisual/sensor.py b/homeassistant/components/airvisual/sensor.py index 680059af411..3c1aef128ab 100644 --- a/homeassistant/components/airvisual/sensor.py +++ b/homeassistant/components/airvisual/sensor.py @@ -1,6 +1,4 @@ """Support for AirVisual air quality sensors.""" -from logging import getLogger - from homeassistant.const import ( ATTR_LATITUDE, ATTR_LONGITUDE, @@ -31,8 +29,6 @@ from .const import ( INTEGRATION_TYPE_GEOGRAPHY_NAME, ) -_LOGGER = getLogger(__name__) - ATTR_CITY = "city" ATTR_COUNTRY = "country" ATTR_POLLUTANT_SYMBOL = "pollutant_symbol" diff --git a/homeassistant/components/asuswrt/__init__.py b/homeassistant/components/asuswrt/__init__.py index d2eb47fa2d2..28e8fe76684 100644 --- a/homeassistant/components/asuswrt/__init__.py +++ b/homeassistant/components/asuswrt/__init__.py @@ -1,6 +1,5 @@ """Support for ASUSWRT devices.""" import asyncio -import logging import voluptuous as vol @@ -41,8 +40,6 @@ PLATFORMS = ["device_tracker", "sensor"] CONF_PUB_KEY = "pub_key" SECRET_GROUP = "Password or SSH Key" -_LOGGER = logging.getLogger(__name__) - CONFIG_SCHEMA = vol.Schema( vol.All( cv.deprecated(DOMAIN), diff --git a/homeassistant/components/asuswrt/device_tracker.py b/homeassistant/components/asuswrt/device_tracker.py index 85553674dba..385b25755b0 100644 --- a/homeassistant/components/asuswrt/device_tracker.py +++ b/homeassistant/components/asuswrt/device_tracker.py @@ -1,5 +1,4 @@ """Support for ASUSWRT routers.""" -import logging from typing import Dict from homeassistant.components.device_tracker import SOURCE_TYPE_ROUTER @@ -15,8 +14,6 @@ from .router import AsusWrtRouter DEFAULT_DEVICE_NAME = "Unknown device" -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry( hass: HomeAssistantType, entry: ConfigEntry, async_add_entities diff --git a/homeassistant/components/aurora/binary_sensor.py b/homeassistant/components/aurora/binary_sensor.py index 3ea1faa7949..a6d5a1817b2 100644 --- a/homeassistant/components/aurora/binary_sensor.py +++ b/homeassistant/components/aurora/binary_sensor.py @@ -1,13 +1,9 @@ """Support for Aurora Forecast binary sensor.""" -import logging - from homeassistant.components.binary_sensor import BinarySensorEntity from . import AuroraEntity from .const import COORDINATOR, DOMAIN -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry(hass, entry, async_add_entries): """Set up the binary_sensor platform.""" diff --git a/homeassistant/components/aurora/sensor.py b/homeassistant/components/aurora/sensor.py index 51ccb3dc4dd..731c6d08afd 100644 --- a/homeassistant/components/aurora/sensor.py +++ b/homeassistant/components/aurora/sensor.py @@ -1,13 +1,9 @@ """Support for Aurora Forecast sensor.""" -import logging - from homeassistant.const import PERCENTAGE from . import AuroraEntity from .const import COORDINATOR, DOMAIN -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry(hass, entry, async_add_entries): """Set up the sensor platform.""" diff --git a/homeassistant/components/blueprint/websocket_api.py b/homeassistant/components/blueprint/websocket_api.py index 6968d4530cd..05ae2816696 100644 --- a/homeassistant/components/blueprint/websocket_api.py +++ b/homeassistant/components/blueprint/websocket_api.py @@ -1,5 +1,4 @@ """Websocket API for blueprint.""" -import logging from typing import Dict, Optional import async_timeout @@ -15,8 +14,6 @@ from . import importer, models from .const import DOMAIN from .errors import FileAlreadyExists -_LOGGER = logging.getLogger(__package__) - @callback def async_setup(hass: HomeAssistant): diff --git a/homeassistant/components/bmw_connected_drive/config_flow.py b/homeassistant/components/bmw_connected_drive/config_flow.py index 8315a1322e2..fbfa20aff1a 100644 --- a/homeassistant/components/bmw_connected_drive/config_flow.py +++ b/homeassistant/components/bmw_connected_drive/config_flow.py @@ -1,6 +1,4 @@ """Config flow for BMW ConnectedDrive integration.""" -import logging - from bimmer_connected.account import ConnectedDriveAccount from bimmer_connected.country_selector import get_region_from_name import voluptuous as vol @@ -12,9 +10,6 @@ from homeassistant.core import callback from . import DOMAIN # pylint: disable=unused-import from .const import CONF_ALLOWED_REGIONS, CONF_READ_ONLY, CONF_USE_LOCATION -_LOGGER = logging.getLogger(__name__) - - DATA_SCHEMA = vol.Schema( { vol.Required(CONF_USERNAME): str, diff --git a/homeassistant/components/dyson/air_quality.py b/homeassistant/components/dyson/air_quality.py index d23b2b1ef88..3bf4f2bb34c 100644 --- a/homeassistant/components/dyson/air_quality.py +++ b/homeassistant/components/dyson/air_quality.py @@ -1,6 +1,4 @@ """Support for Dyson Pure Cool Air Quality Sensors.""" -import logging - from libpurecool.dyson_pure_cool import DysonPureCool from libpurecool.dyson_pure_state_v2 import DysonEnvironmentalSensorV2State @@ -10,8 +8,6 @@ from . import DYSON_DEVICES, DysonEntity ATTRIBUTION = "Dyson purifier air quality sensor" -_LOGGER = logging.getLogger(__name__) - DYSON_AIQ_DEVICES = "dyson_aiq_devices" ATTR_VOC = "volatile_organic_compounds" diff --git a/homeassistant/components/dyson/sensor.py b/homeassistant/components/dyson/sensor.py index f1198188b5c..80a64e787f0 100644 --- a/homeassistant/components/dyson/sensor.py +++ b/homeassistant/components/dyson/sensor.py @@ -1,6 +1,4 @@ """Support for Dyson Pure Cool Link Sensors.""" -import logging - from libpurecool.dyson_pure_cool import DysonPureCool from libpurecool.dyson_pure_cool_link import DysonPureCoolLink @@ -58,8 +56,6 @@ SENSOR_NAMES = { DYSON_SENSOR_DEVICES = "dyson_sensor_devices" -_LOGGER = logging.getLogger(__name__) - def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the Dyson Sensors.""" diff --git a/homeassistant/components/econet/binary_sensor.py b/homeassistant/components/econet/binary_sensor.py index ec8131c5105..b87e6bb0cd0 100644 --- a/homeassistant/components/econet/binary_sensor.py +++ b/homeassistant/components/econet/binary_sensor.py @@ -1,6 +1,4 @@ """Support for Rheem EcoNet water heaters.""" -import logging - from pyeconet.equipment import EquipmentType from homeassistant.components.binary_sensor import ( @@ -12,8 +10,6 @@ from homeassistant.components.binary_sensor import ( from . import EcoNetEntity from .const import DOMAIN, EQUIPMENT -_LOGGER = logging.getLogger(__name__) - SENSOR_NAME_RUNNING = "running" SENSOR_NAME_SHUTOFF_VALVE = "shutoff_valve" SENSOR_NAME_VACATION = "vacation" diff --git a/homeassistant/components/econet/sensor.py b/homeassistant/components/econet/sensor.py index 6ae14d18aa1..e0ef7dc6ce9 100644 --- a/homeassistant/components/econet/sensor.py +++ b/homeassistant/components/econet/sensor.py @@ -1,6 +1,4 @@ """Support for Rheem EcoNet water heaters.""" -import logging - from pyeconet.equipment import EquipmentType from homeassistant.const import ( @@ -25,9 +23,6 @@ WIFI_SIGNAL = "wifi_signal" RUNNING_STATE = "running_state" -_LOGGER = logging.getLogger(__name__) - - async def async_setup_entry(hass, entry, async_add_entities): """Set up EcoNet sensor based on a config entry.""" equipment = hass.data[DOMAIN][EQUIPMENT][entry.entry_id] diff --git a/homeassistant/components/fireservicerota/binary_sensor.py b/homeassistant/components/fireservicerota/binary_sensor.py index fc06e605cbd..3f04adc2f72 100644 --- a/homeassistant/components/fireservicerota/binary_sensor.py +++ b/homeassistant/components/fireservicerota/binary_sensor.py @@ -1,6 +1,4 @@ """Binary Sensor platform for FireServiceRota integration.""" -import logging - from homeassistant.components.binary_sensor import BinarySensorEntity from homeassistant.config_entries import ConfigEntry from homeassistant.helpers.typing import HomeAssistantType @@ -11,8 +9,6 @@ from homeassistant.helpers.update_coordinator import ( from .const import DATA_CLIENT, DATA_COORDINATOR, DOMAIN as FIRESERVICEROTA_DOMAIN -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry( hass: HomeAssistantType, entry: ConfigEntry, async_add_entities diff --git a/homeassistant/components/gree/switch.py b/homeassistant/components/gree/switch.py index f4e9792a589..fa1f1550e83 100644 --- a/homeassistant/components/gree/switch.py +++ b/homeassistant/components/gree/switch.py @@ -1,5 +1,4 @@ """Support for interface with a Gree climate systems.""" -import logging from typing import Optional from homeassistant.components.switch import DEVICE_CLASS_SWITCH, SwitchEntity @@ -8,8 +7,6 @@ from homeassistant.helpers.update_coordinator import CoordinatorEntity from .const import COORDINATOR, DOMAIN -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry(hass, config_entry, async_add_entities): """Set up the Gree HVAC device from a config entry.""" diff --git a/homeassistant/components/hangouts/const.py b/homeassistant/components/hangouts/const.py index 0508bf48703..3a78e9bbe80 100644 --- a/homeassistant/components/hangouts/const.py +++ b/homeassistant/components/hangouts/const.py @@ -1,14 +1,9 @@ """Constants for Google Hangouts Component.""" -import logging - import voluptuous as vol from homeassistant.components.notify import ATTR_DATA, ATTR_MESSAGE, ATTR_TARGET import homeassistant.helpers.config_validation as cv -_LOGGER = logging.getLogger(".") - - DOMAIN = "hangouts" CONF_2FA = "2fa" diff --git a/homeassistant/components/homekit/config_flow.py b/homeassistant/components/homekit/config_flow.py index f16d14e9330..d6278c0ca94 100644 --- a/homeassistant/components/homekit/config_flow.py +++ b/homeassistant/components/homekit/config_flow.py @@ -1,5 +1,4 @@ """Config flow for HomeKit integration.""" -import logging import random import string @@ -101,8 +100,6 @@ _EMPTY_ENTITY_FILTER = { CONF_EXCLUDE_ENTITIES: [], } -_LOGGER = logging.getLogger(__name__) - class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): """Handle a config flow for HomeKit.""" diff --git a/homeassistant/components/homematicip_cloud/__init__.py b/homeassistant/components/homematicip_cloud/__init__.py index 7ea6a4fe0b4..ca1af8266c6 100644 --- a/homeassistant/components/homematicip_cloud/__init__.py +++ b/homeassistant/components/homematicip_cloud/__init__.py @@ -1,6 +1,4 @@ """Support for HomematicIP Cloud devices.""" -import logging - import voluptuous as vol from homeassistant import config_entries @@ -23,8 +21,6 @@ from .generic_entity import HomematicipGenericEntity # noqa: F401 from .hap import HomematicipAuth, HomematicipHAP # noqa: F401 from .services import async_setup_services, async_unload_services -_LOGGER = logging.getLogger(__name__) - CONFIG_SCHEMA = vol.Schema( { vol.Optional(DOMAIN, default=[]): vol.All( diff --git a/homeassistant/components/ipma/const.py b/homeassistant/components/ipma/const.py index 04064db2b88..47434d7f76b 100644 --- a/homeassistant/components/ipma/const.py +++ b/homeassistant/components/ipma/const.py @@ -1,6 +1,4 @@ """Constants for IPMA component.""" -import logging - from homeassistant.components.weather import DOMAIN as WEATHER_DOMAIN DOMAIN = "ipma" @@ -8,5 +6,3 @@ DOMAIN = "ipma" HOME_LOCATION_NAME = "Home" ENTITY_ID_SENSOR_FORMAT_HOME = f"{WEATHER_DOMAIN}.ipma_{HOME_LOCATION_NAME}" - -_LOGGER = logging.getLogger(".") diff --git a/homeassistant/components/izone/discovery.py b/homeassistant/components/izone/discovery.py index 7690600786e..2a4ad516af1 100644 --- a/homeassistant/components/izone/discovery.py +++ b/homeassistant/components/izone/discovery.py @@ -1,7 +1,4 @@ """Internal discovery service for iZone AC.""" - -import logging - import pizone from homeassistant.const import EVENT_HOMEASSISTANT_STOP @@ -18,8 +15,6 @@ from .const import ( DISPATCH_ZONE_UPDATE, ) -_LOGGER = logging.getLogger(__name__) - class DiscoveryService(pizone.Listener): """Discovery data and interfacing with pizone library.""" diff --git a/homeassistant/components/lutron_caseta/device_trigger.py b/homeassistant/components/lutron_caseta/device_trigger.py index 80d147191e6..86ee5e46b51 100644 --- a/homeassistant/components/lutron_caseta/device_trigger.py +++ b/homeassistant/components/lutron_caseta/device_trigger.py @@ -1,5 +1,4 @@ """Provides device triggers for lutron caseta.""" -import logging from typing import List import voluptuous as vol @@ -32,9 +31,6 @@ from .const import ( LUTRON_CASETA_BUTTON_EVENT, ) -_LOGGER = logging.getLogger(__name__) - - SUPPORTED_INPUTS_EVENTS_TYPES = [ACTION_PRESS, ACTION_RELEASE] LUTRON_BUTTON_TRIGGER_SCHEMA = TRIGGER_BASE_SCHEMA.extend( diff --git a/homeassistant/components/met/const.py b/homeassistant/components/met/const.py index 8c507eb0b8d..b78c412393d 100644 --- a/homeassistant/components/met/const.py +++ b/homeassistant/components/met/const.py @@ -1,6 +1,4 @@ """Constants for Met component.""" -import logging - from homeassistant.components.weather import ( ATTR_CONDITION_CLEAR_NIGHT, ATTR_CONDITION_CLOUDY, @@ -191,5 +189,3 @@ ATTR_MAP = { ATTR_WEATHER_WIND_BEARING: "wind_bearing", ATTR_WEATHER_WIND_SPEED: "wind_speed", } - -_LOGGER = logging.getLogger(".") diff --git a/homeassistant/components/modbus/__init__.py b/homeassistant/components/modbus/__init__.py index fe6811a35d9..428ddfadb14 100644 --- a/homeassistant/components/modbus/__init__.py +++ b/homeassistant/components/modbus/__init__.py @@ -1,6 +1,4 @@ """Support for Modbus.""" -import logging - import voluptuous as vol from homeassistant.components.cover import ( @@ -69,8 +67,6 @@ from .const import ( ) from .modbus import modbus_setup -_LOGGER = logging.getLogger(__name__) - BASE_SCHEMA = vol.Schema({vol.Optional(CONF_NAME, default=DEFAULT_HUB): cv.string}) CLIMATE_SCHEMA = vol.Schema( diff --git a/homeassistant/components/motion_blinds/config_flow.py b/homeassistant/components/motion_blinds/config_flow.py index cb85b45e0e0..d2bf216e26a 100644 --- a/homeassistant/components/motion_blinds/config_flow.py +++ b/homeassistant/components/motion_blinds/config_flow.py @@ -1,6 +1,4 @@ """Config flow to configure Motion Blinds using their WLAN API.""" -import logging - from motionblinds import MotionDiscovery import voluptuous as vol @@ -11,9 +9,6 @@ from homeassistant.const import CONF_API_KEY, CONF_HOST from .const import DEFAULT_GATEWAY_NAME, DOMAIN from .gateway import ConnectMotionGateway -_LOGGER = logging.getLogger(__name__) - - CONFIG_SCHEMA = vol.Schema( { vol.Optional(CONF_HOST): str, diff --git a/homeassistant/components/motion_blinds/sensor.py b/homeassistant/components/motion_blinds/sensor.py index dd637696e77..f8a673b3079 100644 --- a/homeassistant/components/motion_blinds/sensor.py +++ b/homeassistant/components/motion_blinds/sensor.py @@ -1,6 +1,4 @@ """Support for Motion Blinds sensors.""" -import logging - from motionblinds import BlindType from homeassistant.const import ( @@ -14,8 +12,6 @@ from homeassistant.helpers.update_coordinator import CoordinatorEntity from .const import DOMAIN, KEY_COORDINATOR, KEY_GATEWAY -_LOGGER = logging.getLogger(__name__) - ATTR_BATTERY_VOLTAGE = "battery_voltage" TYPE_BLIND = "blind" TYPE_GATEWAY = "gateway" diff --git a/homeassistant/components/mqtt/camera.py b/homeassistant/components/mqtt/camera.py index 684e41214fe..cc58741a923 100644 --- a/homeassistant/components/mqtt/camera.py +++ b/homeassistant/components/mqtt/camera.py @@ -1,6 +1,5 @@ """Camera that loads a picture from an MQTT topic.""" import functools -import logging import voluptuous as vol @@ -23,8 +22,6 @@ from .mixins import ( async_setup_entry_helper, ) -_LOGGER = logging.getLogger(__name__) - CONF_TOPIC = "topic" DEFAULT_NAME = "MQTT Camera" diff --git a/homeassistant/components/mqtt/config_flow.py b/homeassistant/components/mqtt/config_flow.py index c71541b58b0..e19aaecc3db 100644 --- a/homeassistant/components/mqtt/config_flow.py +++ b/homeassistant/components/mqtt/config_flow.py @@ -1,6 +1,5 @@ """Config flow for MQTT.""" from collections import OrderedDict -import logging import queue import voluptuous as vol @@ -31,8 +30,6 @@ from .const import ( ) from .util import MQTT_WILL_BIRTH_SCHEMA -_LOGGER = logging.getLogger(__name__) - @config_entries.HANDLERS.register("mqtt") class FlowHandler(config_entries.ConfigFlow): diff --git a/homeassistant/components/mqtt/debug_info.py b/homeassistant/components/mqtt/debug_info.py index a3c56652253..52aeb20e3aa 100644 --- a/homeassistant/components/mqtt/debug_info.py +++ b/homeassistant/components/mqtt/debug_info.py @@ -1,7 +1,6 @@ """Helper to handle a set of topics to subscribe to.""" from collections import deque from functools import wraps -import logging from typing import Any from homeassistant.helpers.typing import HomeAssistantType @@ -9,8 +8,6 @@ from homeassistant.helpers.typing import HomeAssistantType from .const import ATTR_DISCOVERY_PAYLOAD, ATTR_DISCOVERY_TOPIC from .models import MessageCallbackType -_LOGGER = logging.getLogger(__name__) - DATA_MQTT_DEBUG_INFO = "mqtt_debug_info" STORED_MESSAGES = 10 diff --git a/homeassistant/components/mqtt/device_automation.py b/homeassistant/components/mqtt/device_automation.py index d3e1f33421d..50d6a6e4d19 100644 --- a/homeassistant/components/mqtt/device_automation.py +++ b/homeassistant/components/mqtt/device_automation.py @@ -1,6 +1,5 @@ """Provides device automations for MQTT.""" import functools -import logging import voluptuous as vol @@ -10,8 +9,6 @@ from . import device_trigger from .. import mqtt from .mixins import async_setup_entry_helper -_LOGGER = logging.getLogger(__name__) - AUTOMATION_TYPE_TRIGGER = "trigger" AUTOMATION_TYPES = [AUTOMATION_TYPE_TRIGGER] AUTOMATION_TYPES_SCHEMA = vol.In(AUTOMATION_TYPES) diff --git a/homeassistant/components/mqtt/device_tracker/schema_discovery.py b/homeassistant/components/mqtt/device_tracker/schema_discovery.py index 296f66889b3..bd5d9a1e60e 100644 --- a/homeassistant/components/mqtt/device_tracker/schema_discovery.py +++ b/homeassistant/components/mqtt/device_tracker/schema_discovery.py @@ -1,6 +1,5 @@ """Support for tracking MQTT enabled devices identified through discovery.""" import functools -import logging import voluptuous as vol @@ -34,8 +33,6 @@ from ..mixins import ( async_setup_entry_helper, ) -_LOGGER = logging.getLogger(__name__) - CONF_PAYLOAD_HOME = "payload_home" CONF_PAYLOAD_NOT_HOME = "payload_not_home" CONF_SOURCE_TYPE = "source_type" diff --git a/homeassistant/components/mqtt/fan.py b/homeassistant/components/mqtt/fan.py index ef3ecffc0e0..24d652062ae 100644 --- a/homeassistant/components/mqtt/fan.py +++ b/homeassistant/components/mqtt/fan.py @@ -1,6 +1,5 @@ """Support for MQTT fans.""" import functools -import logging import voluptuous as vol @@ -48,8 +47,6 @@ from .mixins import ( async_setup_entry_helper, ) -_LOGGER = logging.getLogger(__name__) - CONF_STATE_VALUE_TEMPLATE = "state_value_template" CONF_SPEED_STATE_TOPIC = "speed_state_topic" CONF_SPEED_COMMAND_TOPIC = "speed_command_topic" diff --git a/homeassistant/components/mqtt/light/__init__.py b/homeassistant/components/mqtt/light/__init__.py index 72c438df812..412302273ac 100644 --- a/homeassistant/components/mqtt/light/__init__.py +++ b/homeassistant/components/mqtt/light/__init__.py @@ -1,6 +1,5 @@ """Support for MQTT lights.""" import functools -import logging import voluptuous as vol @@ -15,8 +14,6 @@ from .schema_basic import PLATFORM_SCHEMA_BASIC, async_setup_entity_basic from .schema_json import PLATFORM_SCHEMA_JSON, async_setup_entity_json from .schema_template import PLATFORM_SCHEMA_TEMPLATE, async_setup_entity_template -_LOGGER = logging.getLogger(__name__) - def validate_mqtt_light(value): """Validate MQTT light schema.""" diff --git a/homeassistant/components/mqtt/lock.py b/homeassistant/components/mqtt/lock.py index 408bc07b9d9..e66b93f51c0 100644 --- a/homeassistant/components/mqtt/lock.py +++ b/homeassistant/components/mqtt/lock.py @@ -1,6 +1,5 @@ """Support for MQTT locks.""" import functools -import logging import voluptuous as vol @@ -37,8 +36,6 @@ from .mixins import ( async_setup_entry_helper, ) -_LOGGER = logging.getLogger(__name__) - CONF_PAYLOAD_LOCK = "payload_lock" CONF_PAYLOAD_UNLOCK = "payload_unlock" diff --git a/homeassistant/components/mqtt/scene.py b/homeassistant/components/mqtt/scene.py index 061c7df3fdc..c6d9140af61 100644 --- a/homeassistant/components/mqtt/scene.py +++ b/homeassistant/components/mqtt/scene.py @@ -1,6 +1,5 @@ """Support for MQTT scenes.""" import functools -import logging import voluptuous as vol @@ -20,8 +19,6 @@ from .mixins import ( async_setup_entry_helper, ) -_LOGGER = logging.getLogger(__name__) - DEFAULT_NAME = "MQTT Scene" DEFAULT_RETAIN = False diff --git a/homeassistant/components/mqtt/sensor.py b/homeassistant/components/mqtt/sensor.py index 78a05179210..d017cb2ce85 100644 --- a/homeassistant/components/mqtt/sensor.py +++ b/homeassistant/components/mqtt/sensor.py @@ -1,7 +1,6 @@ """Support for MQTT sensors.""" from datetime import timedelta import functools -import logging from typing import Optional import voluptuous as vol @@ -38,8 +37,6 @@ from .mixins import ( async_setup_entry_helper, ) -_LOGGER = logging.getLogger(__name__) - CONF_EXPIRE_AFTER = "expire_after" DEFAULT_NAME = "MQTT Sensor" diff --git a/homeassistant/components/mqtt/subscription.py b/homeassistant/components/mqtt/subscription.py index c61c30c922e..5c2efabc266 100644 --- a/homeassistant/components/mqtt/subscription.py +++ b/homeassistant/components/mqtt/subscription.py @@ -1,5 +1,4 @@ """Helper to handle a set of topics to subscribe to.""" -import logging from typing import Any, Callable, Dict, Optional import attr @@ -12,8 +11,6 @@ from .. import mqtt from .const import DEFAULT_QOS from .models import MessageCallbackType -_LOGGER = logging.getLogger(__name__) - @attr.s(slots=True) class EntitySubscription: diff --git a/homeassistant/components/mqtt/switch.py b/homeassistant/components/mqtt/switch.py index 73c7d55f6b0..939d6bb98b1 100644 --- a/homeassistant/components/mqtt/switch.py +++ b/homeassistant/components/mqtt/switch.py @@ -1,6 +1,5 @@ """Support for MQTT switches.""" import functools -import logging import voluptuous as vol @@ -42,8 +41,6 @@ from .mixins import ( async_setup_entry_helper, ) -_LOGGER = logging.getLogger(__name__) - DEFAULT_NAME = "MQTT Switch" DEFAULT_PAYLOAD_ON = "ON" DEFAULT_PAYLOAD_OFF = "OFF" diff --git a/homeassistant/components/mqtt/vacuum/__init__.py b/homeassistant/components/mqtt/vacuum/__init__.py index 4801c1ea994..85fd1247381 100644 --- a/homeassistant/components/mqtt/vacuum/__init__.py +++ b/homeassistant/components/mqtt/vacuum/__init__.py @@ -1,6 +1,5 @@ """Support for MQTT vacuums.""" import functools -import logging import voluptuous as vol @@ -13,8 +12,6 @@ from .schema import CONF_SCHEMA, LEGACY, MQTT_VACUUM_SCHEMA, STATE from .schema_legacy import PLATFORM_SCHEMA_LEGACY, async_setup_entity_legacy from .schema_state import PLATFORM_SCHEMA_STATE, async_setup_entity_state -_LOGGER = logging.getLogger(__name__) - def validate_mqtt_vacuum(value): """Validate MQTT vacuum schema.""" diff --git a/homeassistant/components/mqtt/vacuum/schema_legacy.py b/homeassistant/components/mqtt/vacuum/schema_legacy.py index 577e6a70ccd..ca91b8948d4 100644 --- a/homeassistant/components/mqtt/vacuum/schema_legacy.py +++ b/homeassistant/components/mqtt/vacuum/schema_legacy.py @@ -1,6 +1,5 @@ """Support for Legacy MQTT vacuum.""" import json -import logging import voluptuous as vol @@ -39,8 +38,6 @@ from ..mixins import ( ) from .schema import MQTT_VACUUM_SCHEMA, services_to_strings, strings_to_services -_LOGGER = logging.getLogger(__name__) - SERVICE_TO_STRING = { SUPPORT_TURN_ON: "turn_on", SUPPORT_TURN_OFF: "turn_off", diff --git a/homeassistant/components/mqtt/vacuum/schema_state.py b/homeassistant/components/mqtt/vacuum/schema_state.py index c754ba1604a..3e43736ab2e 100644 --- a/homeassistant/components/mqtt/vacuum/schema_state.py +++ b/homeassistant/components/mqtt/vacuum/schema_state.py @@ -1,6 +1,5 @@ """Support for a State MQTT vacuum.""" import json -import logging import voluptuous as vol @@ -43,8 +42,6 @@ from ..mixins import ( ) from .schema import MQTT_VACUUM_SCHEMA, services_to_strings, strings_to_services -_LOGGER = logging.getLogger(__name__) - SERVICE_TO_STRING = { SUPPORT_START: "start", SUPPORT_PAUSE: "pause", diff --git a/homeassistant/components/neato/api.py b/homeassistant/components/neato/api.py index 931d7cdb712..31988fc175e 100644 --- a/homeassistant/components/neato/api.py +++ b/homeassistant/components/neato/api.py @@ -1,14 +1,11 @@ """API for Neato Botvac bound to Home Assistant OAuth.""" from asyncio import run_coroutine_threadsafe -import logging import pybotvac from homeassistant import config_entries, core from homeassistant.helpers import config_entry_oauth2_flow -_LOGGER = logging.getLogger(__name__) - class ConfigEntryAuth(pybotvac.OAuthSession): """Provide Neato Botvac authentication tied to an OAuth2 based config entry.""" diff --git a/homeassistant/components/neato/config_flow.py b/homeassistant/components/neato/config_flow.py index 449de72b158..1f2f575ae50 100644 --- a/homeassistant/components/neato/config_flow.py +++ b/homeassistant/components/neato/config_flow.py @@ -11,8 +11,6 @@ from homeassistant.helpers import config_entry_oauth2_flow # pylint: disable=unused-import from .const import NEATO_DOMAIN -_LOGGER = logging.getLogger(__name__) - class OAuth2FlowHandler( config_entry_oauth2_flow.AbstractOAuth2FlowHandler, domain=NEATO_DOMAIN diff --git a/homeassistant/components/nest/device_trigger.py b/homeassistant/components/nest/device_trigger.py index e5bd7ea1ca8..ee16ca1166f 100644 --- a/homeassistant/components/nest/device_trigger.py +++ b/homeassistant/components/nest/device_trigger.py @@ -1,5 +1,4 @@ """Provides device automations for Nest.""" -import logging from typing import List import voluptuous as vol @@ -17,8 +16,6 @@ from homeassistant.helpers.typing import ConfigType from .const import DATA_SUBSCRIBER, DOMAIN from .events import DEVICE_TRAIT_TRIGGER_MAP, NEST_EVENT -_LOGGER = logging.getLogger(__name__) - DEVICE = "device" TRIGGER_TYPES = set(DEVICE_TRAIT_TRIGGER_MAP.values()) diff --git a/homeassistant/components/nws/weather.py b/homeassistant/components/nws/weather.py index 34c2909188f..9f4e69bdb8c 100644 --- a/homeassistant/components/nws/weather.py +++ b/homeassistant/components/nws/weather.py @@ -1,6 +1,5 @@ """Support for NWS weather service.""" from datetime import timedelta -import logging from homeassistant.components.weather import ( ATTR_CONDITION_CLEAR_NIGHT, @@ -47,8 +46,6 @@ from .const import ( NWS_DATA, ) -_LOGGER = logging.getLogger(__name__) - PARALLEL_UPDATES = 0 OBSERVATION_VALID_TIME = timedelta(minutes=20) diff --git a/homeassistant/components/ondilo_ico/config_flow.py b/homeassistant/components/ondilo_ico/config_flow.py index c6a164e913b..74c668a3d2c 100644 --- a/homeassistant/components/ondilo_ico/config_flow.py +++ b/homeassistant/components/ondilo_ico/config_flow.py @@ -7,8 +7,6 @@ from homeassistant.helpers import config_entry_oauth2_flow from .const import DOMAIN from .oauth_impl import OndiloOauth2Implementation -_LOGGER = logging.getLogger(__name__) - class OAuth2FlowHandler( config_entry_oauth2_flow.AbstractOAuth2FlowHandler, domain=DOMAIN diff --git a/homeassistant/components/ozw/fan.py b/homeassistant/components/ozw/fan.py index b4054207d0f..be0bd372b65 100644 --- a/homeassistant/components/ozw/fan.py +++ b/homeassistant/components/ozw/fan.py @@ -1,5 +1,4 @@ """Support for Z-Wave fans.""" -import logging import math from homeassistant.components.fan import ( @@ -17,8 +16,6 @@ from homeassistant.util.percentage import ( from .const import DATA_UNSUBSCRIBE, DOMAIN from .entity import ZWaveDeviceEntity -_LOGGER = logging.getLogger(__name__) - SUPPORTED_FEATURES = SUPPORT_SET_SPEED SPEED_RANGE = (1, 99) # off is not included diff --git a/homeassistant/components/plaato/sensor.py b/homeassistant/components/plaato/sensor.py index 1dd347305e1..ae767add18b 100644 --- a/homeassistant/components/plaato/sensor.py +++ b/homeassistant/components/plaato/sensor.py @@ -1,6 +1,4 @@ """Support for Plaato Airlock sensors.""" - -import logging from typing import Optional from pyplaato.models.device import PlaatoDevice @@ -25,8 +23,6 @@ from .const import ( ) from .entity import PlaatoEntity -_LOGGER = logging.getLogger(__name__) - async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """Set up the Plaato sensor.""" diff --git a/homeassistant/components/proxmoxve/binary_sensor.py b/homeassistant/components/proxmoxve/binary_sensor.py index 014766b532e..1151c2ec332 100644 --- a/homeassistant/components/proxmoxve/binary_sensor.py +++ b/homeassistant/components/proxmoxve/binary_sensor.py @@ -1,13 +1,9 @@ """Binary sensor to read Proxmox VE data.""" -import logging - from homeassistant.const import STATE_OFF, STATE_ON from homeassistant.helpers.update_coordinator import DataUpdateCoordinator from . import COORDINATOR, DOMAIN, ProxmoxEntity -_LOGGER = logging.getLogger(__name__) - async def async_setup_platform(hass, config, add_entities, discovery_info=None): """Set up binary sensors.""" diff --git a/homeassistant/components/rachio/webhooks.py b/homeassistant/components/rachio/webhooks.py index c175117efcb..94c79a1504f 100644 --- a/homeassistant/components/rachio/webhooks.py +++ b/homeassistant/components/rachio/webhooks.py @@ -1,7 +1,4 @@ """Webhooks used by rachio.""" - -import logging - from aiohttp import web from homeassistant.const import URL_API @@ -80,9 +77,6 @@ SIGNAL_MAP = { } -_LOGGER = logging.getLogger(__name__) - - @callback def async_register_webhook(hass, webhook_id, entry_id): """Register a webhook.""" diff --git a/homeassistant/components/totalconnect/alarm_control_panel.py b/homeassistant/components/totalconnect/alarm_control_panel.py index d7c17a1ccff..affff382365 100644 --- a/homeassistant/components/totalconnect/alarm_control_panel.py +++ b/homeassistant/components/totalconnect/alarm_control_panel.py @@ -21,8 +21,6 @@ from homeassistant.exceptions import HomeAssistantError from .const import DOMAIN -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry(hass, entry, async_add_entities) -> None: """Set up TotalConnect alarm panels based on a config entry.""" diff --git a/homeassistant/components/totalconnect/binary_sensor.py b/homeassistant/components/totalconnect/binary_sensor.py index e296b12fa59..6bee603d1b1 100644 --- a/homeassistant/components/totalconnect/binary_sensor.py +++ b/homeassistant/components/totalconnect/binary_sensor.py @@ -1,6 +1,4 @@ """Interfaces with TotalConnect sensors.""" -import logging - from homeassistant.components.binary_sensor import ( DEVICE_CLASS_DOOR, DEVICE_CLASS_GAS, @@ -10,8 +8,6 @@ from homeassistant.components.binary_sensor import ( from .const import DOMAIN -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry(hass, entry, async_add_entities) -> None: """Set up TotalConnect device sensors based on a config entry.""" diff --git a/homeassistant/components/tuya/climate.py b/homeassistant/components/tuya/climate.py index da851d4a776..0502273818c 100644 --- a/homeassistant/components/tuya/climate.py +++ b/homeassistant/components/tuya/climate.py @@ -1,6 +1,5 @@ """Support for the Tuya climate devices.""" from datetime import timedelta -import logging from homeassistant.components.climate import ( DOMAIN as SENSOR_DOMAIN, @@ -56,8 +55,6 @@ TUYA_STATE_TO_HA = {value: key for key, value in HA_STATE_TO_TUYA.items()} FAN_MODES = {FAN_LOW, FAN_MEDIUM, FAN_HIGH} -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry(hass, config_entry, async_add_entities): """Set up tuya sensors dynamically through tuya discovery.""" diff --git a/homeassistant/components/zha/binary_sensor.py b/homeassistant/components/zha/binary_sensor.py index 48f35e035f0..a0d8abc1233 100644 --- a/homeassistant/components/zha/binary_sensor.py +++ b/homeassistant/components/zha/binary_sensor.py @@ -1,6 +1,5 @@ """Binary sensors on Zigbee Home Automation networks.""" import functools -import logging from homeassistant.components.binary_sensor import ( DEVICE_CLASS_GAS, @@ -32,8 +31,6 @@ from .core.const import ( from .core.registries import ZHA_ENTITIES from .entity import ZhaEntity -_LOGGER = logging.getLogger(__name__) - # Zigbee Cluster Library Zone Type to Home Assistant device class CLASS_MAPPING = { 0x000D: DEVICE_CLASS_MOTION, diff --git a/homeassistant/components/zwave_js/api.py b/homeassistant/components/zwave_js/api.py index 03a917217a9..91c316d307e 100644 --- a/homeassistant/components/zwave_js/api.py +++ b/homeassistant/components/zwave_js/api.py @@ -1,6 +1,5 @@ """Websocket API for Z-Wave JS.""" import json -import logging from aiohttp import hdrs, web, web_exceptions import voluptuous as vol @@ -17,8 +16,6 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect from .const import DATA_CLIENT, DOMAIN, EVENT_DEVICE_ADDED_TO_REGISTRY -_LOGGER = logging.getLogger(__name__) - ID = "id" ENTRY_ID = "entry_id" NODE_ID = "node_id" diff --git a/homeassistant/components/zwave_js/climate.py b/homeassistant/components/zwave_js/climate.py index a0b0648932c..689187f0b34 100644 --- a/homeassistant/components/zwave_js/climate.py +++ b/homeassistant/components/zwave_js/climate.py @@ -1,5 +1,4 @@ """Representation of Z-Wave thermostats.""" -import logging from typing import Any, Callable, Dict, List, Optional from zwave_js_server.client import Client as ZwaveClient @@ -47,8 +46,6 @@ from .const import DATA_CLIENT, DATA_UNSUBSCRIBE, DOMAIN from .discovery import ZwaveDiscoveryInfo from .entity import ZWaveBaseEntity -_LOGGER = logging.getLogger(__name__) - # Map Z-Wave HVAC Mode to Home Assistant value # Note: We treat "auto" as "heat_cool" as most Z-Wave devices # report auto_changeover as auto without schedule support. diff --git a/homeassistant/components/zwave_js/fan.py b/homeassistant/components/zwave_js/fan.py index 58b85eabef1..e957d774e56 100644 --- a/homeassistant/components/zwave_js/fan.py +++ b/homeassistant/components/zwave_js/fan.py @@ -1,5 +1,4 @@ """Support for Z-Wave fans.""" -import logging import math from typing import Any, Callable, List, Optional @@ -22,8 +21,6 @@ from .const import DATA_CLIENT, DATA_UNSUBSCRIBE, DOMAIN from .discovery import ZwaveDiscoveryInfo from .entity import ZWaveBaseEntity -_LOGGER = logging.getLogger(__name__) - SUPPORTED_FEATURES = SUPPORT_SET_SPEED SPEED_RANGE = (1, 99) # off is not included diff --git a/tests/components/feedreader/test_init.py b/tests/components/feedreader/test_init.py index 307ba577de3..a433bbe9935 100644 --- a/tests/components/feedreader/test_init.py +++ b/tests/components/feedreader/test_init.py @@ -1,6 +1,5 @@ """The tests for the feedreader component.""" from datetime import timedelta -from logging import getLogger from os import remove from os.path import exists import time @@ -24,8 +23,6 @@ from homeassistant.setup import setup_component from tests.common import get_test_home_assistant, load_fixture -_LOGGER = getLogger(__name__) - URL = "http://some.rss.local/rss_feed.xml" VALID_CONFIG_1 = {feedreader.DOMAIN: {CONF_URLS: [URL]}} VALID_CONFIG_2 = {feedreader.DOMAIN: {CONF_URLS: [URL], CONF_SCAN_INTERVAL: 60}} diff --git a/tests/components/harmony/conftest.py b/tests/components/harmony/conftest.py index 6ca483b2588..29e897916b9 100644 --- a/tests/components/harmony/conftest.py +++ b/tests/components/harmony/conftest.py @@ -1,5 +1,4 @@ """Fixtures for harmony tests.""" -import logging from unittest.mock import AsyncMock, MagicMock, PropertyMock, patch from aioharmony.const import ClientCallbackType @@ -9,8 +8,6 @@ from homeassistant.components.harmony.const import ACTIVITY_POWER_OFF from .const import NILE_TV_ACTIVITY_ID, PLAY_MUSIC_ACTIVITY_ID, WATCH_TV_ACTIVITY_ID -_LOGGER = logging.getLogger(__name__) - ACTIVITIES_TO_IDS = { ACTIVITY_POWER_OFF: -1, "Watch TV": WATCH_TV_ACTIVITY_ID, diff --git a/tests/components/harmony/test_activity_changes.py b/tests/components/harmony/test_activity_changes.py index ff76c3ce998..dbbc6beef5b 100644 --- a/tests/components/harmony/test_activity_changes.py +++ b/tests/components/harmony/test_activity_changes.py @@ -1,7 +1,4 @@ """Test the Logitech Harmony Hub activity switches.""" - -import logging - from homeassistant.components.harmony.const import DOMAIN from homeassistant.components.remote import ATTR_ACTIVITY, DOMAIN as REMOTE_DOMAIN from homeassistant.components.switch import ( @@ -22,8 +19,6 @@ from .const import ENTITY_PLAY_MUSIC, ENTITY_REMOTE, ENTITY_WATCH_TV, HUB_NAME from tests.common import MockConfigEntry -_LOGGER = logging.getLogger(__name__) - async def test_switch_toggles(mock_hc, hass, mock_write_config): """Ensure calls to the switch modify the harmony state.""" diff --git a/tests/components/hyperion/__init__.py b/tests/components/hyperion/__init__.py index e50de207d00..954d9abc129 100644 --- a/tests/components/hyperion/__init__.py +++ b/tests/components/hyperion/__init__.py @@ -1,7 +1,6 @@ """Tests for the Hyperion component.""" from __future__ import annotations -import logging from types import TracebackType from typing import Any, Dict, Optional, Type from unittest.mock import AsyncMock, Mock, patch @@ -63,8 +62,6 @@ TEST_AUTH_NOT_REQUIRED_RESP = { "info": {"required": False}, } -_LOGGER = logging.getLogger(__name__) - class AsyncContextManagerMock(Mock): """An async context manager mock for Hyperion.""" diff --git a/tests/components/hyperion/test_config_flow.py b/tests/components/hyperion/test_config_flow.py index ef7046660d6..beb642792c9 100644 --- a/tests/components/hyperion/test_config_flow.py +++ b/tests/components/hyperion/test_config_flow.py @@ -1,6 +1,4 @@ """Tests for the Hyperion config flow.""" - -import logging from typing import Any, Dict, Optional from unittest.mock import AsyncMock, patch @@ -41,8 +39,6 @@ from . import ( from tests.common import MockConfigEntry -_LOGGER = logging.getLogger(__name__) - TEST_IP_ADDRESS = "192.168.0.1" TEST_HOST_PORT: Dict[str, Any] = { CONF_HOST: TEST_HOST, diff --git a/tests/components/hyperion/test_light.py b/tests/components/hyperion/test_light.py index c3226cdd389..fe4279ed731 100644 --- a/tests/components/hyperion/test_light.py +++ b/tests/components/hyperion/test_light.py @@ -1,5 +1,4 @@ """Tests for the Hyperion integration.""" -import logging from typing import Optional from unittest.mock import AsyncMock, Mock, call, patch @@ -52,8 +51,6 @@ from . import ( setup_test_config_entry, ) -_LOGGER = logging.getLogger(__name__) - COLOR_BLACK = color_util.COLORS["black"] diff --git a/tests/components/hyperion/test_switch.py b/tests/components/hyperion/test_switch.py index dcfba9662bf..34030787e20 100644 --- a/tests/components/hyperion/test_switch.py +++ b/tests/components/hyperion/test_switch.py @@ -1,5 +1,4 @@ """Tests for the Hyperion integration.""" -import logging from unittest.mock import AsyncMock, call, patch from hyperion.const import ( @@ -35,7 +34,6 @@ TEST_COMPONENTS = [ {"enabled": True, "name": "LEDDEVICE"}, ] -_LOGGER = logging.getLogger(__name__) TEST_SWITCH_COMPONENT_BASE_ENTITY_ID = "switch.test_instance_1_component" TEST_SWITCH_COMPONENT_ALL_ENTITY_ID = f"{TEST_SWITCH_COMPONENT_BASE_ENTITY_ID}_all" diff --git a/tests/components/litejet/test_init.py b/tests/components/litejet/test_init.py index 3861e7a058e..4aee0086cbd 100644 --- a/tests/components/litejet/test_init.py +++ b/tests/components/litejet/test_init.py @@ -1,13 +1,10 @@ """The tests for the litejet component.""" -import logging import unittest from homeassistant.components import litejet from tests.common import get_test_home_assistant -_LOGGER = logging.getLogger(__name__) - class TestLiteJet(unittest.TestCase): """Test the litejet component.""" diff --git a/tests/components/litejet/test_scene.py b/tests/components/litejet/test_scene.py index c2297af6d3f..fe9298cf187 100644 --- a/tests/components/litejet/test_scene.py +++ b/tests/components/litejet/test_scene.py @@ -1,5 +1,4 @@ """The tests for the litejet component.""" -import logging import unittest from unittest import mock @@ -9,8 +8,6 @@ from homeassistant.components import litejet from tests.common import get_test_home_assistant from tests.components.scene import common -_LOGGER = logging.getLogger(__name__) - ENTITY_SCENE = "scene.mock_scene_1" ENTITY_SCENE_NUMBER = 1 ENTITY_OTHER_SCENE = "scene.mock_scene_2" diff --git a/tests/scripts/test_check_config.py b/tests/scripts/test_check_config.py index 6eaaee87af0..ea6048dfc9e 100644 --- a/tests/scripts/test_check_config.py +++ b/tests/scripts/test_check_config.py @@ -1,5 +1,4 @@ """Test check_config script.""" -import logging from unittest.mock import patch import pytest @@ -9,8 +8,6 @@ import homeassistant.scripts.check_config as check_config from tests.common import get_test_config_dir, patch_yaml_files -_LOGGER = logging.getLogger(__name__) - BASE_CONFIG = ( "homeassistant:\n" " name: Home\n"