From 625bbe623812ca2ea6b45371157b9bc2e33727b6 Mon Sep 17 00:00:00 2001 From: Philip Allgaier Date: Mon, 12 Oct 2020 16:59:05 +0200 Subject: [PATCH] Cleanup unused loggers (components A-M) (#41600) --- homeassistant/auth/__init__.py | 2 -- homeassistant/auth/mfa_modules/insecure_example.py | 3 --- homeassistant/auth/mfa_modules/totp.py | 3 --- homeassistant/components/adguard/config_flow.py | 4 ---- homeassistant/components/adguard/sensor.py | 3 --- homeassistant/components/ads/binary_sensor.py | 4 ---- homeassistant/components/ads/cover.py | 4 ---- homeassistant/components/ads/light.py | 3 --- homeassistant/components/ads/sensor.py | 4 ---- homeassistant/components/ads/switch.py | 4 ---- homeassistant/components/agent_dvr/__init__.py | 3 --- .../components/alarmdecoder/alarm_control_panel.py | 4 ---- homeassistant/components/alarmdecoder/sensor.py | 4 ---- homeassistant/components/alexa/__init__.py | 4 ---- homeassistant/components/ambiclimate/__init__.py | 4 ---- .../components/ambient_station/binary_sensor.py | 4 ---- homeassistant/components/ambient_station/sensor.py | 4 ---- .../components/android_ip_webcam/__init__.py | 3 --- homeassistant/components/apache_kafka/__init__.py | 3 --- homeassistant/components/aqualogic/sensor.py | 3 --- homeassistant/components/aqualogic/switch.py | 4 ---- homeassistant/components/arcam_fmj/config_flow.py | 3 --- homeassistant/components/arduino/sensor.py | 4 ---- homeassistant/components/arduino/switch.py | 4 ---- homeassistant/components/asterisk_cdr/mailbox.py | 3 --- homeassistant/components/august/entity.py | 5 ----- homeassistant/components/auth/__init__.py | 3 --- homeassistant/components/avea/light.py | 4 ---- homeassistant/components/avion/light.py | 3 --- homeassistant/components/avri/__init__.py | 3 --- homeassistant/components/axis/__init__.py | 6 +++--- .../components/azure_devops/config_flow.py | 4 ---- homeassistant/components/bbb_gpio/__init__.py | 4 ---- homeassistant/components/bbb_gpio/binary_sensor.py | 4 ---- homeassistant/components/bbb_gpio/switch.py | 4 ---- homeassistant/components/beewi_smartclim/sensor.py | 4 ---- homeassistant/components/bizkaibus/sensor.py | 5 ----- homeassistant/components/blinksticklight/light.py | 4 ---- homeassistant/components/bloomsky/binary_sensor.py | 4 ---- homeassistant/components/bloomsky/sensor.py | 4 ---- homeassistant/components/bond/__init__.py | 2 -- homeassistant/components/broadlink/__init__.py | 3 --- homeassistant/components/broadlink/config_flow.py | 14 ++++++++------ homeassistant/components/brother/sensor.py | 3 --- homeassistant/components/bsblan/__init__.py | 3 --- homeassistant/components/buienradar/camera.py | 10 +++++----- .../components/canary/alarm_control_panel.py | 3 --- homeassistant/components/canary/camera.py | 3 --- homeassistant/components/cert_expiry/sensor.py | 3 --- homeassistant/components/channels/media_player.py | 4 ---- homeassistant/components/circuit/__init__.py | 5 ----- .../components/clementine/media_player.py | 3 --- homeassistant/components/cloud/__init__.py | 4 ---- homeassistant/components/cloud/client.py | 3 --- .../components/command_line/binary_sensor.py | 3 --- homeassistant/components/configurator/__init__.py | 2 -- .../components/conversation/default_agent.py | 3 --- .../components/coronavirus/config_flow.py | 4 ---- homeassistant/components/cpuspeed/sensor.py | 4 ---- homeassistant/components/crimereports/sensor.py | 3 --- homeassistant/components/daikin/switch.py | 4 ---- homeassistant/components/demo/__init__.py | 2 -- homeassistant/components/demo/camera.py | 3 --- homeassistant/components/demo/climate.py | 3 --- homeassistant/components/demo/vacuum.py | 4 ---- homeassistant/components/deutsche_bahn/sensor.py | 3 --- .../components/device_automation/__init__.py | 3 --- .../devolo_home_control/binary_sensor.py | 4 ---- .../components/devolo_home_control/climate.py | 3 --- .../components/devolo_home_control/cover.py | 4 ---- .../devolo_multi_level_switch.py | 4 ---- .../components/devolo_home_control/sensor.py | 4 ---- .../components/devolo_home_control/switch.py | 4 ---- homeassistant/components/dexcom/config_flow.py | 4 ---- .../dlib_face_detect/image_processing.py | 3 --- homeassistant/components/doorbird/switch.py | 3 --- homeassistant/components/dovado/sensor.py | 3 --- homeassistant/components/dsmr/__init__.py | 3 --- .../components/dublin_bus_transport/sensor.py | 2 -- homeassistant/components/eafm/config_flow.py | 4 ---- homeassistant/components/ecoal_boiler/sensor.py | 4 ---- homeassistant/components/ecoal_boiler/switch.py | 3 --- homeassistant/components/edimax/switch.py | 4 ---- homeassistant/components/egardia/binary_sensor.py | 4 ---- homeassistant/components/elgato/__init__.py | 4 ---- homeassistant/components/elgato/config_flow.py | 3 --- .../components/elkm1/alarm_control_panel.py | 4 ---- homeassistant/components/emby/media_player.py | 2 -- homeassistant/components/enigma2/media_player.py | 4 ---- homeassistant/components/enocean/light.py | 3 --- homeassistant/components/enocean/sensor.py | 4 ---- homeassistant/components/enocean/switch.py | 4 ---- .../components/entur_public_transport/sensor.py | 3 --- .../components/environment_canada/camera.py | 3 --- .../components/environment_canada/weather.py | 3 --- homeassistant/components/epsonworkforce/sensor.py | 2 -- homeassistant/components/esphome/camera.py | 3 --- homeassistant/components/esphome/climate.py | 3 --- homeassistant/components/esphome/cover.py | 3 --- homeassistant/components/esphome/fan.py | 3 --- homeassistant/components/esphome/light.py | 4 ---- homeassistant/components/esphome/sensor.py | 3 --- homeassistant/components/esphome/switch.py | 3 --- homeassistant/components/eufy/__init__.py | 4 ---- homeassistant/components/eufy/light.py | 4 ---- homeassistant/components/eufy/switch.py | 4 ---- homeassistant/components/fastdotcom/sensor.py | 4 ---- homeassistant/components/ffmpeg/__init__.py | 3 --- homeassistant/components/ffmpeg/camera.py | 3 --- .../components/ffmpeg_motion/binary_sensor.py | 4 ---- .../components/ffmpeg_noise/binary_sensor.py | 4 ---- homeassistant/components/fibaro/binary_sensor.py | 4 ---- homeassistant/components/fibaro/cover.py | 4 ---- homeassistant/components/fibaro/light.py | 3 --- homeassistant/components/fibaro/lock.py | 4 ---- homeassistant/components/fibaro/scene.py | 3 --- homeassistant/components/fibaro/sensor.py | 4 ---- homeassistant/components/fibaro/switch.py | 4 ---- homeassistant/components/file/notify.py | 3 --- homeassistant/components/futurenow/light.py | 5 ----- homeassistant/components/gc100/__init__.py | 4 ---- homeassistant/components/geizhals/sensor.py | 3 --- homeassistant/components/geofency/__init__.py | 4 ---- .../components/geofency/device_tracker.py | 4 ---- .../components/geonetnz_volcano/config_flow.py | 4 ---- homeassistant/components/glances/sensor.py | 4 ---- homeassistant/components/gogogate2/config_flow.py | 3 --- homeassistant/components/gogogate2/cover.py | 4 ---- homeassistant/components/gpslogger/__init__.py | 4 ---- .../components/greeneye_monitor/sensor.py | 4 ---- homeassistant/components/griddy/sensor.py | 4 ---- homeassistant/components/group/cover.py | 3 --- homeassistant/components/group/light.py | 3 --- homeassistant/components/group/notify.py | 3 --- homeassistant/components/habitica/sensor.py | 3 --- homeassistant/components/hangouts/notify.py | 4 ---- .../components/harman_kardon_avr/media_player.py | 4 ---- homeassistant/components/harmony/__init__.py | 3 --- .../components/hisense_aehw4a1/config_flow.py | 4 ---- .../components/home_connect/config_flow.py | 2 -- .../components/homeassistant/triggers/event.py | 4 ---- .../homeassistant/triggers/homeassistant.py | 3 --- .../components/homeassistant/triggers/time.py | 3 --- .../homeassistant/triggers/time_pattern.py | 4 ---- homeassistant/components/homekit/aidmanager.py | 3 --- homeassistant/components/homekit/config_flow.py | 3 --- .../components/homekit_controller/__init__.py | 3 --- .../homekit_controller/alarm_control_panel.py | 4 ---- .../components/homekit_controller/binary_sensor.py | 4 ---- .../components/homekit_controller/cover.py | 4 ---- homeassistant/components/homekit_controller/fan.py | 4 ---- .../components/homekit_controller/light.py | 4 ---- .../components/homekit_controller/lock.py | 4 ---- .../components/homekit_controller/switch.py | 4 ---- .../components/homematic/binary_sensor.py | 4 ---- homeassistant/components/homematic/climate.py | 4 ---- homeassistant/components/homematic/cover.py | 4 ---- homeassistant/components/homematic/light.py | 4 ---- homeassistant/components/homematic/lock.py | 4 ---- homeassistant/components/homematic/notify.py | 4 ---- homeassistant/components/homematic/switch.py | 4 ---- .../components/homematicip_cloud/__init__.py | 4 ---- .../components/homematicip_cloud/binary_sensor.py | 3 --- .../components/homematicip_cloud/climate.py | 3 --- .../components/homematicip_cloud/cover.py | 3 --- .../components/homematicip_cloud/light.py | 3 --- .../components/homematicip_cloud/sensor.py | 3 --- .../components/homematicip_cloud/switch.py | 3 --- .../components/homematicip_cloud/weather.py | 4 ---- .../components/hunterdouglas_powerview/scene.py | 3 --- .../components/hunterdouglas_powerview/sensor.py | 4 ---- .../components/iaqualink/binary_sensor.py | 4 ---- homeassistant/components/iaqualink/light.py | 4 ---- homeassistant/components/iaqualink/sensor.py | 3 --- homeassistant/components/iaqualink/switch.py | 4 ---- homeassistant/components/icloud/__init__.py | 3 --- homeassistant/components/icloud/device_tracker.py | 3 --- homeassistant/components/icloud/sensor.py | 3 --- homeassistant/components/ihc/light.py | 4 ---- homeassistant/components/insteon/binary_sensor.py | 4 ---- homeassistant/components/insteon/climate.py | 3 --- homeassistant/components/insteon/cover.py | 3 --- homeassistant/components/insteon/fan.py | 3 --- homeassistant/components/insteon/ipdb.py | 4 ---- homeassistant/components/insteon/light.py | 3 --- homeassistant/components/insteon/switch.py | 4 ---- homeassistant/components/intent/__init__.py | 3 --- homeassistant/components/intent_script/__init__.py | 3 --- homeassistant/components/ios/__init__.py | 3 --- homeassistant/components/iota/__init__.py | 3 --- homeassistant/components/iota/sensor.py | 3 --- homeassistant/components/iqvia/sensor.py | 3 --- .../components/irish_rail_transport/sensor.py | 3 --- homeassistant/components/itunes/media_player.py | 4 ---- homeassistant/components/izone/__init__.py | 4 ---- .../components/jewish_calendar/__init__.py | 3 --- .../components/jewish_calendar/binary_sensor.py | 4 ---- homeassistant/components/juicenet/device.py | 4 ---- homeassistant/components/juicenet/sensor.py | 4 ---- homeassistant/components/juicenet/switch.py | 4 ---- homeassistant/components/keba/binary_sensor.py | 4 ---- homeassistant/components/keba/lock.py | 4 ---- homeassistant/components/keba/notify.py | 4 ---- homeassistant/components/keba/sensor.py | 4 ---- .../components/konnected/binary_sensor.py | 4 ---- homeassistant/components/konnected/sensor.py | 4 ---- homeassistant/components/kwb/sensor.py | 4 ---- .../components/lg_netcast/media_player.py | 3 --- .../components/lg_soundbar/media_player.py | 4 ---- homeassistant/components/life360/__init__.py | 4 ---- homeassistant/components/litejet/__init__.py | 4 ---- homeassistant/components/litejet/scene.py | 3 --- homeassistant/components/litejet/trigger.py | 4 ---- .../components/locative/device_tracker.py | 4 ---- homeassistant/components/lock/__init__.py | 2 -- homeassistant/components/logbook/__init__.py | 3 --- homeassistant/components/logi_circle/__init__.py | 2 -- .../components/london_underground/sensor.py | 3 --- homeassistant/components/lutron/light.py | 4 ---- homeassistant/components/lutron/scene.py | 3 --- homeassistant/components/lutron/switch.py | 4 ---- homeassistant/components/marytts/tts.py | 4 ---- homeassistant/components/matrix/notify.py | 4 ---- homeassistant/components/maxcube/binary_sensor.py | 4 ---- homeassistant/components/mcp23017/binary_sensor.py | 4 ---- homeassistant/components/mcp23017/switch.py | 4 ---- homeassistant/components/melcloud/climate.py | 3 --- homeassistant/components/melcloud/config_flow.py | 3 --- homeassistant/components/melcloud/sensor.py | 4 ---- homeassistant/components/melissa/__init__.py | 4 ---- homeassistant/components/metoffice/sensor.py | 5 ----- homeassistant/components/metoffice/weather.py | 5 ----- homeassistant/components/mill/__init__.py | 3 --- homeassistant/components/mill/climate.py | 4 ---- homeassistant/components/mill/config_flow.py | 4 ---- .../components/minecraft_server/sensor.py | 4 ---- .../components/mobile_app/device_tracker.py | 3 --- homeassistant/components/mochad/light.py | 4 ---- homeassistant/components/modbus/binary_sensor.py | 3 --- homeassistant/components/modbus/cover.py | 3 --- homeassistant/components/moon/sensor.py | 4 ---- homeassistant/components/mychevy/binary_sensor.py | 4 ---- homeassistant/components/mycroft/__init__.py | 4 ---- homeassistant/components/myq/binary_sensor.py | 4 ---- homeassistant/components/myq/cover.py | 4 ---- homeassistant/components/mysensors/handler.py | 3 --- .../components/mythicbeastsdns/__init__.py | 3 --- homeassistant/components/spotify/__init__.py | 3 --- homeassistant/data_entry_flow.py | 3 --- homeassistant/requirements.py | 2 -- tests/components/synology_dsm/test_config_flow.py | 5 ----- 251 files changed, 16 insertions(+), 891 deletions(-) diff --git a/homeassistant/auth/__init__.py b/homeassistant/auth/__init__.py index 5a39090ae4..d2ce63f949 100644 --- a/homeassistant/auth/__init__.py +++ b/homeassistant/auth/__init__.py @@ -2,7 +2,6 @@ import asyncio from collections import OrderedDict from datetime import timedelta -import logging from typing import Any, Dict, List, Optional, Tuple, cast import jwt @@ -20,7 +19,6 @@ from .providers import AuthProvider, LoginFlow, auth_provider_from_config EVENT_USER_ADDED = "user_added" EVENT_USER_REMOVED = "user_removed" -_LOGGER = logging.getLogger(__name__) _MfaModuleDict = Dict[str, MultiFactorAuthModule] _ProviderKey = Tuple[str, Optional[str]] _ProviderDict = Dict[_ProviderKey, AuthProvider] diff --git a/homeassistant/auth/mfa_modules/insecure_example.py b/homeassistant/auth/mfa_modules/insecure_example.py index 45cc07ae58..ddceeaae82 100644 --- a/homeassistant/auth/mfa_modules/insecure_example.py +++ b/homeassistant/auth/mfa_modules/insecure_example.py @@ -1,5 +1,4 @@ """Example auth module.""" -import logging from typing import Any, Dict import voluptuous as vol @@ -22,8 +21,6 @@ CONFIG_SCHEMA = MULTI_FACTOR_AUTH_MODULE_SCHEMA.extend( extra=vol.PREVENT_EXTRA, ) -_LOGGER = logging.getLogger(__name__) - @MULTI_FACTOR_AUTH_MODULES.register("insecure_example") class InsecureExampleModule(MultiFactorAuthModule): diff --git a/homeassistant/auth/mfa_modules/totp.py b/homeassistant/auth/mfa_modules/totp.py index 2fc8c37986..359f79ce6c 100644 --- a/homeassistant/auth/mfa_modules/totp.py +++ b/homeassistant/auth/mfa_modules/totp.py @@ -1,7 +1,6 @@ """Time-based One Time Password auth module.""" import asyncio from io import BytesIO -import logging from typing import Any, Dict, Optional, Tuple import voluptuous as vol @@ -30,8 +29,6 @@ INPUT_FIELD_CODE = "code" DUMMY_SECRET = "FPPTH34D4E3MI2HG" -_LOGGER = logging.getLogger(__name__) - def _generate_qr_code(data: str) -> str: """Generate a base64 PNG string represent QR Code image of data.""" diff --git a/homeassistant/components/adguard/config_flow.py b/homeassistant/components/adguard/config_flow.py index c799c4a713..d728eed300 100644 --- a/homeassistant/components/adguard/config_flow.py +++ b/homeassistant/components/adguard/config_flow.py @@ -1,6 +1,4 @@ """Config flow to configure the AdGuard Home integration.""" -import logging - from adguardhome import AdGuardHome, AdGuardHomeConnectionError import voluptuous as vol @@ -17,8 +15,6 @@ from homeassistant.const import ( ) from homeassistant.helpers.aiohttp_client import async_get_clientsession -_LOGGER = logging.getLogger(__name__) - @config_entries.HANDLERS.register(DOMAIN) class AdGuardHomeFlowHandler(ConfigFlow): diff --git a/homeassistant/components/adguard/sensor.py b/homeassistant/components/adguard/sensor.py index 10eec60602..05e23ba8b8 100644 --- a/homeassistant/components/adguard/sensor.py +++ b/homeassistant/components/adguard/sensor.py @@ -1,6 +1,5 @@ """Support for AdGuard Home sensors.""" from datetime import timedelta -import logging from adguardhome import AdGuardHomeConnectionError @@ -15,8 +14,6 @@ from homeassistant.const import PERCENTAGE, TIME_MILLISECONDS from homeassistant.exceptions import PlatformNotReady from homeassistant.helpers.typing import HomeAssistantType -_LOGGER = logging.getLogger(__name__) - SCAN_INTERVAL = timedelta(seconds=300) PARALLEL_UPDATES = 4 diff --git a/homeassistant/components/ads/binary_sensor.py b/homeassistant/components/ads/binary_sensor.py index d481420b4d..0cf89dfa7c 100644 --- a/homeassistant/components/ads/binary_sensor.py +++ b/homeassistant/components/ads/binary_sensor.py @@ -1,6 +1,4 @@ """Support for ADS binary sensors.""" -import logging - import voluptuous as vol from homeassistant.components.binary_sensor import ( @@ -14,8 +12,6 @@ import homeassistant.helpers.config_validation as cv from . import CONF_ADS_VAR, DATA_ADS, STATE_KEY_STATE, AdsEntity -_LOGGER = logging.getLogger(__name__) - DEFAULT_NAME = "ADS binary sensor" PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( { diff --git a/homeassistant/components/ads/cover.py b/homeassistant/components/ads/cover.py index 1a350b3e39..5348873c7d 100644 --- a/homeassistant/components/ads/cover.py +++ b/homeassistant/components/ads/cover.py @@ -1,6 +1,4 @@ """Support for ADS covers.""" -import logging - import voluptuous as vol from homeassistant.components.cover import ( @@ -25,8 +23,6 @@ from . import ( AdsEntity, ) -_LOGGER = logging.getLogger(__name__) - DEFAULT_NAME = "ADS Cover" CONF_ADS_VAR_SET_POS = "adsvar_set_position" diff --git a/homeassistant/components/ads/light.py b/homeassistant/components/ads/light.py index 7470106607..82ead5fbf5 100644 --- a/homeassistant/components/ads/light.py +++ b/homeassistant/components/ads/light.py @@ -1,6 +1,4 @@ """Support for ADS light sources.""" -import logging - import voluptuous as vol from homeassistant.components.light import ( @@ -21,7 +19,6 @@ from . import ( AdsEntity, ) -_LOGGER = logging.getLogger(__name__) DEFAULT_NAME = "ADS Light" PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( { diff --git a/homeassistant/components/ads/sensor.py b/homeassistant/components/ads/sensor.py index 134acae3f9..2f411b2772 100644 --- a/homeassistant/components/ads/sensor.py +++ b/homeassistant/components/ads/sensor.py @@ -1,6 +1,4 @@ """Support for ADS sensors.""" -import logging - import voluptuous as vol from homeassistant.components import ads @@ -10,8 +8,6 @@ import homeassistant.helpers.config_validation as cv from . import CONF_ADS_FACTOR, CONF_ADS_TYPE, CONF_ADS_VAR, STATE_KEY_STATE, AdsEntity -_LOGGER = logging.getLogger(__name__) - DEFAULT_NAME = "ADS sensor" PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( { diff --git a/homeassistant/components/ads/switch.py b/homeassistant/components/ads/switch.py index c8231d8a31..9f807899e5 100644 --- a/homeassistant/components/ads/switch.py +++ b/homeassistant/components/ads/switch.py @@ -1,6 +1,4 @@ """Support for ADS switch platform.""" -import logging - import voluptuous as vol from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchEntity @@ -9,8 +7,6 @@ import homeassistant.helpers.config_validation as cv from . import CONF_ADS_VAR, DATA_ADS, STATE_KEY_STATE, AdsEntity -_LOGGER = logging.getLogger(__name__) - DEFAULT_NAME = "ADS Switch" PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( diff --git a/homeassistant/components/agent_dvr/__init__.py b/homeassistant/components/agent_dvr/__init__.py index 878a100684..fc52ee0ef3 100644 --- a/homeassistant/components/agent_dvr/__init__.py +++ b/homeassistant/components/agent_dvr/__init__.py @@ -1,6 +1,5 @@ """Support for Agent.""" import asyncio -import logging from agent import AgentError from agent.a import Agent @@ -14,8 +13,6 @@ from .const import CONNECTION, DOMAIN as AGENT_DOMAIN, SERVER_URL ATTRIBUTION = "ispyconnect.com" DEFAULT_BRAND = "Agent DVR by ispyconnect.com" -_LOGGER = logging.getLogger(__name__) - FORWARDS = ["alarm_control_panel", "camera"] diff --git a/homeassistant/components/alarmdecoder/alarm_control_panel.py b/homeassistant/components/alarmdecoder/alarm_control_panel.py index bc2d74a504..5e3118b1d3 100644 --- a/homeassistant/components/alarmdecoder/alarm_control_panel.py +++ b/homeassistant/components/alarmdecoder/alarm_control_panel.py @@ -1,6 +1,4 @@ """Support for AlarmDecoder-based alarm control panels (Honeywell/DSC).""" -import logging - import voluptuous as vol from homeassistant.components.alarm_control_panel import ( @@ -36,8 +34,6 @@ from .const import ( SIGNAL_PANEL_MESSAGE, ) -_LOGGER = logging.getLogger(__name__) - SERVICE_ALARM_TOGGLE_CHIME = "alarm_toggle_chime" SERVICE_ALARM_KEYPRESS = "alarm_keypress" diff --git a/homeassistant/components/alarmdecoder/sensor.py b/homeassistant/components/alarmdecoder/sensor.py index 4ce953af1d..a8aed8dac7 100644 --- a/homeassistant/components/alarmdecoder/sensor.py +++ b/homeassistant/components/alarmdecoder/sensor.py @@ -1,14 +1,10 @@ """Support for AlarmDecoder sensors (Shows Panel Display).""" -import logging - from homeassistant.config_entries import ConfigEntry from homeassistant.helpers.entity import Entity from homeassistant.helpers.typing import HomeAssistantType from .const import SIGNAL_PANEL_MESSAGE -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry( hass: HomeAssistantType, entry: ConfigEntry, async_add_entities diff --git a/homeassistant/components/alexa/__init__.py b/homeassistant/components/alexa/__init__.py index 7522b7e2d5..5180a8d55b 100644 --- a/homeassistant/components/alexa/__init__.py +++ b/homeassistant/components/alexa/__init__.py @@ -1,6 +1,4 @@ """Support for Alexa skill service end point.""" -import logging - import voluptuous as vol from homeassistant.const import CONF_CLIENT_ID, CONF_CLIENT_SECRET, CONF_NAME @@ -24,8 +22,6 @@ from .const import ( DOMAIN, ) -_LOGGER = logging.getLogger(__name__) - CONF_FLASH_BRIEFINGS = "flash_briefings" CONF_SMART_HOME = "smart_home" DEFAULT_LOCALE = "en-US" diff --git a/homeassistant/components/ambiclimate/__init__.py b/homeassistant/components/ambiclimate/__init__.py index 490c41255b..e9247b9fd7 100644 --- a/homeassistant/components/ambiclimate/__init__.py +++ b/homeassistant/components/ambiclimate/__init__.py @@ -1,6 +1,4 @@ """Support for Ambiclimate devices.""" -import logging - import voluptuous as vol from homeassistant.const import CONF_CLIENT_ID, CONF_CLIENT_SECRET @@ -9,8 +7,6 @@ from homeassistant.helpers import config_validation as cv from . import config_flow from .const import DOMAIN -_LOGGER = logging.getLogger(__name__) - CONFIG_SCHEMA = vol.Schema( { DOMAIN: vol.Schema( diff --git a/homeassistant/components/ambient_station/binary_sensor.py b/homeassistant/components/ambient_station/binary_sensor.py index 5aba9d637d..0a3a91e515 100644 --- a/homeassistant/components/ambient_station/binary_sensor.py +++ b/homeassistant/components/ambient_station/binary_sensor.py @@ -1,6 +1,4 @@ """Support for Ambient Weather Station binary sensors.""" -import logging - from homeassistant.components.binary_sensor import BinarySensorEntity from homeassistant.const import ATTR_NAME from homeassistant.core import callback @@ -28,8 +26,6 @@ from .const import ( TYPE_BINARY_SENSOR, ) -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry(hass, entry, async_add_entities): """Set up Ambient PWS binary sensors based on a config entry.""" diff --git a/homeassistant/components/ambient_station/sensor.py b/homeassistant/components/ambient_station/sensor.py index b3b7671536..540e2facd4 100644 --- a/homeassistant/components/ambient_station/sensor.py +++ b/homeassistant/components/ambient_station/sensor.py @@ -1,6 +1,4 @@ """Support for Ambient Weather Station sensors.""" -import logging - from homeassistant.const import ATTR_NAME from homeassistant.core import callback @@ -18,8 +16,6 @@ from .const import ( TYPE_SENSOR, ) -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry(hass, entry, async_add_entities): """Set up Ambient PWS sensors based on a config entry.""" diff --git a/homeassistant/components/android_ip_webcam/__init__.py b/homeassistant/components/android_ip_webcam/__init__.py index 333da7dcee..905d026286 100644 --- a/homeassistant/components/android_ip_webcam/__init__.py +++ b/homeassistant/components/android_ip_webcam/__init__.py @@ -1,7 +1,6 @@ """Support for Android IP Webcam.""" import asyncio from datetime import timedelta -import logging from pydroid_ipcam import PyDroidIPCam import voluptuous as vol @@ -31,8 +30,6 @@ from homeassistant.helpers.entity import Entity from homeassistant.helpers.event import async_track_point_in_utc_time from homeassistant.util.dt import utcnow -_LOGGER = logging.getLogger(__name__) - ATTR_AUD_CONNS = "Audio Connections" ATTR_HOST = "host" ATTR_VID_CONNS = "Video Connections" diff --git a/homeassistant/components/apache_kafka/__init__.py b/homeassistant/components/apache_kafka/__init__.py index 52f57a4b75..e0bcc04360 100644 --- a/homeassistant/components/apache_kafka/__init__.py +++ b/homeassistant/components/apache_kafka/__init__.py @@ -1,7 +1,6 @@ """Support for Apache Kafka.""" from datetime import datetime import json -import logging from aiokafka import AIOKafkaProducer import voluptuous as vol @@ -20,8 +19,6 @@ import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entityfilter import FILTER_SCHEMA from homeassistant.util import ssl as ssl_util -_LOGGER = logging.getLogger(__name__) - DOMAIN = "apache_kafka" CONF_FILTER = "filter" diff --git a/homeassistant/components/aqualogic/sensor.py b/homeassistant/components/aqualogic/sensor.py index 138a4ecc8c..f92cd11c01 100644 --- a/homeassistant/components/aqualogic/sensor.py +++ b/homeassistant/components/aqualogic/sensor.py @@ -1,5 +1,4 @@ """Support for AquaLogic sensors.""" -import logging import voluptuous as vol @@ -17,8 +16,6 @@ from homeassistant.helpers.entity import Entity from . import DOMAIN, UPDATE_TOPIC -_LOGGER = logging.getLogger(__name__) - TEMP_UNITS = [TEMP_CELSIUS, TEMP_FAHRENHEIT] PERCENT_UNITS = [PERCENTAGE, PERCENTAGE] SALT_UNITS = ["g/L", "PPM"] diff --git a/homeassistant/components/aqualogic/switch.py b/homeassistant/components/aqualogic/switch.py index 94822eaef1..08bba4cbd2 100644 --- a/homeassistant/components/aqualogic/switch.py +++ b/homeassistant/components/aqualogic/switch.py @@ -1,6 +1,4 @@ """Support for AquaLogic switches.""" -import logging - from aqualogic.core import States import voluptuous as vol @@ -10,8 +8,6 @@ import homeassistant.helpers.config_validation as cv from . import DOMAIN, UPDATE_TOPIC -_LOGGER = logging.getLogger(__name__) - SWITCH_TYPES = { "lights": "Lights", "filter": "Filter", diff --git a/homeassistant/components/arcam_fmj/config_flow.py b/homeassistant/components/arcam_fmj/config_flow.py index c04757e75d..d270af9295 100644 --- a/homeassistant/components/arcam_fmj/config_flow.py +++ b/homeassistant/components/arcam_fmj/config_flow.py @@ -1,5 +1,4 @@ """Config flow to configure the Arcam FMJ component.""" -import logging from urllib.parse import urlparse from arcam.fmj.client import Client, ConnectionFailed @@ -13,8 +12,6 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession from .const import DEFAULT_NAME, DEFAULT_PORT, DOMAIN, DOMAIN_DATA_ENTRIES -_LOGGER = logging.getLogger(__name__) - def get_entry_client(hass, entry): """Retrieve client associated with a config entry.""" diff --git a/homeassistant/components/arduino/sensor.py b/homeassistant/components/arduino/sensor.py index 8da656d217..f31272b3a2 100644 --- a/homeassistant/components/arduino/sensor.py +++ b/homeassistant/components/arduino/sensor.py @@ -1,6 +1,4 @@ """Support for getting information from Arduino pins.""" -import logging - import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA @@ -10,8 +8,6 @@ from homeassistant.helpers.entity import Entity from . import DOMAIN -_LOGGER = logging.getLogger(__name__) - CONF_PINS = "pins" CONF_TYPE = "analog" diff --git a/homeassistant/components/arduino/switch.py b/homeassistant/components/arduino/switch.py index 99b73c86fd..6ee742fd50 100644 --- a/homeassistant/components/arduino/switch.py +++ b/homeassistant/components/arduino/switch.py @@ -1,6 +1,4 @@ """Support for switching Arduino pins on and off.""" -import logging - import voluptuous as vol from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchEntity @@ -9,8 +7,6 @@ import homeassistant.helpers.config_validation as cv from . import DOMAIN -_LOGGER = logging.getLogger(__name__) - CONF_PINS = "pins" CONF_TYPE = "digital" CONF_NEGATE = "negate" diff --git a/homeassistant/components/asterisk_cdr/mailbox.py b/homeassistant/components/asterisk_cdr/mailbox.py index 12587e531d..28f48c7ab7 100644 --- a/homeassistant/components/asterisk_cdr/mailbox.py +++ b/homeassistant/components/asterisk_cdr/mailbox.py @@ -1,7 +1,6 @@ """Support for the Asterisk CDR interface.""" import datetime import hashlib -import logging from homeassistant.components.asterisk_mbox import ( DOMAIN as ASTERISK_DOMAIN, @@ -11,8 +10,6 @@ from homeassistant.components.mailbox import Mailbox from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect -_LOGGER = logging.getLogger(__name__) - MAILBOX_NAME = "asterisk_cdr" diff --git a/homeassistant/components/august/entity.py b/homeassistant/components/august/entity.py index 1742a00b4e..0d25977879 100644 --- a/homeassistant/components/august/entity.py +++ b/homeassistant/components/august/entity.py @@ -1,15 +1,10 @@ """Base class for August entity.""" - -import logging - from homeassistant.core import callback from homeassistant.helpers.entity import Entity from . import DOMAIN from .const import MANUFACTURER -_LOGGER = logging.getLogger(__name__) - class AugustEntityMixin(Entity): """Base implementation for August device.""" diff --git a/homeassistant/components/auth/__init__.py b/homeassistant/components/auth/__init__.py index fba96b2408..43451632f3 100644 --- a/homeassistant/components/auth/__init__.py +++ b/homeassistant/components/auth/__init__.py @@ -115,7 +115,6 @@ Result will be a long-lived access token: """ from datetime import timedelta -import logging import uuid from aiohttp import web @@ -179,8 +178,6 @@ SCHEMA_WS_SIGN_PATH = websocket_api.BASE_COMMAND_MESSAGE_SCHEMA.extend( RESULT_TYPE_CREDENTIALS = "credentials" RESULT_TYPE_USER = "user" -_LOGGER = logging.getLogger(__name__) - @bind_hass def create_auth_code(hass, client_id: str, user: User) -> str: diff --git a/homeassistant/components/avea/light.py b/homeassistant/components/avea/light.py index c3f6e19c2e..eca020f6cd 100644 --- a/homeassistant/components/avea/light.py +++ b/homeassistant/components/avea/light.py @@ -1,6 +1,4 @@ """Support for the Elgato Avea lights.""" -import logging - import avea # pylint: disable=import-error from homeassistant.components.light import ( @@ -13,8 +11,6 @@ from homeassistant.components.light import ( from homeassistant.exceptions import PlatformNotReady import homeassistant.util.color as color_util -_LOGGER = logging.getLogger(__name__) - SUPPORT_AVEA = SUPPORT_BRIGHTNESS | SUPPORT_COLOR diff --git a/homeassistant/components/avion/light.py b/homeassistant/components/avion/light.py index e5281c1365..0af2f15b34 100644 --- a/homeassistant/components/avion/light.py +++ b/homeassistant/components/avion/light.py @@ -1,6 +1,5 @@ """Support for Avion dimmers.""" import importlib -import logging import time import voluptuous as vol @@ -21,8 +20,6 @@ from homeassistant.const import ( ) import homeassistant.helpers.config_validation as cv -_LOGGER = logging.getLogger(__name__) - SUPPORT_AVION_LED = SUPPORT_BRIGHTNESS DEVICE_SCHEMA = vol.Schema( diff --git a/homeassistant/components/avri/__init__.py b/homeassistant/components/avri/__init__.py index 3165b6ee87..f3b659ddcc 100644 --- a/homeassistant/components/avri/__init__.py +++ b/homeassistant/components/avri/__init__.py @@ -1,7 +1,6 @@ """The avri component.""" import asyncio from datetime import timedelta -import logging from avri.api import Avri @@ -16,8 +15,6 @@ from .const import ( DOMAIN, ) -_LOGGER = logging.getLogger(__name__) - PLATFORMS = ["sensor"] SCAN_INTERVAL = timedelta(hours=4) diff --git a/homeassistant/components/axis/__init__.py b/homeassistant/components/axis/__init__.py index eedeac0136..b757f78708 100644 --- a/homeassistant/components/axis/__init__.py +++ b/homeassistant/components/axis/__init__.py @@ -7,7 +7,7 @@ from homeassistant.const import CONF_DEVICE, EVENT_HOMEASSISTANT_STOP from .const import DOMAIN as AXIS_DOMAIN from .device import AxisNetworkDevice -LOGGER = logging.getLogger(__name__) +_LOGGER = logging.getLogger(__name__) async def async_setup(hass, config): @@ -47,7 +47,7 @@ async def async_unload_entry(hass, config_entry): async def async_migrate_entry(hass, config_entry): """Migrate old entry.""" - LOGGER.debug("Migrating from version %s", config_entry.version) + _LOGGER.debug("Migrating from version %s", config_entry.version) # Flatten configuration but keep old data if user rollbacks HASS if config_entry.version == 1: @@ -55,6 +55,6 @@ async def async_migrate_entry(hass, config_entry): config_entry.version = 2 - LOGGER.info("Migration to version %s successful", config_entry.version) + _LOGGER.info("Migration to version %s successful", config_entry.version) return True diff --git a/homeassistant/components/azure_devops/config_flow.py b/homeassistant/components/azure_devops/config_flow.py index 69030871b8..94235acbba 100644 --- a/homeassistant/components/azure_devops/config_flow.py +++ b/homeassistant/components/azure_devops/config_flow.py @@ -1,6 +1,4 @@ """Config flow to configure the Azure DevOps integration.""" -import logging - from aioazuredevops.client import DevOpsClient import aiohttp import voluptuous as vol @@ -14,8 +12,6 @@ from homeassistant.components.azure_devops.const import ( # pylint:disable=unus ) from homeassistant.config_entries import ConfigFlow -_LOGGER = logging.getLogger(__name__) - class AzureDevOpsFlowHandler(ConfigFlow, domain=DOMAIN): """Handle a Azure DevOps config flow.""" diff --git a/homeassistant/components/bbb_gpio/__init__.py b/homeassistant/components/bbb_gpio/__init__.py index 30a4bacc4d..61d98c7413 100644 --- a/homeassistant/components/bbb_gpio/__init__.py +++ b/homeassistant/components/bbb_gpio/__init__.py @@ -1,12 +1,8 @@ """Support for controlling GPIO pins of a Beaglebone Black.""" -import logging - from Adafruit_BBIO import GPIO # pylint: disable=import-error from homeassistant.const import EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP -_LOGGER = logging.getLogger(__name__) - DOMAIN = "bbb_gpio" diff --git a/homeassistant/components/bbb_gpio/binary_sensor.py b/homeassistant/components/bbb_gpio/binary_sensor.py index 229f7a6c61..c772cf86f0 100644 --- a/homeassistant/components/bbb_gpio/binary_sensor.py +++ b/homeassistant/components/bbb_gpio/binary_sensor.py @@ -1,6 +1,4 @@ """Support for binary sensor using Beaglebone Black GPIO.""" -import logging - import voluptuous as vol from homeassistant.components import bbb_gpio @@ -8,8 +6,6 @@ from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensor from homeassistant.const import CONF_NAME, DEVICE_DEFAULT_NAME import homeassistant.helpers.config_validation as cv -_LOGGER = logging.getLogger(__name__) - CONF_PINS = "pins" CONF_BOUNCETIME = "bouncetime" CONF_INVERT_LOGIC = "invert_logic" diff --git a/homeassistant/components/bbb_gpio/switch.py b/homeassistant/components/bbb_gpio/switch.py index cc776c21f9..03a9065a15 100644 --- a/homeassistant/components/bbb_gpio/switch.py +++ b/homeassistant/components/bbb_gpio/switch.py @@ -1,6 +1,4 @@ """Allows to configure a switch using BeagleBone Black GPIO.""" -import logging - import voluptuous as vol from homeassistant.components import bbb_gpio @@ -9,8 +7,6 @@ from homeassistant.const import CONF_NAME, DEVICE_DEFAULT_NAME import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import ToggleEntity -_LOGGER = logging.getLogger(__name__) - CONF_PINS = "pins" CONF_INITIAL = "initial" CONF_INVERT_LOGIC = "invert_logic" diff --git a/homeassistant/components/beewi_smartclim/sensor.py b/homeassistant/components/beewi_smartclim/sensor.py index b155a1e06b..e8a37d51be 100644 --- a/homeassistant/components/beewi_smartclim/sensor.py +++ b/homeassistant/components/beewi_smartclim/sensor.py @@ -1,6 +1,4 @@ """Platform for beewi_smartclim integration.""" -import logging - from beewi_smartclim import BeewiSmartClimPoller # pylint: disable=import-error import voluptuous as vol @@ -17,8 +15,6 @@ from homeassistant.const import ( import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity -_LOGGER = logging.getLogger(__name__) - # Default values DEFAULT_NAME = "BeeWi SmartClim" diff --git a/homeassistant/components/bizkaibus/sensor.py b/homeassistant/components/bizkaibus/sensor.py index 0b8e2682f3..c1cee98208 100644 --- a/homeassistant/components/bizkaibus/sensor.py +++ b/homeassistant/components/bizkaibus/sensor.py @@ -1,7 +1,4 @@ """Support for Bizkaibus, Biscay (Basque Country, Spain) Bus service.""" - -import logging - from bizkaibus.bizkaibus import BizkaibusData import voluptuous as vol @@ -10,8 +7,6 @@ from homeassistant.const import CONF_NAME, TIME_MINUTES import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity -_LOGGER = logging.getLogger(__name__) - ATTR_DUE_IN = "Due in" CONF_STOP_ID = "stopid" diff --git a/homeassistant/components/blinksticklight/light.py b/homeassistant/components/blinksticklight/light.py index 71e6a6b2c7..d112042075 100644 --- a/homeassistant/components/blinksticklight/light.py +++ b/homeassistant/components/blinksticklight/light.py @@ -1,6 +1,4 @@ """Support for Blinkstick lights.""" -import logging - from blinkstick import blinkstick import voluptuous as vol @@ -16,8 +14,6 @@ from homeassistant.const import CONF_NAME import homeassistant.helpers.config_validation as cv import homeassistant.util.color as color_util -_LOGGER = logging.getLogger(__name__) - CONF_SERIAL = "serial" DEFAULT_NAME = "Blinkstick" diff --git a/homeassistant/components/bloomsky/binary_sensor.py b/homeassistant/components/bloomsky/binary_sensor.py index 43c5614679..4234b4fb14 100644 --- a/homeassistant/components/bloomsky/binary_sensor.py +++ b/homeassistant/components/bloomsky/binary_sensor.py @@ -1,6 +1,4 @@ """Support the binary sensors of a BloomSky weather station.""" -import logging - import voluptuous as vol from homeassistant.components.binary_sensor import ( @@ -13,8 +11,6 @@ import homeassistant.helpers.config_validation as cv from . import DOMAIN -_LOGGER = logging.getLogger(__name__) - SENSOR_TYPES = {"Rain": DEVICE_CLASS_MOISTURE, "Night": None} PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( diff --git a/homeassistant/components/bloomsky/sensor.py b/homeassistant/components/bloomsky/sensor.py index eaa03ef2f3..df06e39db7 100644 --- a/homeassistant/components/bloomsky/sensor.py +++ b/homeassistant/components/bloomsky/sensor.py @@ -1,6 +1,4 @@ """Support the sensor of a BloomSky weather station.""" -import logging - import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA @@ -18,8 +16,6 @@ from homeassistant.helpers.entity import Entity from . import DOMAIN -LOGGER = logging.getLogger(__name__) - # These are the available sensors SENSOR_TYPES = [ "Temperature", diff --git a/homeassistant/components/bond/__init__.py b/homeassistant/components/bond/__init__.py index a0ed6545b9..9af92f6e7e 100644 --- a/homeassistant/components/bond/__init__.py +++ b/homeassistant/components/bond/__init__.py @@ -1,7 +1,6 @@ """The Bond integration.""" import asyncio from asyncio import TimeoutError as AsyncIOTimeoutError -import logging from aiohttp import ClientError, ClientTimeout from bond_api import Bond @@ -16,7 +15,6 @@ from homeassistant.helpers.entity import SLOW_UPDATE_WARNING from .const import DOMAIN from .utils import BondHub -_LOGGER = logging.getLogger(__name__) PLATFORMS = ["cover", "fan", "light", "switch"] _API_TIMEOUT = SLOW_UPDATE_WARNING - 1 diff --git a/homeassistant/components/broadlink/__init__.py b/homeassistant/components/broadlink/__init__.py index 74f26b5fbd..501afaac93 100644 --- a/homeassistant/components/broadlink/__init__.py +++ b/homeassistant/components/broadlink/__init__.py @@ -1,12 +1,9 @@ """The Broadlink integration.""" from dataclasses import dataclass, field -import logging from .const import DOMAIN from .device import BroadlinkDevice -LOGGER = logging.getLogger(__name__) - @dataclass class BroadlinkData: diff --git a/homeassistant/components/broadlink/config_flow.py b/homeassistant/components/broadlink/config_flow.py index 9fe83e350c..179fac79dd 100644 --- a/homeassistant/components/broadlink/config_flow.py +++ b/homeassistant/components/broadlink/config_flow.py @@ -1,6 +1,7 @@ """Config flow for Broadlink devices.""" import errno from functools import partial +import logging import socket import broadlink as blk @@ -15,7 +16,6 @@ from homeassistant import config_entries, data_entry_flow from homeassistant.const import CONF_HOST, CONF_MAC, CONF_NAME, CONF_TIMEOUT, CONF_TYPE from homeassistant.helpers import config_validation as cv -from . import LOGGER from .const import ( # pylint: disable=unused-import DEFAULT_PORT, DEFAULT_TIMEOUT, @@ -24,6 +24,8 @@ from .const import ( # pylint: disable=unused-import ) from .helpers import format_mac +_LOGGER = logging.getLogger(__name__) + class BroadlinkFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): """Handle a Broadlink config flow.""" @@ -43,7 +45,7 @@ class BroadlinkFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): for device_type in device_types } if device.type not in supported_types: - LOGGER.error( + _LOGGER.error( "Unsupported device: %s. If it worked before, please open " "an issue at https://github.com/home-assistant/core/issues", hex(device.devtype), @@ -111,7 +113,7 @@ class BroadlinkFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): f"{format_mac(self.device.mac)}, but {format_mac(device.mac)} was given" ) - LOGGER.error("Failed to connect to the device at %s: %s", host, err_msg) + _LOGGER.error("Failed to connect to the device at %s: %s", host, err_msg) if self.source == config_entries.SOURCE_IMPORT: return self.async_abort(reason=errors["base"]) @@ -158,7 +160,7 @@ class BroadlinkFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): else: await self.async_set_unique_id(device.mac.hex()) if self.source == config_entries.SOURCE_IMPORT: - LOGGER.warning( + _LOGGER.warning( "The %s at %s is ready to be configured. Please " "click Configuration in the sidebar and click " "Integrations. Then find the device there and click " @@ -172,7 +174,7 @@ class BroadlinkFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): return await self.async_step_finish() await self.async_set_unique_id(device.mac.hex()) - LOGGER.error( + _LOGGER.error( "Failed to authenticate to the device at %s: %s", device.host[0], err_msg ) return self.async_show_form(step_id="auth", errors=errors) @@ -226,7 +228,7 @@ class BroadlinkFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): else: return await self.async_step_finish() - LOGGER.error( + _LOGGER.error( "Failed to unlock the device at %s: %s", device.host[0], err_msg ) diff --git a/homeassistant/components/brother/sensor.py b/homeassistant/components/brother/sensor.py index abc0447e71..7239976f85 100644 --- a/homeassistant/components/brother/sensor.py +++ b/homeassistant/components/brother/sensor.py @@ -1,6 +1,5 @@ """Support for the Brother service.""" from datetime import timedelta -import logging from homeassistant.const import DEVICE_CLASS_TIMESTAMP from homeassistant.helpers.update_coordinator import CoordinatorEntity @@ -37,8 +36,6 @@ ATTR_MODEL = "model" ATTR_REMAINING_PAGES = "remaining_pages" ATTR_SERIAL = "serial" -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry(hass, config_entry, async_add_entities): """Add Brother entities from a config_entry.""" diff --git a/homeassistant/components/bsblan/__init__.py b/homeassistant/components/bsblan/__init__.py index c799f8daa9..870d96dab8 100644 --- a/homeassistant/components/bsblan/__init__.py +++ b/homeassistant/components/bsblan/__init__.py @@ -1,6 +1,5 @@ """The BSB-Lan integration.""" from datetime import timedelta -import logging from bsblan import BSBLan, BSBLanConnectionError @@ -16,8 +15,6 @@ from .const import CONF_PASSKEY, DATA_BSBLAN_CLIENT, DOMAIN SCAN_INTERVAL = timedelta(seconds=30) -_LOGGER = logging.getLogger(__name__) - async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: """Set up the BSB-Lan component.""" diff --git a/homeassistant/components/buienradar/camera.py b/homeassistant/components/buienradar/camera.py index 652e37714f..44f86589b2 100644 --- a/homeassistant/components/buienradar/camera.py +++ b/homeassistant/components/buienradar/camera.py @@ -17,7 +17,7 @@ CONF_DIMENSION = "dimension" CONF_DELTA = "delta" CONF_COUNTRY = "country_code" -_LOG = logging.getLogger(__name__) +_LOGGER = logging.getLogger(__name__) # Maximum range according to docs DIM_RANGE = vol.All(vol.Coerce(int), vol.Range(min=120, max=700)) @@ -125,7 +125,7 @@ class BuienradarCam(Camera): res.raise_for_status() if res.status == 304: - _LOG.debug("HTTP 304 - success") + _LOGGER.debug("HTTP 304 - success") return True last_modified = res.headers.get("Last-Modified") @@ -133,11 +133,11 @@ class BuienradarCam(Camera): self._last_modified = last_modified self._last_image = await res.read() - _LOG.debug("HTTP 200 - Last-Modified: %s", last_modified) + _LOGGER.debug("HTTP 200 - Last-Modified: %s", last_modified) return True except (asyncio.TimeoutError, aiohttp.ClientError) as err: - _LOG.error("Failed to fetch image, %s", type(err)) + _LOGGER.error("Failed to fetch image, %s", type(err)) return False async def async_camera_image(self) -> Optional[bytes]: @@ -166,7 +166,7 @@ class BuienradarCam(Camera): async with self._condition: # can not be tested - mocked http response returns immediately if self._loading: - _LOG.debug("already loading - waiting for notification") + _LOGGER.debug("already loading - waiting for notification") await self._condition.wait() return self._last_image diff --git a/homeassistant/components/canary/alarm_control_panel.py b/homeassistant/components/canary/alarm_control_panel.py index 957b659eb7..e4dda0f9f3 100644 --- a/homeassistant/components/canary/alarm_control_panel.py +++ b/homeassistant/components/canary/alarm_control_panel.py @@ -1,5 +1,4 @@ """Support for Canary alarm.""" -import logging from typing import Callable, List from canary.api import LOCATION_MODE_AWAY, LOCATION_MODE_HOME, LOCATION_MODE_NIGHT @@ -24,8 +23,6 @@ from homeassistant.helpers.update_coordinator import CoordinatorEntity from .const import DATA_COORDINATOR, DOMAIN from .coordinator import CanaryDataUpdateCoordinator -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry( hass: HomeAssistantType, diff --git a/homeassistant/components/canary/camera.py b/homeassistant/components/canary/camera.py index 4d0a4a0d16..608dfe02b8 100644 --- a/homeassistant/components/canary/camera.py +++ b/homeassistant/components/canary/camera.py @@ -1,7 +1,6 @@ """Support for Canary camera.""" import asyncio from datetime import timedelta -import logging from typing import Callable, List from haffmpeg.camera import CameraMjpeg @@ -28,8 +27,6 @@ from .const import ( ) from .coordinator import CanaryDataUpdateCoordinator -_LOGGER = logging.getLogger(__name__) - MIN_TIME_BETWEEN_SESSION_RENEW = timedelta(seconds=90) PLATFORM_SCHEMA = vol.All( diff --git a/homeassistant/components/cert_expiry/sensor.py b/homeassistant/components/cert_expiry/sensor.py index ecf6ce1834..3d993fb2bc 100644 --- a/homeassistant/components/cert_expiry/sensor.py +++ b/homeassistant/components/cert_expiry/sensor.py @@ -1,6 +1,5 @@ """Counter for the days until an HTTPS (TLS) certificate will expire.""" from datetime import timedelta -import logging import voluptuous as vol @@ -21,8 +20,6 @@ from homeassistant.util import dt from .const import DEFAULT_PORT, DOMAIN -_LOGGER = logging.getLogger(__name__) - SCAN_INTERVAL = timedelta(hours=12) PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( diff --git a/homeassistant/components/channels/media_player.py b/homeassistant/components/channels/media_player.py index 54dc0f1837..481cdd7eca 100644 --- a/homeassistant/components/channels/media_player.py +++ b/homeassistant/components/channels/media_player.py @@ -1,6 +1,4 @@ """Support for interfacing with an instance of getchannels.com.""" -import logging - from pychannels import Channels import voluptuous as vol @@ -31,8 +29,6 @@ from homeassistant.helpers import config_validation as cv, entity_platform from .const import SERVICE_SEEK_BACKWARD, SERVICE_SEEK_BY, SERVICE_SEEK_FORWARD -_LOGGER = logging.getLogger(__name__) - DATA_CHANNELS = "channels" DEFAULT_NAME = "Channels" DEFAULT_PORT = 57000 diff --git a/homeassistant/components/circuit/__init__.py b/homeassistant/components/circuit/__init__.py index 3d97e11047..37fb5cbf6f 100644 --- a/homeassistant/components/circuit/__init__.py +++ b/homeassistant/components/circuit/__init__.py @@ -1,14 +1,9 @@ """The Unify Circuit component.""" - -import logging - import voluptuous as vol from homeassistant.const import CONF_NAME, CONF_URL from homeassistant.helpers import config_validation as cv, discovery -_LOGGER = logging.getLogger(__name__) - DOMAIN = "circuit" CONF_WEBHOOK = "webhook" diff --git a/homeassistant/components/clementine/media_player.py b/homeassistant/components/clementine/media_player.py index 7478c9a7f2..44ba5c3d60 100644 --- a/homeassistant/components/clementine/media_player.py +++ b/homeassistant/components/clementine/media_player.py @@ -1,6 +1,5 @@ """Support for Clementine Music Player as media player.""" from datetime import timedelta -import logging import time from clementineremote import ClementineRemote @@ -28,8 +27,6 @@ from homeassistant.const import ( ) import homeassistant.helpers.config_validation as cv -_LOGGER = logging.getLogger(__name__) - DEFAULT_NAME = "Clementine Remote" DEFAULT_PORT = 5500 diff --git a/homeassistant/components/cloud/__init__.py b/homeassistant/components/cloud/__init__.py index ad97284d85..b1ad55c0b0 100644 --- a/homeassistant/components/cloud/__init__.py +++ b/homeassistant/components/cloud/__init__.py @@ -1,6 +1,4 @@ """Component to integrate the Home Assistant cloud.""" -import logging - from hass_nabucasa import Cloud import voluptuous as vol @@ -43,8 +41,6 @@ from .const import ( ) from .prefs import CloudPreferences -_LOGGER = logging.getLogger(__name__) - DEFAULT_MODE = MODE_PROD SERVICE_REMOTE_CONNECT = "remote_connect" diff --git a/homeassistant/components/cloud/client.py b/homeassistant/components/cloud/client.py index 5a70948555..8e309d92c7 100644 --- a/homeassistant/components/cloud/client.py +++ b/homeassistant/components/cloud/client.py @@ -1,6 +1,5 @@ """Interface implementation for cloud client.""" import asyncio -import logging from pathlib import Path from typing import Any, Dict @@ -22,8 +21,6 @@ from . import alexa_config, google_config, utils from .const import DISPATCHER_REMOTE_UPDATE, DOMAIN from .prefs import CloudPreferences -_LOGGER = logging.getLogger(__name__) - class CloudClient(Interface): """Interface class for Home Assistant Cloud.""" diff --git a/homeassistant/components/command_line/binary_sensor.py b/homeassistant/components/command_line/binary_sensor.py index cb78b7b914..6021a5ef4f 100644 --- a/homeassistant/components/command_line/binary_sensor.py +++ b/homeassistant/components/command_line/binary_sensor.py @@ -1,6 +1,5 @@ """Support for custom shell commands to retrieve values.""" from datetime import timedelta -import logging import voluptuous as vol @@ -23,8 +22,6 @@ from homeassistant.helpers.reload import setup_reload_service from .const import CONF_COMMAND_TIMEOUT, DEFAULT_TIMEOUT, DOMAIN, PLATFORMS from .sensor import CommandSensorData -_LOGGER = logging.getLogger(__name__) - DEFAULT_NAME = "Binary Command Sensor" DEFAULT_PAYLOAD_ON = "ON" DEFAULT_PAYLOAD_OFF = "OFF" diff --git a/homeassistant/components/configurator/__init__.py b/homeassistant/components/configurator/__init__.py index d03dbe1fe7..9ddd9d76ed 100644 --- a/homeassistant/components/configurator/__init__.py +++ b/homeassistant/components/configurator/__init__.py @@ -7,7 +7,6 @@ A callback has to be provided to `request_config` which will be called when the user has submitted configuration information. """ import functools as ft -import logging from homeassistant.const import ( ATTR_ENTITY_PICTURE, @@ -19,7 +18,6 @@ from homeassistant.helpers.entity import async_generate_entity_id from homeassistant.loader import bind_hass from homeassistant.util.async_ import run_callback_threadsafe -_LOGGER = logging.getLogger(__name__) _KEY_INSTANCE = "configurator" DATA_REQUESTS = "configurator_requests" diff --git a/homeassistant/components/conversation/default_agent.py b/homeassistant/components/conversation/default_agent.py index 2f09cba2eb..d2dcf13a62 100644 --- a/homeassistant/components/conversation/default_agent.py +++ b/homeassistant/components/conversation/default_agent.py @@ -1,5 +1,4 @@ """Standard conversastion implementation for Home Assistant.""" -import logging import re from typing import Optional @@ -18,8 +17,6 @@ from .agent import AbstractConversationAgent from .const import DOMAIN from .util import create_matcher -_LOGGER = logging.getLogger(__name__) - REGEX_TURN_COMMAND = re.compile(r"turn (?P(?: |\w)+) (?P\w+)") REGEX_TYPE = type(re.compile("")) diff --git a/homeassistant/components/coronavirus/config_flow.py b/homeassistant/components/coronavirus/config_flow.py index 49183dd028..ccf2e7f2c7 100644 --- a/homeassistant/components/coronavirus/config_flow.py +++ b/homeassistant/components/coronavirus/config_flow.py @@ -1,6 +1,4 @@ """Config flow for Coronavirus integration.""" -import logging - import voluptuous as vol from homeassistant import config_entries @@ -8,8 +6,6 @@ from homeassistant import config_entries from . import get_coordinator from .const import DOMAIN, OPTION_WORLDWIDE # pylint:disable=unused-import -_LOGGER = logging.getLogger(__name__) - class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): """Handle a config flow for Coronavirus.""" diff --git a/homeassistant/components/cpuspeed/sensor.py b/homeassistant/components/cpuspeed/sensor.py index 4f35290001..df1a224bcc 100644 --- a/homeassistant/components/cpuspeed/sensor.py +++ b/homeassistant/components/cpuspeed/sensor.py @@ -1,6 +1,4 @@ """Support for displaying the current CPU speed.""" -import logging - from cpuinfo import cpuinfo import voluptuous as vol @@ -9,8 +7,6 @@ from homeassistant.const import CONF_NAME, FREQUENCY_GIGAHERTZ import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity -_LOGGER = logging.getLogger(__name__) - ATTR_BRAND = "brand" ATTR_HZ = "ghz_advertised" ATTR_ARCH = "arch" diff --git a/homeassistant/components/crimereports/sensor.py b/homeassistant/components/crimereports/sensor.py index ff65658073..8919b2d09b 100644 --- a/homeassistant/components/crimereports/sensor.py +++ b/homeassistant/components/crimereports/sensor.py @@ -1,7 +1,6 @@ """Sensor for Crime Reports.""" from collections import defaultdict from datetime import timedelta -import logging import crimereports import voluptuous as vol @@ -26,8 +25,6 @@ from homeassistant.util import slugify from homeassistant.util.distance import convert from homeassistant.util.dt import now -_LOGGER = logging.getLogger(__name__) - DOMAIN = "crimereports" EVENT_INCIDENT = f"{DOMAIN}_incident" diff --git a/homeassistant/components/daikin/switch.py b/homeassistant/components/daikin/switch.py index 0dae8848d3..b39d7f27c5 100644 --- a/homeassistant/components/daikin/switch.py +++ b/homeassistant/components/daikin/switch.py @@ -1,12 +1,8 @@ """Support for Daikin AirBase zones.""" -import logging - from homeassistant.helpers.entity import ToggleEntity from . import DOMAIN as DAIKIN_DOMAIN -_LOGGER = logging.getLogger(__name__) - ZONE_ICON = "mdi:home-circle" diff --git a/homeassistant/components/demo/__init__.py b/homeassistant/components/demo/__init__.py index afba3e2878..88e49ee36d 100644 --- a/homeassistant/components/demo/__init__.py +++ b/homeassistant/components/demo/__init__.py @@ -1,13 +1,11 @@ """Set up the demo environment that mimics interaction with devices.""" import asyncio -import logging from homeassistant import bootstrap, config_entries from homeassistant.const import ATTR_ENTITY_ID, EVENT_HOMEASSISTANT_START import homeassistant.core as ha DOMAIN = "demo" -_LOGGER = logging.getLogger(__name__) COMPONENTS_WITH_CONFIG_ENTRY_DEMO_PLATFORM = [ "air_quality", diff --git a/homeassistant/components/demo/camera.py b/homeassistant/components/demo/camera.py index 2059f25897..56726bba8b 100644 --- a/homeassistant/components/demo/camera.py +++ b/homeassistant/components/demo/camera.py @@ -1,11 +1,8 @@ """Demo camera platform that has a fake camera.""" -import logging from pathlib import Path from homeassistant.components.camera import SUPPORT_ON_OFF, Camera -_LOGGER = logging.getLogger(__name__) - async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """Set up the Demo camera platform.""" diff --git a/homeassistant/components/demo/climate.py b/homeassistant/components/demo/climate.py index 57feae64a8..a6d166662a 100644 --- a/homeassistant/components/demo/climate.py +++ b/homeassistant/components/demo/climate.py @@ -1,6 +1,4 @@ """Demo platform that offers a fake climate device.""" -import logging - from homeassistant.components.climate import ClimateEntity from homeassistant.components.climate.const import ( ATTR_TARGET_TEMP_HIGH, @@ -26,7 +24,6 @@ from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS, TEMP_FAHRENHEIT from . import DOMAIN SUPPORT_FLAGS = 0 -_LOGGER = logging.getLogger(__name__) async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): diff --git a/homeassistant/components/demo/vacuum.py b/homeassistant/components/demo/vacuum.py index 528944ae27..ebb6b57ce1 100644 --- a/homeassistant/components/demo/vacuum.py +++ b/homeassistant/components/demo/vacuum.py @@ -1,6 +1,4 @@ """Demo platform for the vacuum component.""" -import logging - from homeassistant.components.vacuum import ( ATTR_CLEANED_AREA, STATE_CLEANING, @@ -25,8 +23,6 @@ from homeassistant.components.vacuum import ( VacuumEntity, ) -_LOGGER = logging.getLogger(__name__) - SUPPORT_MINIMAL_SERVICES = SUPPORT_TURN_ON | SUPPORT_TURN_OFF SUPPORT_BASIC_SERVICES = ( diff --git a/homeassistant/components/deutsche_bahn/sensor.py b/homeassistant/components/deutsche_bahn/sensor.py index bb5adb943e..01752f0373 100644 --- a/homeassistant/components/deutsche_bahn/sensor.py +++ b/homeassistant/components/deutsche_bahn/sensor.py @@ -1,6 +1,5 @@ """Support for information about the German train system.""" from datetime import timedelta -import logging import schiene import voluptuous as vol @@ -10,8 +9,6 @@ import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity import homeassistant.util.dt as dt_util -_LOGGER = logging.getLogger(__name__) - CONF_DESTINATION = "to" CONF_START = "from" CONF_OFFSET = "offset" diff --git a/homeassistant/components/device_automation/__init__.py b/homeassistant/components/device_automation/__init__.py index 1db4af12f2..bba02147c7 100644 --- a/homeassistant/components/device_automation/__init__.py +++ b/homeassistant/components/device_automation/__init__.py @@ -1,7 +1,6 @@ """Helpers for device automations.""" import asyncio from functools import wraps -import logging from types import ModuleType from typing import Any, List, MutableMapping @@ -22,8 +21,6 @@ from .exceptions import DeviceNotFound, InvalidDeviceAutomationConfig DOMAIN = "device_automation" -_LOGGER = logging.getLogger(__name__) - TRIGGER_BASE_SCHEMA = vol.Schema( { diff --git a/homeassistant/components/devolo_home_control/binary_sensor.py b/homeassistant/components/devolo_home_control/binary_sensor.py index f884ce0219..b48f19b75b 100644 --- a/homeassistant/components/devolo_home_control/binary_sensor.py +++ b/homeassistant/components/devolo_home_control/binary_sensor.py @@ -1,6 +1,4 @@ """Platform for binary sensor integration.""" -import logging - from homeassistant.components.binary_sensor import ( DEVICE_CLASS_DOOR, DEVICE_CLASS_HEAT, @@ -15,8 +13,6 @@ from homeassistant.helpers.typing import HomeAssistantType from .const import DOMAIN from .devolo_device import DevoloDeviceEntity -_LOGGER = logging.getLogger(__name__) - DEVICE_CLASS_MAPPING = { "Water alarm": DEVICE_CLASS_MOISTURE, "Home Security": DEVICE_CLASS_MOTION, diff --git a/homeassistant/components/devolo_home_control/climate.py b/homeassistant/components/devolo_home_control/climate.py index 297e431e63..a703bdab16 100644 --- a/homeassistant/components/devolo_home_control/climate.py +++ b/homeassistant/components/devolo_home_control/climate.py @@ -1,5 +1,4 @@ """Platform for climate integration.""" -import logging from typing import List, Optional from homeassistant.components.climate import ( @@ -16,8 +15,6 @@ from homeassistant.helpers.typing import HomeAssistantType from .const import DOMAIN from .devolo_multi_level_switch import DevoloMultiLevelSwitchDeviceEntity -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry( hass: HomeAssistantType, entry: ConfigEntry, async_add_entities diff --git a/homeassistant/components/devolo_home_control/cover.py b/homeassistant/components/devolo_home_control/cover.py index 21e555e312..46f3df3431 100644 --- a/homeassistant/components/devolo_home_control/cover.py +++ b/homeassistant/components/devolo_home_control/cover.py @@ -1,6 +1,4 @@ """Platform for cover integration.""" -import logging - from homeassistant.components.cover import ( DEVICE_CLASS_BLIND, SUPPORT_CLOSE, @@ -14,8 +12,6 @@ from homeassistant.helpers.typing import HomeAssistantType from .const import DOMAIN from .devolo_multi_level_switch import DevoloMultiLevelSwitchDeviceEntity -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry( hass: HomeAssistantType, entry: ConfigEntry, async_add_entities diff --git a/homeassistant/components/devolo_home_control/devolo_multi_level_switch.py b/homeassistant/components/devolo_home_control/devolo_multi_level_switch.py index 8056192340..482edd51f1 100644 --- a/homeassistant/components/devolo_home_control/devolo_multi_level_switch.py +++ b/homeassistant/components/devolo_home_control/devolo_multi_level_switch.py @@ -1,10 +1,6 @@ """Base class for multi level switches in devolo Home Control.""" -import logging - from .devolo_device import DevoloDeviceEntity -_LOGGER = logging.getLogger(__name__) - class DevoloMultiLevelSwitchDeviceEntity(DevoloDeviceEntity): """Representation of a multi level switch device within devolo Home Control. Something like a dimmer or a thermostat.""" diff --git a/homeassistant/components/devolo_home_control/sensor.py b/homeassistant/components/devolo_home_control/sensor.py index d32a288784..c76d0c30e8 100644 --- a/homeassistant/components/devolo_home_control/sensor.py +++ b/homeassistant/components/devolo_home_control/sensor.py @@ -1,6 +1,4 @@ """Platform for sensor integration.""" -import logging - from homeassistant.components.sensor import ( DEVICE_CLASS_BATTERY, DEVICE_CLASS_HUMIDITY, @@ -15,8 +13,6 @@ from homeassistant.helpers.typing import HomeAssistantType from .const import DOMAIN from .devolo_device import DevoloDeviceEntity -_LOGGER = logging.getLogger(__name__) - DEVICE_CLASS_MAPPING = { "battery": DEVICE_CLASS_BATTERY, "temperature": DEVICE_CLASS_TEMPERATURE, diff --git a/homeassistant/components/devolo_home_control/switch.py b/homeassistant/components/devolo_home_control/switch.py index bc62dbfe2b..32da37bcc3 100644 --- a/homeassistant/components/devolo_home_control/switch.py +++ b/homeassistant/components/devolo_home_control/switch.py @@ -1,6 +1,4 @@ """Platform for switch integration.""" -import logging - from homeassistant.components.switch import SwitchEntity from homeassistant.config_entries import ConfigEntry from homeassistant.helpers.typing import HomeAssistantType @@ -8,8 +6,6 @@ from homeassistant.helpers.typing import HomeAssistantType from .const import DOMAIN from .devolo_device import DevoloDeviceEntity -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry( hass: HomeAssistantType, entry: ConfigEntry, async_add_entities diff --git a/homeassistant/components/dexcom/config_flow.py b/homeassistant/components/dexcom/config_flow.py index 26c0c92ca7..1d6d52fa0c 100644 --- a/homeassistant/components/dexcom/config_flow.py +++ b/homeassistant/components/dexcom/config_flow.py @@ -1,6 +1,4 @@ """Config flow for Dexcom integration.""" -import logging - from pydexcom import AccountError, Dexcom, SessionError import voluptuous as vol @@ -17,8 +15,6 @@ from .const import ( # pylint:disable=unused-import SERVER_US, ) -_LOGGER = logging.getLogger(__name__) - DATA_SCHEMA = vol.Schema( { vol.Required(CONF_USERNAME): str, diff --git a/homeassistant/components/dlib_face_detect/image_processing.py b/homeassistant/components/dlib_face_detect/image_processing.py index 9e56668eb3..c2bec855b9 100644 --- a/homeassistant/components/dlib_face_detect/image_processing.py +++ b/homeassistant/components/dlib_face_detect/image_processing.py @@ -1,6 +1,5 @@ """Component that will help set the Dlib face detect processing.""" import io -import logging import face_recognition # pylint: disable=import-error @@ -17,8 +16,6 @@ from homeassistant.components.image_processing import ( # noqa: F401, isort:ski PLATFORM_SCHEMA, ) -_LOGGER = logging.getLogger(__name__) - ATTR_LOCATION = "location" diff --git a/homeassistant/components/doorbird/switch.py b/homeassistant/components/doorbird/switch.py index 1e4cb81a5e..294780c81d 100644 --- a/homeassistant/components/doorbird/switch.py +++ b/homeassistant/components/doorbird/switch.py @@ -1,6 +1,5 @@ """Support for powering relays in a DoorBird video doorbell.""" import datetime -import logging from homeassistant.components.switch import SwitchEntity import homeassistant.util.dt as dt_util @@ -8,8 +7,6 @@ import homeassistant.util.dt as dt_util from .const import DOMAIN, DOOR_STATION, DOOR_STATION_INFO from .entity import DoorBirdEntity -_LOGGER = logging.getLogger(__name__) - IR_RELAY = "__ir_light__" diff --git a/homeassistant/components/dovado/sensor.py b/homeassistant/components/dovado/sensor.py index 0de159861d..46ff402788 100644 --- a/homeassistant/components/dovado/sensor.py +++ b/homeassistant/components/dovado/sensor.py @@ -1,6 +1,5 @@ """Support for sensors from the Dovado router.""" from datetime import timedelta -import logging import re import voluptuous as vol @@ -12,8 +11,6 @@ from homeassistant.helpers.entity import Entity from . import DOMAIN as DOVADO_DOMAIN -_LOGGER = logging.getLogger(__name__) - MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=30) SENSOR_UPLOAD = "upload" diff --git a/homeassistant/components/dsmr/__init__.py b/homeassistant/components/dsmr/__init__.py index 7eaa57fe8d..01c98496de 100644 --- a/homeassistant/components/dsmr/__init__.py +++ b/homeassistant/components/dsmr/__init__.py @@ -1,15 +1,12 @@ """The dsmr component.""" import asyncio from asyncio import CancelledError -import logging from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from .const import DATA_TASK, DOMAIN, PLATFORMS -_LOGGER = logging.getLogger(__name__) - async def async_setup(hass, config: dict): """Set up the DSMR platform.""" diff --git a/homeassistant/components/dublin_bus_transport/sensor.py b/homeassistant/components/dublin_bus_transport/sensor.py index 0c0d6c53ed..96e485a94e 100644 --- a/homeassistant/components/dublin_bus_transport/sensor.py +++ b/homeassistant/components/dublin_bus_transport/sensor.py @@ -5,7 +5,6 @@ For more info on the API see : https://data.gov.ie/dataset/real-time-passenger-information-rtpi-for-dublin-bus-bus-eireann-luas-and-irish-rail/resource/4b9f2c4f-6bf5-4958-a43a-f12dab04cf61 """ from datetime import datetime, timedelta -import logging import requests import voluptuous as vol @@ -16,7 +15,6 @@ import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity import homeassistant.util.dt as dt_util -_LOGGER = logging.getLogger(__name__) _RESOURCE = "https://data.dublinked.ie/cgi-bin/rtpi/realtimebusinformation" ATTR_STOP_ID = "Stop ID" diff --git a/homeassistant/components/eafm/config_flow.py b/homeassistant/components/eafm/config_flow.py index f1cf60bb97..19b10c3e6c 100644 --- a/homeassistant/components/eafm/config_flow.py +++ b/homeassistant/components/eafm/config_flow.py @@ -1,6 +1,4 @@ """Config flow to configure flood monitoring gauges.""" -import logging - from aioeafm import get_stations import voluptuous as vol @@ -10,8 +8,6 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession # pylint: disable=unused-import from .const import DOMAIN -_LOGGER = logging.getLogger(__name__) - class UKFloodsFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): """Handle a UK Environment Agency flood monitoring config flow.""" diff --git a/homeassistant/components/ecoal_boiler/sensor.py b/homeassistant/components/ecoal_boiler/sensor.py index f1998dd5b2..963f547283 100644 --- a/homeassistant/components/ecoal_boiler/sensor.py +++ b/homeassistant/components/ecoal_boiler/sensor.py @@ -1,13 +1,9 @@ """Allows reading temperatures from ecoal/esterownik.pl controller.""" -import logging - from homeassistant.const import TEMP_CELSIUS from homeassistant.helpers.entity import Entity from . import AVAILABLE_SENSORS, DATA_ECOAL_BOILER -_LOGGER = logging.getLogger(__name__) - def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the ecoal sensors.""" diff --git a/homeassistant/components/ecoal_boiler/switch.py b/homeassistant/components/ecoal_boiler/switch.py index bd3b216d70..57a8d420c4 100644 --- a/homeassistant/components/ecoal_boiler/switch.py +++ b/homeassistant/components/ecoal_boiler/switch.py @@ -1,13 +1,10 @@ """Allows to configuration ecoal (esterownik.pl) pumps as switches.""" -import logging from typing import Optional from homeassistant.components.switch import SwitchEntity from . import AVAILABLE_PUMPS, DATA_ECOAL_BOILER -_LOGGER = logging.getLogger(__name__) - def setup_platform(hass, config, add_entities, discovery_info=None): """Set up switches based on ecoal interface.""" diff --git a/homeassistant/components/edimax/switch.py b/homeassistant/components/edimax/switch.py index 17a43f3623..2c51c59fd4 100644 --- a/homeassistant/components/edimax/switch.py +++ b/homeassistant/components/edimax/switch.py @@ -1,6 +1,4 @@ """Support for Edimax switches.""" -import logging - from pyedimax.smartplug import SmartPlug import voluptuous as vol @@ -8,8 +6,6 @@ from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchEntity from homeassistant.const import CONF_HOST, CONF_NAME, CONF_PASSWORD, CONF_USERNAME import homeassistant.helpers.config_validation as cv -_LOGGER = logging.getLogger(__name__) - DOMAIN = "edimax" DEFAULT_NAME = "Edimax Smart Plug" diff --git a/homeassistant/components/egardia/binary_sensor.py b/homeassistant/components/egardia/binary_sensor.py index 6882171b67..61f43301fd 100644 --- a/homeassistant/components/egardia/binary_sensor.py +++ b/homeassistant/components/egardia/binary_sensor.py @@ -1,6 +1,4 @@ """Interfaces with Egardia/Woonveilig alarm control panel.""" -import logging - from homeassistant.components.binary_sensor import ( DEVICE_CLASS_MOTION, DEVICE_CLASS_OPENING, @@ -10,8 +8,6 @@ from homeassistant.const import STATE_OFF, STATE_ON from . import ATTR_DISCOVER_DEVICES, EGARDIA_DEVICE -_LOGGER = logging.getLogger(__name__) - EGARDIA_TYPE_TO_DEVICE_CLASS = { "IR Sensor": DEVICE_CLASS_MOTION, "Door Contact": DEVICE_CLASS_OPENING, diff --git a/homeassistant/components/elgato/__init__.py b/homeassistant/components/elgato/__init__.py index 31f8c2b59c..d6c849a4c5 100644 --- a/homeassistant/components/elgato/__init__.py +++ b/homeassistant/components/elgato/__init__.py @@ -1,6 +1,4 @@ """Support for Elgato Key Lights.""" -import logging - from elgato import Elgato, ElgatoConnectionError from homeassistant.components.light import DOMAIN as LIGHT_DOMAIN @@ -13,8 +11,6 @@ from homeassistant.helpers.typing import ConfigType from .const import DATA_ELGATO_CLIENT, DOMAIN -_LOGGER = logging.getLogger(__name__) - async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: """Set up the Elgato Key Light components.""" diff --git a/homeassistant/components/elgato/config_flow.py b/homeassistant/components/elgato/config_flow.py index 624774b9bf..a6f25b8827 100644 --- a/homeassistant/components/elgato/config_flow.py +++ b/homeassistant/components/elgato/config_flow.py @@ -1,5 +1,4 @@ """Config flow to configure the Elgato Key Light integration.""" -import logging from typing import Any, Dict, Optional from elgato import Elgato, ElgatoError, Info @@ -12,8 +11,6 @@ from homeassistant.helpers.typing import ConfigType from .const import CONF_SERIAL_NUMBER, DOMAIN # pylint: disable=unused-import -_LOGGER = logging.getLogger(__name__) - class ElgatoFlowHandler(ConfigFlow, domain=DOMAIN): """Handle a Elgato Key Light config flow.""" diff --git a/homeassistant/components/elkm1/alarm_control_panel.py b/homeassistant/components/elkm1/alarm_control_panel.py index 3bcacde64b..2e3c1ca318 100644 --- a/homeassistant/components/elkm1/alarm_control_panel.py +++ b/homeassistant/components/elkm1/alarm_control_panel.py @@ -1,6 +1,4 @@ """Each ElkM1 area will be created as a separate alarm_control_panel.""" -import logging - from elkm1_lib.const import AlarmState, ArmedStatus, ArmLevel, ArmUpState from elkm1_lib.util import username import voluptuous as vol @@ -65,8 +63,6 @@ DISPLAY_MESSAGE_SERVICE_SCHEMA = vol.Schema( } ) -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry(hass, config_entry, async_add_entities): """Set up the ElkM1 alarm platform.""" diff --git a/homeassistant/components/emby/media_player.py b/homeassistant/components/emby/media_player.py index 7872b8215a..1cbc893f98 100644 --- a/homeassistant/components/emby/media_player.py +++ b/homeassistant/components/emby/media_player.py @@ -44,8 +44,6 @@ DEFAULT_PORT = 8096 DEFAULT_SSL_PORT = 8920 DEFAULT_SSL = False -_LOGGER = logging.getLogger(__name__) - SUPPORT_EMBY = ( SUPPORT_PAUSE | SUPPORT_PREVIOUS_TRACK diff --git a/homeassistant/components/enigma2/media_player.py b/homeassistant/components/enigma2/media_player.py index a086f5ba27..b0d46d76b7 100644 --- a/homeassistant/components/enigma2/media_player.py +++ b/homeassistant/components/enigma2/media_player.py @@ -1,6 +1,4 @@ """Support for Enigma2 media players.""" -import logging - from openwebif.api import CreateDevice import voluptuous as vol @@ -32,8 +30,6 @@ from homeassistant.const import ( import homeassistant.helpers.config_validation as cv from homeassistant.helpers.config_validation import PLATFORM_SCHEMA -_LOGGER = logging.getLogger(__name__) - ATTR_MEDIA_CURRENTLY_RECORDING = "media_currently_recording" ATTR_MEDIA_DESCRIPTION = "media_description" ATTR_MEDIA_END_TIME = "media_end_time" diff --git a/homeassistant/components/enocean/light.py b/homeassistant/components/enocean/light.py index 04b234425c..b8ea753b8d 100644 --- a/homeassistant/components/enocean/light.py +++ b/homeassistant/components/enocean/light.py @@ -1,5 +1,4 @@ """Support for EnOcean light sources.""" -import logging import math import voluptuous as vol @@ -15,8 +14,6 @@ import homeassistant.helpers.config_validation as cv from .device import EnOceanEntity -_LOGGER = logging.getLogger(__name__) - CONF_SENDER_ID = "sender_id" DEFAULT_NAME = "EnOcean Light" diff --git a/homeassistant/components/enocean/sensor.py b/homeassistant/components/enocean/sensor.py index 047d0a0398..011dcdafdb 100644 --- a/homeassistant/components/enocean/sensor.py +++ b/homeassistant/components/enocean/sensor.py @@ -1,6 +1,4 @@ """Support for EnOcean sensors.""" -import logging - import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA @@ -22,8 +20,6 @@ from homeassistant.helpers.restore_state import RestoreEntity from .device import EnOceanEntity -_LOGGER = logging.getLogger(__name__) - CONF_MAX_TEMP = "max_temp" CONF_MIN_TEMP = "min_temp" CONF_RANGE_FROM = "range_from" diff --git a/homeassistant/components/enocean/switch.py b/homeassistant/components/enocean/switch.py index 6ce5fbd318..614bd8f4e4 100644 --- a/homeassistant/components/enocean/switch.py +++ b/homeassistant/components/enocean/switch.py @@ -1,6 +1,4 @@ """Support for EnOcean switches.""" -import logging - import voluptuous as vol from homeassistant.components.switch import PLATFORM_SCHEMA @@ -10,8 +8,6 @@ from homeassistant.helpers.entity import ToggleEntity from .device import EnOceanEntity -_LOGGER = logging.getLogger(__name__) - CONF_CHANNEL = "channel" DEFAULT_NAME = "EnOcean Switch" diff --git a/homeassistant/components/entur_public_transport/sensor.py b/homeassistant/components/entur_public_transport/sensor.py index 19510337d6..883b5c43d7 100644 --- a/homeassistant/components/entur_public_transport/sensor.py +++ b/homeassistant/components/entur_public_transport/sensor.py @@ -1,6 +1,5 @@ """Real-time information about public transport departures in Norway.""" from datetime import datetime, timedelta -import logging from enturclient import EnturPublicTransportData import voluptuous as vol @@ -20,8 +19,6 @@ from homeassistant.helpers.entity import Entity from homeassistant.util import Throttle import homeassistant.util.dt as dt_util -_LOGGER = logging.getLogger(__name__) - API_CLIENT_NAME = "homeassistant-homeassistant" ATTRIBUTION = "Data provided by entur.org under NLOD" diff --git a/homeassistant/components/environment_canada/camera.py b/homeassistant/components/environment_canada/camera.py index bf35da16fa..87677e8506 100644 --- a/homeassistant/components/environment_canada/camera.py +++ b/homeassistant/components/environment_canada/camera.py @@ -1,6 +1,5 @@ """Support for the Environment Canada radar imagery.""" import datetime -import logging from env_canada import ECRadar # pylint: disable=import-error import voluptuous as vol @@ -15,8 +14,6 @@ from homeassistant.const import ( import homeassistant.helpers.config_validation as cv from homeassistant.util import Throttle -_LOGGER = logging.getLogger(__name__) - ATTR_UPDATED = "updated" CONF_ATTRIBUTION = "Data provided by Environment Canada" diff --git a/homeassistant/components/environment_canada/weather.py b/homeassistant/components/environment_canada/weather.py index ca3c1f13c1..3c3dbfe6ce 100644 --- a/homeassistant/components/environment_canada/weather.py +++ b/homeassistant/components/environment_canada/weather.py @@ -1,6 +1,5 @@ """Platform for retrieving meteorological data from Environment Canada.""" import datetime -import logging import re from env_canada import ECData # pylint: disable=import-error @@ -19,8 +18,6 @@ from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME, TEMP_C import homeassistant.helpers.config_validation as cv import homeassistant.util.dt as dt -_LOGGER = logging.getLogger(__name__) - CONF_FORECAST = "forecast" CONF_ATTRIBUTION = "Data provided by Environment Canada" CONF_STATION = "station" diff --git a/homeassistant/components/epsonworkforce/sensor.py b/homeassistant/components/epsonworkforce/sensor.py index cee3d00242..7c6042c895 100644 --- a/homeassistant/components/epsonworkforce/sensor.py +++ b/homeassistant/components/epsonworkforce/sensor.py @@ -1,6 +1,5 @@ """Support for Epson Workforce Printer.""" from datetime import timedelta -import logging from epsonprinter_pkg.epsonprinterapi import EpsonPrinterAPI import voluptuous as vol @@ -11,7 +10,6 @@ from homeassistant.exceptions import PlatformNotReady import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity -_LOGGER = logging.getLogger(__name__) MONITORED_CONDITIONS = { "black": ["Ink level Black", PERCENTAGE, "mdi:water"], "photoblack": ["Ink level Photoblack", PERCENTAGE, "mdi:water"], diff --git a/homeassistant/components/esphome/camera.py b/homeassistant/components/esphome/camera.py index c3615c4726..1678281c3d 100644 --- a/homeassistant/components/esphome/camera.py +++ b/homeassistant/components/esphome/camera.py @@ -1,6 +1,5 @@ """Support for ESPHome cameras.""" import asyncio -import logging from typing import Optional from aioesphomeapi import CameraInfo, CameraState @@ -12,8 +11,6 @@ from homeassistant.helpers.typing import HomeAssistantType from . import EsphomeEntity, platform_async_setup_entry -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry( hass: HomeAssistantType, entry: ConfigEntry, async_add_entities diff --git a/homeassistant/components/esphome/climate.py b/homeassistant/components/esphome/climate.py index 46ed214afb..fe171d24fb 100644 --- a/homeassistant/components/esphome/climate.py +++ b/homeassistant/components/esphome/climate.py @@ -1,5 +1,4 @@ """Support for ESPHome climate devices.""" -import logging from typing import List, Optional from aioesphomeapi import ( @@ -64,8 +63,6 @@ from . import ( platform_async_setup_entry, ) -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry(hass, entry, async_add_entities): """Set up ESPHome climate devices based on a config entry.""" diff --git a/homeassistant/components/esphome/cover.py b/homeassistant/components/esphome/cover.py index fcf7c22a2a..4c42fe0d52 100644 --- a/homeassistant/components/esphome/cover.py +++ b/homeassistant/components/esphome/cover.py @@ -1,5 +1,4 @@ """Support for ESPHome covers.""" -import logging from typing import Optional from aioesphomeapi import CoverInfo, CoverOperation, CoverState @@ -21,8 +20,6 @@ from homeassistant.helpers.typing import HomeAssistantType from . import EsphomeEntity, esphome_state_property, platform_async_setup_entry -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry( hass: HomeAssistantType, entry: ConfigEntry, async_add_entities diff --git a/homeassistant/components/esphome/fan.py b/homeassistant/components/esphome/fan.py index 8b9b4b4922..df663f8b10 100644 --- a/homeassistant/components/esphome/fan.py +++ b/homeassistant/components/esphome/fan.py @@ -1,5 +1,4 @@ """Support for ESPHome fans.""" -import logging from typing import List, Optional from aioesphomeapi import FanInfo, FanSpeed, FanState @@ -23,8 +22,6 @@ from . import ( platform_async_setup_entry, ) -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry( hass: HomeAssistantType, entry: ConfigEntry, async_add_entities diff --git a/homeassistant/components/esphome/light.py b/homeassistant/components/esphome/light.py index 36c22f2801..adbb36188f 100644 --- a/homeassistant/components/esphome/light.py +++ b/homeassistant/components/esphome/light.py @@ -1,5 +1,4 @@ """Support for ESPHome lights.""" -import logging from typing import List, Optional, Tuple from aioesphomeapi import LightInfo, LightState @@ -29,9 +28,6 @@ import homeassistant.util.color as color_util from . import EsphomeEntity, esphome_state_property, platform_async_setup_entry -_LOGGER = logging.getLogger(__name__) - - FLASH_LENGTHS = {FLASH_SHORT: 2, FLASH_LONG: 10} diff --git a/homeassistant/components/esphome/sensor.py b/homeassistant/components/esphome/sensor.py index 0856f27071..fbf3925953 100644 --- a/homeassistant/components/esphome/sensor.py +++ b/homeassistant/components/esphome/sensor.py @@ -1,5 +1,4 @@ """Support for esphome sensors.""" -import logging import math from typing import Optional @@ -10,8 +9,6 @@ from homeassistant.helpers.typing import HomeAssistantType from . import EsphomeEntity, esphome_state_property, platform_async_setup_entry -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry( hass: HomeAssistantType, entry: ConfigEntry, async_add_entities diff --git a/homeassistant/components/esphome/switch.py b/homeassistant/components/esphome/switch.py index a3c7eeab94..3f8ca90d6c 100644 --- a/homeassistant/components/esphome/switch.py +++ b/homeassistant/components/esphome/switch.py @@ -1,5 +1,4 @@ """Support for ESPHome switches.""" -import logging from typing import Optional from aioesphomeapi import SwitchInfo, SwitchState @@ -10,8 +9,6 @@ from homeassistant.helpers.typing import HomeAssistantType from . import EsphomeEntity, esphome_state_property, platform_async_setup_entry -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry( hass: HomeAssistantType, entry: ConfigEntry, async_add_entities diff --git a/homeassistant/components/eufy/__init__.py b/homeassistant/components/eufy/__init__.py index eca637ec37..2b006deb4e 100644 --- a/homeassistant/components/eufy/__init__.py +++ b/homeassistant/components/eufy/__init__.py @@ -1,6 +1,4 @@ """Support for Eufy devices.""" -import logging - import lakeside import voluptuous as vol @@ -16,8 +14,6 @@ from homeassistant.const import ( from homeassistant.helpers import discovery import homeassistant.helpers.config_validation as cv -_LOGGER = logging.getLogger(__name__) - DOMAIN = "eufy" DEVICE_SCHEMA = vol.Schema( diff --git a/homeassistant/components/eufy/light.py b/homeassistant/components/eufy/light.py index 2c23eca483..ceff677549 100644 --- a/homeassistant/components/eufy/light.py +++ b/homeassistant/components/eufy/light.py @@ -1,6 +1,4 @@ """Support for Eufy lights.""" -import logging - import lakeside from homeassistant.components.light import ( @@ -18,8 +16,6 @@ from homeassistant.util.color import ( color_temperature_mired_to_kelvin as mired_to_kelvin, ) -_LOGGER = logging.getLogger(__name__) - EUFY_MAX_KELVIN = 6500 EUFY_MIN_KELVIN = 2700 diff --git a/homeassistant/components/eufy/switch.py b/homeassistant/components/eufy/switch.py index 586965aa42..c718c8b769 100644 --- a/homeassistant/components/eufy/switch.py +++ b/homeassistant/components/eufy/switch.py @@ -1,12 +1,8 @@ """Support for Eufy switches.""" -import logging - import lakeside from homeassistant.components.switch import SwitchEntity -_LOGGER = logging.getLogger(__name__) - def setup_platform(hass, config, add_entities, discovery_info=None): """Set up Eufy switches.""" diff --git a/homeassistant/components/fastdotcom/sensor.py b/homeassistant/components/fastdotcom/sensor.py index fe131e4dab..ad3711b131 100644 --- a/homeassistant/components/fastdotcom/sensor.py +++ b/homeassistant/components/fastdotcom/sensor.py @@ -1,6 +1,4 @@ """Support for Fast.com internet speed testing sensor.""" -import logging - from homeassistant.const import DATA_RATE_MEGABITS_PER_SECOND from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect @@ -8,8 +6,6 @@ from homeassistant.helpers.restore_state import RestoreEntity from . import DATA_UPDATED, DOMAIN as FASTDOTCOM_DOMAIN -_LOGGER = logging.getLogger(__name__) - ICON = "mdi:speedometer" diff --git a/homeassistant/components/ffmpeg/__init__.py b/homeassistant/components/ffmpeg/__init__.py index ca752208f1..70ea74dde3 100644 --- a/homeassistant/components/ffmpeg/__init__.py +++ b/homeassistant/components/ffmpeg/__init__.py @@ -1,5 +1,4 @@ """Support for FFmpeg.""" -import logging import re from haffmpeg.tools import FFVersion @@ -21,8 +20,6 @@ from homeassistant.helpers.entity import Entity DOMAIN = "ffmpeg" -_LOGGER = logging.getLogger(__name__) - SERVICE_START = "start" SERVICE_STOP = "stop" SERVICE_RESTART = "restart" diff --git a/homeassistant/components/ffmpeg/camera.py b/homeassistant/components/ffmpeg/camera.py index db3eb5621f..729c51cf94 100644 --- a/homeassistant/components/ffmpeg/camera.py +++ b/homeassistant/components/ffmpeg/camera.py @@ -1,6 +1,5 @@ """Support for Cameras with FFmpeg as decoder.""" import asyncio -import logging from haffmpeg.camera import CameraMjpeg from haffmpeg.tools import IMAGE_JPEG, ImageFrame @@ -13,8 +12,6 @@ import homeassistant.helpers.config_validation as cv from . import CONF_EXTRA_ARGUMENTS, CONF_INPUT, DATA_FFMPEG -_LOGGER = logging.getLogger(__name__) - DEFAULT_NAME = "FFmpeg" DEFAULT_ARGUMENTS = "-pred 1" diff --git a/homeassistant/components/ffmpeg_motion/binary_sensor.py b/homeassistant/components/ffmpeg_motion/binary_sensor.py index 9b4218c011..9dbe08ec64 100644 --- a/homeassistant/components/ffmpeg_motion/binary_sensor.py +++ b/homeassistant/components/ffmpeg_motion/binary_sensor.py @@ -1,6 +1,4 @@ """Provides a binary sensor which is a collection of ffmpeg tools.""" -import logging - import haffmpeg.sensor as ffmpeg_sensor import voluptuous as vol @@ -20,8 +18,6 @@ from homeassistant.const import CONF_NAME from homeassistant.core import callback import homeassistant.helpers.config_validation as cv -_LOGGER = logging.getLogger(__name__) - CONF_RESET = "reset" CONF_CHANGES = "changes" CONF_REPEAT = "repeat" diff --git a/homeassistant/components/ffmpeg_noise/binary_sensor.py b/homeassistant/components/ffmpeg_noise/binary_sensor.py index 387f25afe6..8425ed173b 100644 --- a/homeassistant/components/ffmpeg_noise/binary_sensor.py +++ b/homeassistant/components/ffmpeg_noise/binary_sensor.py @@ -1,6 +1,4 @@ """Provides a binary sensor which is a collection of ffmpeg tools.""" -import logging - import haffmpeg.sensor as ffmpeg_sensor import voluptuous as vol @@ -16,8 +14,6 @@ from homeassistant.components.ffmpeg_motion.binary_sensor import FFmpegBinarySen from homeassistant.const import CONF_NAME import homeassistant.helpers.config_validation as cv -_LOGGER = logging.getLogger(__name__) - CONF_PEAK = "peak" CONF_DURATION = "duration" CONF_RESET = "reset" diff --git a/homeassistant/components/fibaro/binary_sensor.py b/homeassistant/components/fibaro/binary_sensor.py index 21ce22ea8e..96c688bac1 100644 --- a/homeassistant/components/fibaro/binary_sensor.py +++ b/homeassistant/components/fibaro/binary_sensor.py @@ -1,6 +1,4 @@ """Support for Fibaro binary sensors.""" -import logging - from homeassistant.components.binary_sensor import ( DEVICE_CLASS_DOOR, DEVICE_CLASS_MOTION, @@ -13,8 +11,6 @@ from homeassistant.const import CONF_DEVICE_CLASS, CONF_ICON from . import FIBARO_DEVICES, FibaroDevice -_LOGGER = logging.getLogger(__name__) - SENSOR_TYPES = { "com.fibaro.floodSensor": ["Flood", "mdi:water", "flood"], "com.fibaro.motionSensor": ["Motion", "mdi:run", DEVICE_CLASS_MOTION], diff --git a/homeassistant/components/fibaro/cover.py b/homeassistant/components/fibaro/cover.py index 943df5b568..6c6c6ddfe1 100644 --- a/homeassistant/components/fibaro/cover.py +++ b/homeassistant/components/fibaro/cover.py @@ -1,6 +1,4 @@ """Support for Fibaro cover - curtains, rollershutters etc.""" -import logging - from homeassistant.components.cover import ( ATTR_POSITION, ATTR_TILT_POSITION, @@ -10,8 +8,6 @@ from homeassistant.components.cover import ( from . import FIBARO_DEVICES, FibaroDevice -_LOGGER = logging.getLogger(__name__) - def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the Fibaro covers.""" diff --git a/homeassistant/components/fibaro/light.py b/homeassistant/components/fibaro/light.py index f73347cf35..6dc69df134 100644 --- a/homeassistant/components/fibaro/light.py +++ b/homeassistant/components/fibaro/light.py @@ -1,7 +1,6 @@ """Support for Fibaro lights.""" import asyncio from functools import partial -import logging from homeassistant.components.light import ( ATTR_BRIGHTNESS, @@ -18,8 +17,6 @@ import homeassistant.util.color as color_util from . import CONF_COLOR, CONF_DIMMING, CONF_RESET_COLOR, FIBARO_DEVICES, FibaroDevice -_LOGGER = logging.getLogger(__name__) - def scaleto255(value): """Scale the input value from 0-100 to 0-255.""" diff --git a/homeassistant/components/fibaro/lock.py b/homeassistant/components/fibaro/lock.py index a0dd60d52f..17c16a566d 100644 --- a/homeassistant/components/fibaro/lock.py +++ b/homeassistant/components/fibaro/lock.py @@ -1,12 +1,8 @@ """Support for Fibaro locks.""" -import logging - from homeassistant.components.lock import DOMAIN, LockEntity from . import FIBARO_DEVICES, FibaroDevice -_LOGGER = logging.getLogger(__name__) - def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the Fibaro locks.""" diff --git a/homeassistant/components/fibaro/scene.py b/homeassistant/components/fibaro/scene.py index 714f019168..d123246862 100644 --- a/homeassistant/components/fibaro/scene.py +++ b/homeassistant/components/fibaro/scene.py @@ -1,13 +1,10 @@ """Support for Fibaro scenes.""" -import logging from typing import Any from homeassistant.components.scene import Scene from . import FIBARO_DEVICES, FibaroDevice -_LOGGER = logging.getLogger(__name__) - async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """Perform the setup for Fibaro scenes.""" diff --git a/homeassistant/components/fibaro/sensor.py b/homeassistant/components/fibaro/sensor.py index 3c81297002..4e9af8803f 100644 --- a/homeassistant/components/fibaro/sensor.py +++ b/homeassistant/components/fibaro/sensor.py @@ -1,6 +1,4 @@ """Support for Fibaro sensors.""" -import logging - from homeassistant.components.sensor import DOMAIN from homeassistant.const import ( CONCENTRATION_PARTS_PER_MILLION, @@ -39,8 +37,6 @@ SENSOR_TYPES = { "com.fibaro.lightSensor": ["Light", LIGHT_LUX, None, DEVICE_CLASS_ILLUMINANCE], } -_LOGGER = logging.getLogger(__name__) - def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the Fibaro controller devices.""" diff --git a/homeassistant/components/fibaro/switch.py b/homeassistant/components/fibaro/switch.py index a38f642775..331d6b8fc9 100644 --- a/homeassistant/components/fibaro/switch.py +++ b/homeassistant/components/fibaro/switch.py @@ -1,13 +1,9 @@ """Support for Fibaro switches.""" -import logging - from homeassistant.components.switch import DOMAIN, SwitchEntity from homeassistant.util import convert from . import FIBARO_DEVICES, FibaroDevice -_LOGGER = logging.getLogger(__name__) - def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the Fibaro switches.""" diff --git a/homeassistant/components/file/notify.py b/homeassistant/components/file/notify.py index 528d44bbb8..35c8ebf7df 100644 --- a/homeassistant/components/file/notify.py +++ b/homeassistant/components/file/notify.py @@ -1,5 +1,4 @@ """Support for file notification.""" -import logging import os import voluptuous as vol @@ -23,8 +22,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( } ) -_LOGGER = logging.getLogger(__name__) - def get_service(hass, config, discovery_info=None): """Get the file notification service.""" diff --git a/homeassistant/components/futurenow/light.py b/homeassistant/components/futurenow/light.py index 2bccd38688..6b05c96416 100644 --- a/homeassistant/components/futurenow/light.py +++ b/homeassistant/components/futurenow/light.py @@ -1,7 +1,4 @@ """Support for FutureNow Ethernet unit outputs as Lights.""" - -import logging - import pyfnip import voluptuous as vol @@ -14,8 +11,6 @@ from homeassistant.components.light import ( from homeassistant.const import CONF_DEVICES, CONF_HOST, CONF_NAME, CONF_PORT import homeassistant.helpers.config_validation as cv -_LOGGER = logging.getLogger(__name__) - CONF_DRIVER = "driver" CONF_DRIVER_FNIP6X10AD = "FNIP6x10ad" CONF_DRIVER_FNIP8X10A = "FNIP8x10a" diff --git a/homeassistant/components/gc100/__init__.py b/homeassistant/components/gc100/__init__.py index 36779b28df..77380afc2b 100644 --- a/homeassistant/components/gc100/__init__.py +++ b/homeassistant/components/gc100/__init__.py @@ -1,14 +1,10 @@ """Support for controlling Global Cache gc100.""" -import logging - import gc100 import voluptuous as vol from homeassistant.const import CONF_HOST, CONF_PORT, EVENT_HOMEASSISTANT_STOP import homeassistant.helpers.config_validation as cv -_LOGGER = logging.getLogger(__name__) - CONF_PORTS = "ports" DEFAULT_PORT = 4998 diff --git a/homeassistant/components/geizhals/sensor.py b/homeassistant/components/geizhals/sensor.py index 0d83921cb2..43e41e25e5 100644 --- a/homeassistant/components/geizhals/sensor.py +++ b/homeassistant/components/geizhals/sensor.py @@ -1,6 +1,5 @@ """Parse prices of a device from geizhals.""" from datetime import timedelta -import logging from geizhals import Device, Geizhals import voluptuous as vol @@ -11,8 +10,6 @@ import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity from homeassistant.util import Throttle -_LOGGER = logging.getLogger(__name__) - CONF_DESCRIPTION = "description" CONF_PRODUCT_ID = "product_id" CONF_LOCALE = "locale" diff --git a/homeassistant/components/geofency/__init__.py b/homeassistant/components/geofency/__init__.py index 50a7d8ac57..e0a3dc4781 100644 --- a/homeassistant/components/geofency/__init__.py +++ b/homeassistant/components/geofency/__init__.py @@ -1,6 +1,4 @@ """Support for Geofency.""" -import logging - from aiohttp import web import voluptuous as vol @@ -21,8 +19,6 @@ from homeassistant.util import slugify from .const import DOMAIN -_LOGGER = logging.getLogger(__name__) - CONF_MOBILE_BEACONS = "mobile_beacons" CONFIG_SCHEMA = vol.Schema( diff --git a/homeassistant/components/geofency/device_tracker.py b/homeassistant/components/geofency/device_tracker.py index e730f108f8..f090f516fb 100644 --- a/homeassistant/components/geofency/device_tracker.py +++ b/homeassistant/components/geofency/device_tracker.py @@ -1,6 +1,4 @@ """Support for the Geofency device tracker platform.""" -import logging - from homeassistant.components.device_tracker import SOURCE_TYPE_GPS from homeassistant.components.device_tracker.config_entry import TrackerEntity from homeassistant.const import ATTR_LATITUDE, ATTR_LONGITUDE @@ -11,8 +9,6 @@ from homeassistant.helpers.restore_state import RestoreEntity from . import DOMAIN as GF_DOMAIN, TRACKER_UPDATE -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry(hass, config_entry, async_add_entities): """Set up Geofency config entry.""" diff --git a/homeassistant/components/geonetnz_volcano/config_flow.py b/homeassistant/components/geonetnz_volcano/config_flow.py index c19e7d4b30..9ea8b378fc 100644 --- a/homeassistant/components/geonetnz_volcano/config_flow.py +++ b/homeassistant/components/geonetnz_volcano/config_flow.py @@ -1,6 +1,4 @@ """Config flow to configure the GeoNet NZ Volcano integration.""" -import logging - import voluptuous as vol from homeassistant import config_entries @@ -18,8 +16,6 @@ from homeassistant.helpers import config_validation as cv from .const import DEFAULT_RADIUS, DEFAULT_SCAN_INTERVAL, DOMAIN -_LOGGER = logging.getLogger(__name__) - @callback def configured_instances(hass): diff --git a/homeassistant/components/glances/sensor.py b/homeassistant/components/glances/sensor.py index deb8650cd4..fb36312cf1 100644 --- a/homeassistant/components/glances/sensor.py +++ b/homeassistant/components/glances/sensor.py @@ -1,6 +1,4 @@ """Support gathering system information of hosts which are running glances.""" -import logging - from homeassistant.const import CONF_NAME, STATE_UNAVAILABLE from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect @@ -8,8 +6,6 @@ from homeassistant.helpers.entity import Entity from .const import DATA_UPDATED, DOMAIN, SENSOR_TYPES -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry(hass, config_entry, async_add_entities): """Set up the Glances sensors.""" diff --git a/homeassistant/components/gogogate2/config_flow.py b/homeassistant/components/gogogate2/config_flow.py index 3642e28cca..5779ccaaa6 100644 --- a/homeassistant/components/gogogate2/config_flow.py +++ b/homeassistant/components/gogogate2/config_flow.py @@ -1,6 +1,5 @@ """Config flow for Gogogate2.""" import dataclasses -import logging import re from gogogate2_api.common import AbstractInfoResponse, ApiError @@ -20,8 +19,6 @@ from .common import get_api from .const import DEVICE_TYPE_GOGOGATE2, DEVICE_TYPE_ISMARTGATE from .const import DOMAIN # pylint: disable=unused-import -_LOGGER = logging.getLogger(__name__) - class Gogogate2FlowHandler(ConfigFlow, domain=DOMAIN): """Gogogate2 config flow.""" diff --git a/homeassistant/components/gogogate2/cover.py b/homeassistant/components/gogogate2/cover.py index e748b420ed..08520ad46e 100644 --- a/homeassistant/components/gogogate2/cover.py +++ b/homeassistant/components/gogogate2/cover.py @@ -1,5 +1,4 @@ """Support for Gogogate2 garage Doors.""" -import logging from typing import Callable, List, Optional from gogogate2_api.common import ( @@ -36,9 +35,6 @@ from .common import ( ) from .const import DEVICE_TYPE_GOGOGATE2, DEVICE_TYPE_ISMARTGATE, DOMAIN, MANUFACTURER -_LOGGER = logging.getLogger(__name__) - - COVER_SCHEMA = vol.Schema( { vol.Required(CONF_IP_ADDRESS): cv.string, diff --git a/homeassistant/components/gpslogger/__init__.py b/homeassistant/components/gpslogger/__init__.py index f09a7f86d2..d230d3dedc 100644 --- a/homeassistant/components/gpslogger/__init__.py +++ b/homeassistant/components/gpslogger/__init__.py @@ -1,6 +1,4 @@ """Support for GPSLogger.""" -import logging - from aiohttp import web import voluptuous as vol @@ -30,8 +28,6 @@ from .const import ( DOMAIN, ) -_LOGGER = logging.getLogger(__name__) - TRACKER_UPDATE = f"{DOMAIN}_tracker_update" diff --git a/homeassistant/components/greeneye_monitor/sensor.py b/homeassistant/components/greeneye_monitor/sensor.py index 42f7c0334b..c8cd1669f0 100644 --- a/homeassistant/components/greeneye_monitor/sensor.py +++ b/homeassistant/components/greeneye_monitor/sensor.py @@ -1,6 +1,4 @@ """Support for the sensors in a GreenEye Monitor.""" -import logging - from homeassistant.const import ( CONF_NAME, CONF_TEMPERATURE_UNIT, @@ -27,8 +25,6 @@ from . import ( SENSOR_TYPE_VOLTAGE, ) -_LOGGER = logging.getLogger(__name__) - DATA_PULSES = "pulses" DATA_WATT_SECONDS = "watt_seconds" diff --git a/homeassistant/components/griddy/sensor.py b/homeassistant/components/griddy/sensor.py index 7a155586fa..f8a900d92b 100644 --- a/homeassistant/components/griddy/sensor.py +++ b/homeassistant/components/griddy/sensor.py @@ -1,13 +1,9 @@ """Support for August sensors.""" -import logging - from homeassistant.const import CURRENCY_CENT, ENERGY_KILO_WATT_HOUR from homeassistant.helpers.update_coordinator import CoordinatorEntity from .const import CONF_LOADZONE, DOMAIN -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry(hass, config_entry, async_add_entities): """Set up the August sensors.""" diff --git a/homeassistant/components/group/cover.py b/homeassistant/components/group/cover.py index ab2ad65713..25a8665db9 100644 --- a/homeassistant/components/group/cover.py +++ b/homeassistant/components/group/cover.py @@ -1,5 +1,4 @@ """This platform allows several cover to be grouped into one cover.""" -import logging from typing import Dict, Optional, Set import voluptuous as vol @@ -48,8 +47,6 @@ from . import GroupEntity # mypy: allow-incomplete-defs, allow-untyped-calls, allow-untyped-defs # mypy: no-check-untyped-defs -_LOGGER = logging.getLogger(__name__) - KEY_OPEN_CLOSE = "open_close" KEY_STOP = "stop" KEY_POSITION = "position" diff --git a/homeassistant/components/group/light.py b/homeassistant/components/group/light.py index 007e05edfb..6d90312e64 100644 --- a/homeassistant/components/group/light.py +++ b/homeassistant/components/group/light.py @@ -2,7 +2,6 @@ import asyncio from collections import Counter import itertools -import logging from typing import Any, Callable, Iterator, List, Optional, Tuple, cast import voluptuous as vol @@ -47,8 +46,6 @@ from . import GroupEntity # mypy: allow-incomplete-defs, allow-untyped-calls, allow-untyped-defs # mypy: no-check-untyped-defs -_LOGGER = logging.getLogger(__name__) - DEFAULT_NAME = "Light Group" PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( diff --git a/homeassistant/components/group/notify.py b/homeassistant/components/group/notify.py index 2209e0e233..97c019163e 100644 --- a/homeassistant/components/group/notify.py +++ b/homeassistant/components/group/notify.py @@ -2,7 +2,6 @@ import asyncio from collections.abc import Mapping from copy import deepcopy -import logging import voluptuous as vol @@ -18,8 +17,6 @@ import homeassistant.helpers.config_validation as cv # mypy: allow-untyped-calls, allow-untyped-defs, no-check-untyped-defs -_LOGGER = logging.getLogger(__name__) - CONF_SERVICES = "services" PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( diff --git a/homeassistant/components/habitica/sensor.py b/homeassistant/components/habitica/sensor.py index 1fa4ad63b3..f885aa832c 100644 --- a/homeassistant/components/habitica/sensor.py +++ b/homeassistant/components/habitica/sensor.py @@ -1,13 +1,10 @@ """Support for Habitica sensors.""" from datetime import timedelta -import logging from homeassistant.components import habitica from homeassistant.helpers.entity import Entity from homeassistant.util import Throttle -_LOGGER = logging.getLogger(__name__) - MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=15) diff --git a/homeassistant/components/hangouts/notify.py b/homeassistant/components/hangouts/notify.py index 01e4208fd4..77dcec8111 100644 --- a/homeassistant/components/hangouts/notify.py +++ b/homeassistant/components/hangouts/notify.py @@ -1,6 +1,4 @@ """Support for Hangouts notifications.""" -import logging - import voluptuous as vol from homeassistant.components.notify import ( @@ -18,8 +16,6 @@ from .const import ( TARGETS_SCHEMA, ) -_LOGGER = logging.getLogger(__name__) - PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( {vol.Required(CONF_DEFAULT_CONVERSATIONS): [TARGETS_SCHEMA]} ) diff --git a/homeassistant/components/harman_kardon_avr/media_player.py b/homeassistant/components/harman_kardon_avr/media_player.py index 30a857f8b9..bd804fbe77 100644 --- a/homeassistant/components/harman_kardon_avr/media_player.py +++ b/homeassistant/components/harman_kardon_avr/media_player.py @@ -1,6 +1,4 @@ """Support for interface with an Harman/Kardon or JBL AVR.""" -import logging - import hkavr import voluptuous as vol @@ -15,8 +13,6 @@ from homeassistant.components.media_player.const import ( from homeassistant.const import CONF_HOST, CONF_NAME, CONF_PORT, STATE_OFF, STATE_ON import homeassistant.helpers.config_validation as cv -_LOGGER = logging.getLogger(__name__) - DEFAULT_NAME = "Harman Kardon AVR" DEFAULT_PORT = 10025 diff --git a/homeassistant/components/harmony/__init__.py b/homeassistant/components/harmony/__init__.py index 5bc4a13291..e425b5ce94 100644 --- a/homeassistant/components/harmony/__init__.py +++ b/homeassistant/components/harmony/__init__.py @@ -1,6 +1,5 @@ """The Logitech Harmony Hub integration.""" import asyncio -import logging from homeassistant.components.remote import ( ATTR_ACTIVITY, @@ -16,8 +15,6 @@ from homeassistant.helpers.dispatcher import async_dispatcher_send from .const import DOMAIN, HARMONY_OPTIONS_UPDATE, PLATFORMS from .remote import HarmonyRemote -_LOGGER = logging.getLogger(__name__) - async def async_setup(hass: HomeAssistant, config: dict): """Set up the Logitech Harmony Hub component.""" diff --git a/homeassistant/components/hisense_aehw4a1/config_flow.py b/homeassistant/components/hisense_aehw4a1/config_flow.py index 52926ba796..326b5c5895 100644 --- a/homeassistant/components/hisense_aehw4a1/config_flow.py +++ b/homeassistant/components/hisense_aehw4a1/config_flow.py @@ -1,6 +1,4 @@ """Config flow for Hisense AEH-W4A1 integration.""" -import logging - from pyaehw4a1.aehw4a1 import AehW4a1 from homeassistant import config_entries @@ -8,8 +6,6 @@ from homeassistant.helpers import config_entry_flow from .const import DOMAIN -_LOGGER = logging.getLogger(__name__) - async def _async_has_devices(hass): """Return if there are devices that can be discovered.""" diff --git a/homeassistant/components/home_connect/config_flow.py b/homeassistant/components/home_connect/config_flow.py index 4a714bac73..9d7cefc00e 100644 --- a/homeassistant/components/home_connect/config_flow.py +++ b/homeassistant/components/home_connect/config_flow.py @@ -6,8 +6,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/homeassistant/triggers/event.py b/homeassistant/components/homeassistant/triggers/event.py index 1bd6a37cd1..c5baf6ca4b 100644 --- a/homeassistant/components/homeassistant/triggers/event.py +++ b/homeassistant/components/homeassistant/triggers/event.py @@ -1,6 +1,4 @@ """Offer event listening automation rules.""" -import logging - import voluptuous as vol from homeassistant.const import CONF_PLATFORM @@ -13,8 +11,6 @@ CONF_EVENT_TYPE = "event_type" CONF_EVENT_DATA = "event_data" CONF_EVENT_CONTEXT = "context" -_LOGGER = logging.getLogger(__name__) - TRIGGER_SCHEMA = vol.Schema( { vol.Required(CONF_PLATFORM): "event", diff --git a/homeassistant/components/homeassistant/triggers/homeassistant.py b/homeassistant/components/homeassistant/triggers/homeassistant.py index 0b4fd8a08c..2f3ebfb82d 100644 --- a/homeassistant/components/homeassistant/triggers/homeassistant.py +++ b/homeassistant/components/homeassistant/triggers/homeassistant.py @@ -1,6 +1,4 @@ """Offer Home Assistant core automation rules.""" -import logging - import voluptuous as vol from homeassistant.const import CONF_EVENT, CONF_PLATFORM, EVENT_HOMEASSISTANT_STOP @@ -10,7 +8,6 @@ from homeassistant.core import HassJob, callback EVENT_START = "start" EVENT_SHUTDOWN = "shutdown" -_LOGGER = logging.getLogger(__name__) TRIGGER_SCHEMA = vol.Schema( { diff --git a/homeassistant/components/homeassistant/triggers/time.py b/homeassistant/components/homeassistant/triggers/time.py index baa5cc59a5..20abcedb34 100644 --- a/homeassistant/components/homeassistant/triggers/time.py +++ b/homeassistant/components/homeassistant/triggers/time.py @@ -1,7 +1,6 @@ """Offer time listening automation rules.""" from datetime import datetime from functools import partial -import logging import voluptuous as vol @@ -17,8 +16,6 @@ import homeassistant.util.dt as dt_util # mypy: allow-untyped-defs, no-check-untyped-defs -_LOGGER = logging.getLogger(__name__) - _TIME_TRIGGER_SCHEMA = vol.Any( cv.time, vol.All(str, cv.entity_domain("input_datetime")), diff --git a/homeassistant/components/homeassistant/triggers/time_pattern.py b/homeassistant/components/homeassistant/triggers/time_pattern.py index b79c007436..3107d590d9 100644 --- a/homeassistant/components/homeassistant/triggers/time_pattern.py +++ b/homeassistant/components/homeassistant/triggers/time_pattern.py @@ -1,6 +1,4 @@ """Offer time listening automation rules.""" -import logging - import voluptuous as vol from homeassistant.const import CONF_PLATFORM @@ -14,8 +12,6 @@ CONF_HOURS = "hours" CONF_MINUTES = "minutes" CONF_SECONDS = "seconds" -_LOGGER = logging.getLogger(__name__) - class TimePattern: """Validate a time pattern value. diff --git a/homeassistant/components/homekit/aidmanager.py b/homeassistant/components/homekit/aidmanager.py index 31c341c914..220014d7d4 100644 --- a/homeassistant/components/homekit/aidmanager.py +++ b/homeassistant/components/homekit/aidmanager.py @@ -9,7 +9,6 @@ can't change the hash without causing breakages for HA users. This module generates and stores them in a HA storage. """ -import logging import random from fnvhash import fnv1a_32 @@ -32,8 +31,6 @@ INVALID_AIDS = (0, 1) AID_MIN = 2 AID_MAX = 18446744073709551615 -_LOGGER = logging.getLogger(__name__) - def get_system_unique_id(entity: RegistryEntry): """Determine the system wide unique_id for an entity.""" diff --git a/homeassistant/components/homekit/config_flow.py b/homeassistant/components/homekit/config_flow.py index 3d35b68527..8332e9cec7 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 @@ -32,8 +31,6 @@ from .const import ( from .const import DOMAIN # pylint:disable=unused-import from .util import find_next_available_port -_LOGGER = logging.getLogger(__name__) - CONF_CAMERA_COPY = "camera_copy" CONF_DOMAINS = "domains" diff --git a/homeassistant/components/homekit_controller/__init__.py b/homeassistant/components/homekit_controller/__init__.py index 6a9fb126c2..b7139741be 100644 --- a/homeassistant/components/homekit_controller/__init__.py +++ b/homeassistant/components/homekit_controller/__init__.py @@ -1,5 +1,4 @@ """Support for Homekit device discovery.""" -import logging from typing import Any, Dict import aiohomekit @@ -20,8 +19,6 @@ from .connection import HKDevice from .const import CONTROLLER, DOMAIN, ENTITY_MAP, KNOWN_DEVICES, TRIGGERS from .storage import EntityMapStorage -_LOGGER = logging.getLogger(__name__) - def escape_characteristic_name(char_name): """Escape any dash or dots in a characteristics name.""" diff --git a/homeassistant/components/homekit_controller/alarm_control_panel.py b/homeassistant/components/homekit_controller/alarm_control_panel.py index 333eb46243..bf3a5f2714 100644 --- a/homeassistant/components/homekit_controller/alarm_control_panel.py +++ b/homeassistant/components/homekit_controller/alarm_control_panel.py @@ -1,6 +1,4 @@ """Support for Homekit Alarm Control Panel.""" -import logging - from aiohomekit.model.characteristics import CharacteristicsTypes from homeassistant.components.alarm_control_panel import AlarmControlPanelEntity @@ -23,8 +21,6 @@ from . import KNOWN_DEVICES, HomeKitEntity ICON = "mdi:security" -_LOGGER = logging.getLogger(__name__) - CURRENT_STATE_MAP = { 0: STATE_ALARM_ARMED_HOME, 1: STATE_ALARM_ARMED_AWAY, diff --git a/homeassistant/components/homekit_controller/binary_sensor.py b/homeassistant/components/homekit_controller/binary_sensor.py index 29fddf9918..c718f7dc11 100644 --- a/homeassistant/components/homekit_controller/binary_sensor.py +++ b/homeassistant/components/homekit_controller/binary_sensor.py @@ -1,6 +1,4 @@ """Support for Homekit motion sensors.""" -import logging - from aiohomekit.model.characteristics import CharacteristicsTypes from homeassistant.components.binary_sensor import ( @@ -16,8 +14,6 @@ from homeassistant.core import callback from . import KNOWN_DEVICES, HomeKitEntity -_LOGGER = logging.getLogger(__name__) - class HomeKitMotionSensor(HomeKitEntity, BinarySensorEntity): """Representation of a Homekit motion sensor.""" diff --git a/homeassistant/components/homekit_controller/cover.py b/homeassistant/components/homekit_controller/cover.py index 5f43b3e856..db824ea060 100644 --- a/homeassistant/components/homekit_controller/cover.py +++ b/homeassistant/components/homekit_controller/cover.py @@ -1,6 +1,4 @@ """Support for Homekit covers.""" -import logging - from aiohomekit.model.characteristics import CharacteristicsTypes from homeassistant.components.cover import ( @@ -22,8 +20,6 @@ from . import KNOWN_DEVICES, HomeKitEntity STATE_STOPPED = "stopped" -_LOGGER = logging.getLogger(__name__) - CURRENT_GARAGE_STATE_MAP = { 0: STATE_OPEN, 1: STATE_CLOSED, diff --git a/homeassistant/components/homekit_controller/fan.py b/homeassistant/components/homekit_controller/fan.py index e3b392ea10..5fe119f65b 100644 --- a/homeassistant/components/homekit_controller/fan.py +++ b/homeassistant/components/homekit_controller/fan.py @@ -1,6 +1,4 @@ """Support for Homekit fans.""" -import logging - from aiohomekit.model.characteristics import CharacteristicsTypes from homeassistant.components.fan import ( @@ -19,8 +17,6 @@ from homeassistant.core import callback from . import KNOWN_DEVICES, HomeKitEntity -_LOGGER = logging.getLogger(__name__) - # 0 is clockwise, 1 is counter-clockwise. The match to forward and reverse is so that # its consistent with homeassistant.components.homekit. DIRECTION_TO_HK = { diff --git a/homeassistant/components/homekit_controller/light.py b/homeassistant/components/homekit_controller/light.py index b024efe612..3f9f6f3de2 100644 --- a/homeassistant/components/homekit_controller/light.py +++ b/homeassistant/components/homekit_controller/light.py @@ -1,6 +1,4 @@ """Support for Homekit lights.""" -import logging - from aiohomekit.model.characteristics import CharacteristicsTypes from homeassistant.components.light import ( @@ -16,8 +14,6 @@ from homeassistant.core import callback from . import KNOWN_DEVICES, HomeKitEntity -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry(hass, config_entry, async_add_entities): """Set up Homekit lightbulb.""" diff --git a/homeassistant/components/homekit_controller/lock.py b/homeassistant/components/homekit_controller/lock.py index 93bb4f1568..52e9947d98 100644 --- a/homeassistant/components/homekit_controller/lock.py +++ b/homeassistant/components/homekit_controller/lock.py @@ -1,6 +1,4 @@ """Support for HomeKit Controller locks.""" -import logging - from aiohomekit.model.characteristics import CharacteristicsTypes from homeassistant.components.lock import LockEntity @@ -9,8 +7,6 @@ from homeassistant.core import callback from . import KNOWN_DEVICES, HomeKitEntity -_LOGGER = logging.getLogger(__name__) - STATE_JAMMED = "jammed" CURRENT_STATE_MAP = {0: STATE_UNLOCKED, 1: STATE_LOCKED, 2: STATE_JAMMED, 3: None} diff --git a/homeassistant/components/homekit_controller/switch.py b/homeassistant/components/homekit_controller/switch.py index 32c7fd8515..3408d036b5 100644 --- a/homeassistant/components/homekit_controller/switch.py +++ b/homeassistant/components/homekit_controller/switch.py @@ -1,6 +1,4 @@ """Support for Homekit switches.""" -import logging - from aiohomekit.model.characteristics import ( CharacteristicsTypes, InUseValues, @@ -14,8 +12,6 @@ from . import KNOWN_DEVICES, HomeKitEntity OUTLET_IN_USE = "outlet_in_use" -_LOGGER = logging.getLogger(__name__) - ATTR_IN_USE = "in_use" ATTR_IS_CONFIGURED = "is_configured" ATTR_REMAINING_DURATION = "remaining_duration" diff --git a/homeassistant/components/homematic/binary_sensor.py b/homeassistant/components/homematic/binary_sensor.py index 7315a266a3..286c7372fd 100644 --- a/homeassistant/components/homematic/binary_sensor.py +++ b/homeassistant/components/homematic/binary_sensor.py @@ -1,6 +1,4 @@ """Support for HomeMatic binary sensors.""" -import logging - from homeassistant.components.binary_sensor import ( DEVICE_CLASS_BATTERY, DEVICE_CLASS_MOTION, @@ -13,8 +11,6 @@ from homeassistant.components.binary_sensor import ( from .const import ATTR_DISCOVER_DEVICES, ATTR_DISCOVERY_TYPE, DISCOVER_BATTERY from .entity import HMDevice -_LOGGER = logging.getLogger(__name__) - SENSOR_TYPES_CLASS = { "IPShutterContact": DEVICE_CLASS_OPENING, "IPShutterContactSabotage": DEVICE_CLASS_OPENING, diff --git a/homeassistant/components/homematic/climate.py b/homeassistant/components/homematic/climate.py index 243e1782a3..3b77b90ff2 100644 --- a/homeassistant/components/homematic/climate.py +++ b/homeassistant/components/homematic/climate.py @@ -1,6 +1,4 @@ """Support for Homematic thermostats.""" -import logging - from homeassistant.components.climate import ClimateEntity from homeassistant.components.climate.const import ( HVAC_MODE_AUTO, @@ -17,8 +15,6 @@ from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS from .const import ATTR_DISCOVER_DEVICES, HM_ATTRIBUTE_SUPPORT from .entity import HMDevice -_LOGGER = logging.getLogger(__name__) - HM_TEMP_MAP = ["ACTUAL_TEMPERATURE", "TEMPERATURE"] HM_HUMI_MAP = ["ACTUAL_HUMIDITY", "HUMIDITY"] diff --git a/homeassistant/components/homematic/cover.py b/homeassistant/components/homematic/cover.py index c0074d349d..e9f2943b53 100644 --- a/homeassistant/components/homematic/cover.py +++ b/homeassistant/components/homematic/cover.py @@ -1,6 +1,4 @@ """Support for HomeMatic covers.""" -import logging - from homeassistant.components.cover import ( ATTR_POSITION, ATTR_TILT_POSITION, @@ -11,8 +9,6 @@ from homeassistant.components.cover import ( from .const import ATTR_DEVICE_TYPE, ATTR_DISCOVER_DEVICES from .entity import HMDevice -_LOGGER = logging.getLogger(__name__) - HM_GARAGE = ("IPGarage",) diff --git a/homeassistant/components/homematic/light.py b/homeassistant/components/homematic/light.py index 7ef632dae8..11731e2ae5 100644 --- a/homeassistant/components/homematic/light.py +++ b/homeassistant/components/homematic/light.py @@ -1,6 +1,4 @@ """Support for Homematic lights.""" -import logging - from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, @@ -17,8 +15,6 @@ from homeassistant.components.light import ( from .const import ATTR_DISCOVER_DEVICES from .entity import HMDevice -_LOGGER = logging.getLogger(__name__) - SUPPORT_HOMEMATIC = SUPPORT_BRIGHTNESS diff --git a/homeassistant/components/homematic/lock.py b/homeassistant/components/homematic/lock.py index 9a705627fa..fa907ce939 100644 --- a/homeassistant/components/homematic/lock.py +++ b/homeassistant/components/homematic/lock.py @@ -1,13 +1,9 @@ """Support for Homematic locks.""" -import logging - from homeassistant.components.lock import SUPPORT_OPEN, LockEntity from .const import ATTR_DISCOVER_DEVICES from .entity import HMDevice -_LOGGER = logging.getLogger(__name__) - def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the Homematic lock platform.""" diff --git a/homeassistant/components/homematic/notify.py b/homeassistant/components/homematic/notify.py index 3d48adc6df..a8ae59d4c3 100644 --- a/homeassistant/components/homematic/notify.py +++ b/homeassistant/components/homematic/notify.py @@ -1,6 +1,4 @@ """Notification support for Homematic.""" -import logging - import voluptuous as vol from homeassistant.components.notify import ( @@ -21,8 +19,6 @@ from .const import ( SERVICE_SET_DEVICE_VALUE, ) -_LOGGER = logging.getLogger(__name__) - PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( { vol.Required(ATTR_ADDRESS): vol.All(cv.string, vol.Upper), diff --git a/homeassistant/components/homematic/switch.py b/homeassistant/components/homematic/switch.py index afde1ac852..ff3bbe6103 100644 --- a/homeassistant/components/homematic/switch.py +++ b/homeassistant/components/homematic/switch.py @@ -1,13 +1,9 @@ """Support for HomeMatic switches.""" -import logging - from homeassistant.components.switch import SwitchEntity from .const import ATTR_DISCOVER_DEVICES from .entity import HMDevice -_LOGGER = logging.getLogger(__name__) - def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the HomeMatic switch platform.""" diff --git a/homeassistant/components/homematicip_cloud/__init__.py b/homeassistant/components/homematicip_cloud/__init__.py index e53307c533..2b078966ee 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 @@ -22,8 +20,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/homematicip_cloud/binary_sensor.py b/homeassistant/components/homematicip_cloud/binary_sensor.py index 3c04fd7410..da5bf844e0 100644 --- a/homeassistant/components/homematicip_cloud/binary_sensor.py +++ b/homeassistant/components/homematicip_cloud/binary_sensor.py @@ -1,5 +1,4 @@ """Support for HomematicIP Cloud binary sensor.""" -import logging from typing import Any, Dict from homematicip.aio.device import ( @@ -45,8 +44,6 @@ from homeassistant.helpers.typing import HomeAssistantType from . import DOMAIN as HMIPC_DOMAIN, HomematicipGenericEntity from .hap import HomematicipHAP -_LOGGER = logging.getLogger(__name__) - ATTR_ACCELERATION_SENSOR_MODE = "acceleration_sensor_mode" ATTR_ACCELERATION_SENSOR_NEUTRAL_POSITION = "acceleration_sensor_neutral_position" ATTR_ACCELERATION_SENSOR_SENSITIVITY = "acceleration_sensor_sensitivity" diff --git a/homeassistant/components/homematicip_cloud/climate.py b/homeassistant/components/homematicip_cloud/climate.py index 3f9cdcbcbd..dcd5aeb284 100644 --- a/homeassistant/components/homematicip_cloud/climate.py +++ b/homeassistant/components/homematicip_cloud/climate.py @@ -1,5 +1,4 @@ """Support for HomematicIP Cloud climate devices.""" -import logging from typing import Any, Dict, List, Optional, Union from homematicip.aio.device import AsyncHeatingThermostat, AsyncHeatingThermostatCompact @@ -33,8 +32,6 @@ from .hap import HomematicipHAP HEATING_PROFILES = {"PROFILE_1": 0, "PROFILE_2": 1, "PROFILE_3": 2} COOLING_PROFILES = {"PROFILE_4": 3, "PROFILE_5": 4, "PROFILE_6": 5} -_LOGGER = logging.getLogger(__name__) - ATTR_PRESET_END_TIME = "preset_end_time" PERMANENT_END_TIME = "permanent" diff --git a/homeassistant/components/homematicip_cloud/cover.py b/homeassistant/components/homematicip_cloud/cover.py index 5b2f02e8a2..60d3867d05 100644 --- a/homeassistant/components/homematicip_cloud/cover.py +++ b/homeassistant/components/homematicip_cloud/cover.py @@ -1,5 +1,4 @@ """Support for HomematicIP Cloud cover devices.""" -import logging from typing import Optional from homematicip.aio.device import ( @@ -22,8 +21,6 @@ from homeassistant.helpers.typing import HomeAssistantType from . import DOMAIN as HMIPC_DOMAIN, HomematicipGenericEntity from .hap import HomematicipHAP -_LOGGER = logging.getLogger(__name__) - HMIP_COVER_OPEN = 0 HMIP_COVER_CLOSED = 1 HMIP_SLATS_OPEN = 0 diff --git a/homeassistant/components/homematicip_cloud/light.py b/homeassistant/components/homematicip_cloud/light.py index e4d85c00b1..f387e7bfda 100644 --- a/homeassistant/components/homematicip_cloud/light.py +++ b/homeassistant/components/homematicip_cloud/light.py @@ -1,5 +1,4 @@ """Support for HomematicIP Cloud lights.""" -import logging from typing import Any, Dict from homematicip.aio.device import ( @@ -29,8 +28,6 @@ from homeassistant.helpers.typing import HomeAssistantType from . import DOMAIN as HMIPC_DOMAIN, HomematicipGenericEntity from .hap import HomematicipHAP -_LOGGER = logging.getLogger(__name__) - ATTR_TODAY_ENERGY_KWH = "today_energy_kwh" ATTR_CURRENT_POWER_W = "current_power_w" diff --git a/homeassistant/components/homematicip_cloud/sensor.py b/homeassistant/components/homematicip_cloud/sensor.py index 77d7560e62..66e0e1afd7 100644 --- a/homeassistant/components/homematicip_cloud/sensor.py +++ b/homeassistant/components/homematicip_cloud/sensor.py @@ -1,5 +1,4 @@ """Support for HomematicIP Cloud sensors.""" -import logging from typing import Any, Dict from homematicip.aio.device import ( @@ -43,8 +42,6 @@ from . import DOMAIN as HMIPC_DOMAIN, HomematicipGenericEntity from .generic_entity import ATTR_IS_GROUP, ATTR_MODEL_TYPE from .hap import HomematicipHAP -_LOGGER = logging.getLogger(__name__) - ATTR_CURRENT_ILLUMINATION = "current_illumination" ATTR_LOWEST_ILLUMINATION = "lowest_illumination" ATTR_HIGHEST_ILLUMINATION = "highest_illumination" diff --git a/homeassistant/components/homematicip_cloud/switch.py b/homeassistant/components/homematicip_cloud/switch.py index b9fbdad651..22fd1c2507 100644 --- a/homeassistant/components/homematicip_cloud/switch.py +++ b/homeassistant/components/homematicip_cloud/switch.py @@ -1,5 +1,4 @@ """Support for HomematicIP Cloud switches.""" -import logging from typing import Any, Dict from homematicip.aio.device import ( @@ -24,8 +23,6 @@ from . import DOMAIN as HMIPC_DOMAIN, HomematicipGenericEntity from .generic_entity import ATTR_GROUP_MEMBER_UNREACHABLE from .hap import HomematicipHAP -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry( hass: HomeAssistantType, config_entry: ConfigEntry, async_add_entities diff --git a/homeassistant/components/homematicip_cloud/weather.py b/homeassistant/components/homematicip_cloud/weather.py index c845343c03..b880cfdf1c 100644 --- a/homeassistant/components/homematicip_cloud/weather.py +++ b/homeassistant/components/homematicip_cloud/weather.py @@ -1,6 +1,4 @@ """Support for HomematicIP Cloud weather devices.""" -import logging - from homematicip.aio.device import ( AsyncWeatherSensor, AsyncWeatherSensorPlus, @@ -16,8 +14,6 @@ from homeassistant.helpers.typing import HomeAssistantType from . import DOMAIN as HMIPC_DOMAIN, HomematicipGenericEntity from .hap import HomematicipHAP -_LOGGER = logging.getLogger(__name__) - HOME_WEATHER_CONDITION = { WeatherCondition.CLEAR: "sunny", WeatherCondition.LIGHT_CLOUDY: "partlycloudy", diff --git a/homeassistant/components/hunterdouglas_powerview/scene.py b/homeassistant/components/hunterdouglas_powerview/scene.py index 89e723a02a..61c93078aa 100644 --- a/homeassistant/components/hunterdouglas_powerview/scene.py +++ b/homeassistant/components/hunterdouglas_powerview/scene.py @@ -1,5 +1,4 @@ """Support for Powerview scenes from a Powerview hub.""" -import logging from typing import Any from aiopvapi.resources.scene import Scene as PvScene @@ -23,8 +22,6 @@ from .const import ( ) from .entity import HDEntity -_LOGGER = logging.getLogger(__name__) - PLATFORM_SCHEMA = vol.Schema( {vol.Required(CONF_PLATFORM): DOMAIN, vol.Required(HUB_ADDRESS): cv.string} ) diff --git a/homeassistant/components/hunterdouglas_powerview/sensor.py b/homeassistant/components/hunterdouglas_powerview/sensor.py index 589665b5a1..6241ddd4d6 100644 --- a/homeassistant/components/hunterdouglas_powerview/sensor.py +++ b/homeassistant/components/hunterdouglas_powerview/sensor.py @@ -1,6 +1,4 @@ """Support for hunterdouglass_powerview sensors.""" -import logging - from aiopvapi.resources.shade import factory as PvShade from homeassistant.const import DEVICE_CLASS_BATTERY, PERCENTAGE @@ -17,8 +15,6 @@ from .const import ( ) from .entity import ShadeEntity -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry(hass, entry, async_add_entities): """Set up the hunter douglas shades sensors.""" diff --git a/homeassistant/components/iaqualink/binary_sensor.py b/homeassistant/components/iaqualink/binary_sensor.py index 669188c473..07edc2dd2e 100644 --- a/homeassistant/components/iaqualink/binary_sensor.py +++ b/homeassistant/components/iaqualink/binary_sensor.py @@ -1,6 +1,4 @@ """Support for Aqualink temperature sensors.""" -import logging - from homeassistant.components.binary_sensor import ( DEVICE_CLASS_COLD, DOMAIN, @@ -12,8 +10,6 @@ from homeassistant.helpers.typing import HomeAssistantType from . import AqualinkEntity from .const import DOMAIN as AQUALINK_DOMAIN -_LOGGER = logging.getLogger(__name__) - PARALLEL_UPDATES = 0 diff --git a/homeassistant/components/iaqualink/light.py b/homeassistant/components/iaqualink/light.py index 362ef8b8b8..b86b2c00f5 100644 --- a/homeassistant/components/iaqualink/light.py +++ b/homeassistant/components/iaqualink/light.py @@ -1,6 +1,4 @@ """Support for Aqualink pool lights.""" -import logging - from iaqualink import AqualinkLightEffect from homeassistant.components.light import ( @@ -17,8 +15,6 @@ from homeassistant.helpers.typing import HomeAssistantType from . import AqualinkEntity, refresh_system from .const import DOMAIN as AQUALINK_DOMAIN -_LOGGER = logging.getLogger(__name__) - PARALLEL_UPDATES = 0 diff --git a/homeassistant/components/iaqualink/sensor.py b/homeassistant/components/iaqualink/sensor.py index 80f18dc819..50f2a83221 100644 --- a/homeassistant/components/iaqualink/sensor.py +++ b/homeassistant/components/iaqualink/sensor.py @@ -1,5 +1,4 @@ """Support for Aqualink temperature sensors.""" -import logging from typing import Optional from homeassistant.components.sensor import DOMAIN @@ -10,8 +9,6 @@ from homeassistant.helpers.typing import HomeAssistantType from . import AqualinkEntity from .const import DOMAIN as AQUALINK_DOMAIN -_LOGGER = logging.getLogger(__name__) - PARALLEL_UPDATES = 0 diff --git a/homeassistant/components/iaqualink/switch.py b/homeassistant/components/iaqualink/switch.py index b71253ade1..d19c334b46 100644 --- a/homeassistant/components/iaqualink/switch.py +++ b/homeassistant/components/iaqualink/switch.py @@ -1,6 +1,4 @@ """Support for Aqualink pool feature switches.""" -import logging - from homeassistant.components.switch import DOMAIN, SwitchEntity from homeassistant.config_entries import ConfigEntry from homeassistant.helpers.typing import HomeAssistantType @@ -8,8 +6,6 @@ from homeassistant.helpers.typing import HomeAssistantType from . import AqualinkEntity, refresh_system from .const import DOMAIN as AQUALINK_DOMAIN -_LOGGER = logging.getLogger(__name__) - PARALLEL_UPDATES = 0 diff --git a/homeassistant/components/icloud/__init__.py b/homeassistant/components/icloud/__init__.py index df06bc9f47..723e89ed78 100644 --- a/homeassistant/components/icloud/__init__.py +++ b/homeassistant/components/icloud/__init__.py @@ -1,6 +1,5 @@ """The iCloud component.""" import asyncio -import logging import voluptuous as vol @@ -86,8 +85,6 @@ CONFIG_SCHEMA = vol.Schema( extra=vol.ALLOW_EXTRA, ) -_LOGGER = logging.getLogger(__name__) - async def async_setup(hass: HomeAssistantType, config: ConfigType) -> bool: """Set up iCloud from legacy config file.""" diff --git a/homeassistant/components/icloud/device_tracker.py b/homeassistant/components/icloud/device_tracker.py index 0b24541688..59554c001e 100644 --- a/homeassistant/components/icloud/device_tracker.py +++ b/homeassistant/components/icloud/device_tracker.py @@ -1,5 +1,4 @@ """Support for tracking for iCloud devices.""" -import logging from typing import Dict from homeassistant.components.device_tracker import SOURCE_TYPE_GPS @@ -17,8 +16,6 @@ from .const import ( DOMAIN, ) -_LOGGER = logging.getLogger(__name__) - async def async_setup_scanner( hass: HomeAssistantType, config, see, discovery_info=None diff --git a/homeassistant/components/icloud/sensor.py b/homeassistant/components/icloud/sensor.py index 37bbdf6970..859148d819 100644 --- a/homeassistant/components/icloud/sensor.py +++ b/homeassistant/components/icloud/sensor.py @@ -1,5 +1,4 @@ """Support for iCloud sensors.""" -import logging from typing import Dict from homeassistant.config_entries import ConfigEntry @@ -13,8 +12,6 @@ from homeassistant.helpers.typing import HomeAssistantType from .account import IcloudAccount, IcloudDevice from .const import DOMAIN -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry( hass: HomeAssistantType, entry: ConfigEntry, async_add_entities diff --git a/homeassistant/components/ihc/light.py b/homeassistant/components/ihc/light.py index c35cb2224c..86aaca9e29 100644 --- a/homeassistant/components/ihc/light.py +++ b/homeassistant/components/ihc/light.py @@ -1,6 +1,4 @@ """Support for IHC lights.""" -import logging - from homeassistant.components.light import ( ATTR_BRIGHTNESS, SUPPORT_BRIGHTNESS, @@ -12,8 +10,6 @@ from .const import CONF_DIMMABLE, CONF_OFF_ID, CONF_ON_ID from .ihcdevice import IHCDevice from .util import async_pulse, async_set_bool, async_set_int -_LOGGER = logging.getLogger(__name__) - def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the IHC lights platform.""" diff --git a/homeassistant/components/insteon/binary_sensor.py b/homeassistant/components/insteon/binary_sensor.py index 259fe20f7b..ad87c69bd0 100644 --- a/homeassistant/components/insteon/binary_sensor.py +++ b/homeassistant/components/insteon/binary_sensor.py @@ -1,6 +1,4 @@ """Support for INSTEON dimmers via PowerLinc Modem.""" -import logging - from pyinsteon.groups import ( CO_SENSOR, DOOR_SENSOR, @@ -35,8 +33,6 @@ from .const import SIGNAL_ADD_ENTITIES from .insteon_entity import InsteonEntity from .utils import async_add_insteon_entities -_LOGGER = logging.getLogger(__name__) - SENSOR_TYPES = { OPEN_CLOSE_SENSOR: DEVICE_CLASS_OPENING, MOTION_SENSOR: DEVICE_CLASS_MOTION, diff --git a/homeassistant/components/insteon/climate.py b/homeassistant/components/insteon/climate.py index 1b30554b82..f05cf9d294 100644 --- a/homeassistant/components/insteon/climate.py +++ b/homeassistant/components/insteon/climate.py @@ -1,5 +1,4 @@ """Support for Insteon thermostat.""" -import logging from typing import List, Optional from pyinsteon.constants import ThermostatMode @@ -32,8 +31,6 @@ from .const import SIGNAL_ADD_ENTITIES from .insteon_entity import InsteonEntity from .utils import async_add_insteon_entities -_LOGGER = logging.getLogger(__name__) - COOLING = 1 HEATING = 2 DEHUMIDIFYING = 3 diff --git a/homeassistant/components/insteon/cover.py b/homeassistant/components/insteon/cover.py index 9d480937c9..498d194667 100644 --- a/homeassistant/components/insteon/cover.py +++ b/homeassistant/components/insteon/cover.py @@ -1,5 +1,4 @@ """Support for Insteon covers via PowerLinc Modem.""" -import logging import math from homeassistant.components.cover import ( @@ -16,8 +15,6 @@ from .const import SIGNAL_ADD_ENTITIES from .insteon_entity import InsteonEntity from .utils import async_add_insteon_entities -_LOGGER = logging.getLogger(__name__) - SUPPORTED_FEATURES = SUPPORT_OPEN | SUPPORT_CLOSE | SUPPORT_SET_POSITION diff --git a/homeassistant/components/insteon/fan.py b/homeassistant/components/insteon/fan.py index 74271acfd4..fb741d7a4b 100644 --- a/homeassistant/components/insteon/fan.py +++ b/homeassistant/components/insteon/fan.py @@ -1,6 +1,4 @@ """Support for INSTEON fans via PowerLinc Modem.""" -import logging - from pyinsteon.constants import FanSpeed from homeassistant.components.fan import ( @@ -18,7 +16,6 @@ from .const import SIGNAL_ADD_ENTITIES from .insteon_entity import InsteonEntity from .utils import async_add_insteon_entities -_LOGGER = logging.getLogger(__name__) FAN_SPEEDS = [SPEED_OFF, SPEED_LOW, SPEED_MEDIUM, SPEED_HIGH] SPEED_TO_VALUE = { SPEED_OFF: FanSpeed.OFF, diff --git a/homeassistant/components/insteon/ipdb.py b/homeassistant/components/insteon/ipdb.py index a3e79fcd6d..4822398110 100644 --- a/homeassistant/components/insteon/ipdb.py +++ b/homeassistant/components/insteon/ipdb.py @@ -1,6 +1,4 @@ """Utility methods for the Insteon platform.""" -import logging - from pyinsteon.device_types import ( ClimateControl_Thermostat, ClimateControl_WirelessThermostat, @@ -50,8 +48,6 @@ from homeassistant.components.switch import DOMAIN as SWITCH from .const import ON_OFF_EVENTS -_LOGGER = logging.getLogger(__name__) - DEVICE_PLATFORM = { DimmableLightingControl: {LIGHT: [1], ON_OFF_EVENTS: [1]}, DimmableLightingControl_DinRail: {LIGHT: [1], ON_OFF_EVENTS: [1]}, diff --git a/homeassistant/components/insteon/light.py b/homeassistant/components/insteon/light.py index a0ec04cda1..f49dafed2f 100644 --- a/homeassistant/components/insteon/light.py +++ b/homeassistant/components/insteon/light.py @@ -1,5 +1,4 @@ """Support for Insteon lights via PowerLinc Modem.""" -import logging from homeassistant.components.light import ( ATTR_BRIGHTNESS, @@ -13,8 +12,6 @@ from .const import SIGNAL_ADD_ENTITIES from .insteon_entity import InsteonEntity from .utils import async_add_insteon_entities -_LOGGER = logging.getLogger(__name__) - MAX_BRIGHTNESS = 255 diff --git a/homeassistant/components/insteon/switch.py b/homeassistant/components/insteon/switch.py index f0daf54990..43430ceb7a 100644 --- a/homeassistant/components/insteon/switch.py +++ b/homeassistant/components/insteon/switch.py @@ -1,6 +1,4 @@ """Support for INSTEON dimmers via PowerLinc Modem.""" -import logging - from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN, SwitchEntity from homeassistant.helpers.dispatcher import async_dispatcher_connect @@ -8,8 +6,6 @@ from .const import SIGNAL_ADD_ENTITIES from .insteon_entity import InsteonEntity from .utils import async_add_insteon_entities -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry(hass, config_entry, async_add_entities): """Set up the Insteon switches from a config entry.""" diff --git a/homeassistant/components/intent/__init__.py b/homeassistant/components/intent/__init__.py index 37761e8834..8410303ac8 100644 --- a/homeassistant/components/intent/__init__.py +++ b/homeassistant/components/intent/__init__.py @@ -1,6 +1,4 @@ """The Intent integration.""" -import logging - import voluptuous as vol from homeassistant.components import http @@ -12,7 +10,6 @@ from homeassistant.helpers import config_validation as cv, integration_platform, from .const import DOMAIN CONFIG_SCHEMA = vol.Schema({DOMAIN: vol.Schema({})}, extra=vol.ALLOW_EXTRA) -_LOGGER = logging.getLogger(__name__) async def async_setup(hass: HomeAssistant, config: dict): diff --git a/homeassistant/components/intent_script/__init__.py b/homeassistant/components/intent_script/__init__.py index 3bde4a3122..ebbd2bb824 100644 --- a/homeassistant/components/intent_script/__init__.py +++ b/homeassistant/components/intent_script/__init__.py @@ -1,6 +1,5 @@ """Handle intents with scripts.""" import copy -import logging import voluptuous as vol @@ -44,8 +43,6 @@ CONFIG_SCHEMA = vol.Schema( extra=vol.ALLOW_EXTRA, ) -_LOGGER = logging.getLogger(__name__) - async def async_setup(hass, config): """Activate Alexa component.""" diff --git a/homeassistant/components/ios/__init__.py b/homeassistant/components/ios/__init__.py index cb8603d566..bc5c5ec1c4 100644 --- a/homeassistant/components/ios/__init__.py +++ b/homeassistant/components/ios/__init__.py @@ -1,6 +1,5 @@ """Native Home Assistant iOS app component.""" import datetime -import logging import voluptuous as vol @@ -25,8 +24,6 @@ from .const import ( DOMAIN, ) -_LOGGER = logging.getLogger(__name__) - CONF_PUSH = "push" CONF_PUSH_CATEGORIES = "categories" CONF_PUSH_CATEGORIES_NAME = "name" diff --git a/homeassistant/components/iota/__init__.py b/homeassistant/components/iota/__init__.py index dbf5fc1500..41c5ad35d8 100644 --- a/homeassistant/components/iota/__init__.py +++ b/homeassistant/components/iota/__init__.py @@ -1,6 +1,5 @@ """Support for IOTA wallets.""" from datetime import timedelta -import logging from iota import Iota import voluptuous as vol @@ -9,8 +8,6 @@ import homeassistant.helpers.config_validation as cv from homeassistant.helpers.discovery import load_platform from homeassistant.helpers.entity import Entity -_LOGGER = logging.getLogger(__name__) - CONF_IRI = "iri" CONF_TESTNET = "testnet" CONF_WALLET_NAME = "name" diff --git a/homeassistant/components/iota/sensor.py b/homeassistant/components/iota/sensor.py index 8a0b17aa63..a6f689e8c2 100644 --- a/homeassistant/components/iota/sensor.py +++ b/homeassistant/components/iota/sensor.py @@ -1,13 +1,10 @@ """Support for IOTA wallet sensors.""" from datetime import timedelta -import logging from homeassistant.const import CONF_NAME from . import CONF_WALLETS, IotaDevice -_LOGGER = logging.getLogger(__name__) - ATTR_TESTNET = "testnet" ATTR_URL = "url" diff --git a/homeassistant/components/iqvia/sensor.py b/homeassistant/components/iqvia/sensor.py index 5db4456b3c..9f9c2d534f 100644 --- a/homeassistant/components/iqvia/sensor.py +++ b/homeassistant/components/iqvia/sensor.py @@ -1,5 +1,4 @@ """Support for IQVIA sensors.""" -import logging from statistics import mean import numpy as np @@ -26,8 +25,6 @@ from homeassistant.core import callback from .const import SENSORS -_LOGGER = logging.getLogger(__name__) - ATTR_ALLERGEN_AMOUNT = "allergen_amount" ATTR_ALLERGEN_GENUS = "allergen_genus" ATTR_ALLERGEN_NAME = "allergen_name" diff --git a/homeassistant/components/irish_rail_transport/sensor.py b/homeassistant/components/irish_rail_transport/sensor.py index 76f8d0dfaa..fba69a6f57 100644 --- a/homeassistant/components/irish_rail_transport/sensor.py +++ b/homeassistant/components/irish_rail_transport/sensor.py @@ -1,6 +1,5 @@ """Support for Irish Rail RTPI information.""" from datetime import timedelta -import logging from pyirishrail.pyirishrail import IrishRailRTPI import voluptuous as vol @@ -10,8 +9,6 @@ from homeassistant.const import ATTR_ATTRIBUTION, CONF_NAME, TIME_MINUTES import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity -_LOGGER = logging.getLogger(__name__) - ATTR_STATION = "Station" ATTR_ORIGIN = "Origin" ATTR_DESTINATION = "Destination" diff --git a/homeassistant/components/itunes/media_player.py b/homeassistant/components/itunes/media_player.py index a62930ff9d..29ec7eb455 100644 --- a/homeassistant/components/itunes/media_player.py +++ b/homeassistant/components/itunes/media_player.py @@ -1,6 +1,4 @@ """Support for interfacing to iTunes API.""" -import logging - import requests import voluptuous as vol @@ -33,8 +31,6 @@ from homeassistant.const import ( ) import homeassistant.helpers.config_validation as cv -_LOGGER = logging.getLogger(__name__) - DEFAULT_NAME = "iTunes" DEFAULT_PORT = 8181 DEFAULT_SSL = False diff --git a/homeassistant/components/izone/__init__.py b/homeassistant/components/izone/__init__.py index 1b4d2f19d1..95aad18989 100644 --- a/homeassistant/components/izone/__init__.py +++ b/homeassistant/components/izone/__init__.py @@ -1,6 +1,4 @@ """Platform for the iZone AC.""" -import logging - import voluptuous as vol from homeassistant import config_entries @@ -11,8 +9,6 @@ from homeassistant.helpers.typing import ConfigType, HomeAssistantType from .const import DATA_CONFIG, IZONE from .discovery import async_start_discovery_service, async_stop_discovery_service -_LOGGER = logging.getLogger(__name__) - CONFIG_SCHEMA = vol.Schema( { IZONE: vol.Schema( diff --git a/homeassistant/components/jewish_calendar/__init__.py b/homeassistant/components/jewish_calendar/__init__.py index dfde274faa..70d55a74b9 100644 --- a/homeassistant/components/jewish_calendar/__init__.py +++ b/homeassistant/components/jewish_calendar/__init__.py @@ -1,5 +1,4 @@ """The jewish_calendar component.""" -import logging from typing import Optional import hdate @@ -9,8 +8,6 @@ from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME import homeassistant.helpers.config_validation as cv from homeassistant.helpers.discovery import async_load_platform -_LOGGER = logging.getLogger(__name__) - DOMAIN = "jewish_calendar" SENSOR_TYPES = { diff --git a/homeassistant/components/jewish_calendar/binary_sensor.py b/homeassistant/components/jewish_calendar/binary_sensor.py index d736be0d57..6edcc7b27c 100644 --- a/homeassistant/components/jewish_calendar/binary_sensor.py +++ b/homeassistant/components/jewish_calendar/binary_sensor.py @@ -1,6 +1,4 @@ """Support for Jewish Calendar binary sensors.""" -import logging - import hdate from homeassistant.components.binary_sensor import BinarySensorEntity @@ -8,8 +6,6 @@ import homeassistant.util.dt as dt_util from . import DOMAIN, SENSOR_TYPES -_LOGGER = logging.getLogger(__name__) - async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """Set up the Jewish Calendar binary sensor devices.""" diff --git a/homeassistant/components/juicenet/device.py b/homeassistant/components/juicenet/device.py index 37d36a2b24..86e1c92e4d 100644 --- a/homeassistant/components/juicenet/device.py +++ b/homeassistant/components/juicenet/device.py @@ -1,9 +1,5 @@ """Adapter to wrap the pyjuicenet api for home assistant.""" -import logging - -_LOGGER = logging.getLogger(__name__) - class JuiceNetApi: """Represent a connection to JuiceNet.""" diff --git a/homeassistant/components/juicenet/sensor.py b/homeassistant/components/juicenet/sensor.py index b6704516e3..10008f30e7 100644 --- a/homeassistant/components/juicenet/sensor.py +++ b/homeassistant/components/juicenet/sensor.py @@ -1,6 +1,4 @@ """Support for monitoring juicenet/juicepoint/juicebox based EVSE sensors.""" -import logging - from homeassistant.const import ( ELECTRICAL_CURRENT_AMPERE, ENERGY_WATT_HOUR, @@ -14,8 +12,6 @@ from homeassistant.helpers.entity import Entity from .const import DOMAIN, JUICENET_API, JUICENET_COORDINATOR from .entity import JuiceNetDevice -_LOGGER = logging.getLogger(__name__) - SENSOR_TYPES = { "status": ["Charging Status", None], "temperature": ["Temperature", TEMP_CELSIUS], diff --git a/homeassistant/components/juicenet/switch.py b/homeassistant/components/juicenet/switch.py index f09ec5559e..64c367740a 100644 --- a/homeassistant/components/juicenet/switch.py +++ b/homeassistant/components/juicenet/switch.py @@ -1,13 +1,9 @@ """Support for monitoring juicenet/juicepoint/juicebox based EVSE switches.""" -import logging - from homeassistant.components.switch import SwitchEntity from .const import DOMAIN, JUICENET_API, JUICENET_COORDINATOR from .entity import JuiceNetDevice -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry(hass, config_entry, async_add_entities): """Set up the JuiceNet switches.""" diff --git a/homeassistant/components/keba/binary_sensor.py b/homeassistant/components/keba/binary_sensor.py index 5c9edfa779..3fed7bbf5a 100644 --- a/homeassistant/components/keba/binary_sensor.py +++ b/homeassistant/components/keba/binary_sensor.py @@ -1,6 +1,4 @@ """Support for KEBA charging station binary sensors.""" -import logging - from homeassistant.components.binary_sensor import ( DEVICE_CLASS_CONNECTIVITY, DEVICE_CLASS_PLUG, @@ -11,8 +9,6 @@ from homeassistant.components.binary_sensor import ( from . import DOMAIN -_LOGGER = logging.getLogger(__name__) - async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """Set up the KEBA charging station platform.""" diff --git a/homeassistant/components/keba/lock.py b/homeassistant/components/keba/lock.py index 385adf662b..15cc00839f 100644 --- a/homeassistant/components/keba/lock.py +++ b/homeassistant/components/keba/lock.py @@ -1,12 +1,8 @@ """Support for KEBA charging station switch.""" -import logging - from homeassistant.components.lock import LockEntity from . import DOMAIN -_LOGGER = logging.getLogger(__name__) - async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """Set up the KEBA charging station platform.""" diff --git a/homeassistant/components/keba/notify.py b/homeassistant/components/keba/notify.py index 7b3f23277a..e0c37efec5 100644 --- a/homeassistant/components/keba/notify.py +++ b/homeassistant/components/keba/notify.py @@ -1,12 +1,8 @@ """Support for Keba notifications.""" -import logging - from homeassistant.components.notify import ATTR_DATA, BaseNotificationService from . import DOMAIN -_LOGGER = logging.getLogger(__name__) - async def async_get_service(hass, config, discovery_info=None): """Return the notify service.""" diff --git a/homeassistant/components/keba/sensor.py b/homeassistant/components/keba/sensor.py index 443e1bcd1b..f7993c2839 100644 --- a/homeassistant/components/keba/sensor.py +++ b/homeassistant/components/keba/sensor.py @@ -1,6 +1,4 @@ """Support for KEBA charging station sensors.""" -import logging - from homeassistant.const import ( DEVICE_CLASS_POWER, ELECTRICAL_CURRENT_AMPERE, @@ -10,8 +8,6 @@ from homeassistant.helpers.entity import Entity from . import DOMAIN -_LOGGER = logging.getLogger(__name__) - async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """Set up the KEBA charging station platform.""" diff --git a/homeassistant/components/konnected/binary_sensor.py b/homeassistant/components/konnected/binary_sensor.py index 20494eee42..dc7a15758d 100644 --- a/homeassistant/components/konnected/binary_sensor.py +++ b/homeassistant/components/konnected/binary_sensor.py @@ -1,6 +1,4 @@ """Support for wired binary sensors attached to a Konnected device.""" -import logging - from homeassistant.components.binary_sensor import BinarySensorEntity from homeassistant.const import ( ATTR_ENTITY_ID, @@ -15,8 +13,6 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect from .const import DOMAIN as KONNECTED_DOMAIN -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry(hass, config_entry, async_add_entities): """Set up binary sensors attached to a Konnected device from a config entry.""" diff --git a/homeassistant/components/konnected/sensor.py b/homeassistant/components/konnected/sensor.py index 12c786c5ae..dece8d06c8 100644 --- a/homeassistant/components/konnected/sensor.py +++ b/homeassistant/components/konnected/sensor.py @@ -1,6 +1,4 @@ """Support for DHT and DS18B20 sensors attached to a Konnected device.""" -import logging - from homeassistant.const import ( CONF_DEVICES, CONF_NAME, @@ -18,8 +16,6 @@ from homeassistant.helpers.entity import Entity from .const import DOMAIN as KONNECTED_DOMAIN, SIGNAL_DS18B20_NEW -_LOGGER = logging.getLogger(__name__) - SENSOR_TYPES = { DEVICE_CLASS_TEMPERATURE: ["Temperature", TEMP_CELSIUS], DEVICE_CLASS_HUMIDITY: ["Humidity", PERCENTAGE], diff --git a/homeassistant/components/kwb/sensor.py b/homeassistant/components/kwb/sensor.py index b7872ca1ab..bd0430f978 100644 --- a/homeassistant/components/kwb/sensor.py +++ b/homeassistant/components/kwb/sensor.py @@ -1,6 +1,4 @@ """Support for KWB Easyfire.""" -import logging - from pykwb import kwb import voluptuous as vol @@ -15,8 +13,6 @@ from homeassistant.const import ( import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity -_LOGGER = logging.getLogger(__name__) - DEFAULT_RAW = False DEFAULT_NAME = "KWB" diff --git a/homeassistant/components/lg_netcast/media_player.py b/homeassistant/components/lg_netcast/media_player.py index 5a2f289ff3..e204d465ec 100644 --- a/homeassistant/components/lg_netcast/media_player.py +++ b/homeassistant/components/lg_netcast/media_player.py @@ -1,6 +1,5 @@ """Support for LG TV running on NetCast 3 or 4.""" from datetime import datetime, timedelta -import logging from pylgnetcast import LgNetCastClient, LgNetCastError from requests import RequestException @@ -31,8 +30,6 @@ from homeassistant.const import ( import homeassistant.helpers.config_validation as cv from homeassistant.helpers.script import Script -_LOGGER = logging.getLogger(__name__) - DEFAULT_NAME = "LG TV Remote" CONF_ON_ACTION = "turn_on_action" diff --git a/homeassistant/components/lg_soundbar/media_player.py b/homeassistant/components/lg_soundbar/media_player.py index 448b4d3bb9..9bc0ba08e2 100644 --- a/homeassistant/components/lg_soundbar/media_player.py +++ b/homeassistant/components/lg_soundbar/media_player.py @@ -1,6 +1,4 @@ """Support for LG soundbars.""" -import logging - import temescal from homeassistant.components.media_player import MediaPlayerEntity @@ -12,8 +10,6 @@ from homeassistant.components.media_player.const import ( ) from homeassistant.const import STATE_ON -_LOGGER = logging.getLogger(__name__) - SUPPORT_LG = ( SUPPORT_VOLUME_SET | SUPPORT_VOLUME_MUTE diff --git a/homeassistant/components/life360/__init__.py b/homeassistant/components/life360/__init__.py index 8338cbf7f1..75ffffc521 100644 --- a/homeassistant/components/life360/__init__.py +++ b/homeassistant/components/life360/__init__.py @@ -1,6 +1,4 @@ """Life360 integration.""" -import logging - import voluptuous as vol from homeassistant import config_entries @@ -37,8 +35,6 @@ from .const import ( ) from .helpers import get_api -_LOGGER = logging.getLogger(__name__) - DEFAULT_PREFIX = DOMAIN CONF_ACCOUNTS = "accounts" diff --git a/homeassistant/components/litejet/__init__.py b/homeassistant/components/litejet/__init__.py index 1d3ab4f6b1..9977bb9bdb 100644 --- a/homeassistant/components/litejet/__init__.py +++ b/homeassistant/components/litejet/__init__.py @@ -1,6 +1,4 @@ """Support for the LiteJet lighting system.""" -import logging - from pylitejet import LiteJet import voluptuous as vol @@ -8,8 +6,6 @@ from homeassistant.const import CONF_PORT from homeassistant.helpers import discovery import homeassistant.helpers.config_validation as cv -_LOGGER = logging.getLogger(__name__) - CONF_EXCLUDE_NAMES = "exclude_names" CONF_INCLUDE_SWITCHES = "include_switches" diff --git a/homeassistant/components/litejet/scene.py b/homeassistant/components/litejet/scene.py index 466ca7296f..3311b8d86a 100644 --- a/homeassistant/components/litejet/scene.py +++ b/homeassistant/components/litejet/scene.py @@ -1,5 +1,4 @@ """Support for LiteJet scenes.""" -import logging from typing import Any from homeassistant.components import litejet @@ -7,8 +6,6 @@ from homeassistant.components.scene import Scene ATTR_NUMBER = "number" -_LOGGER = logging.getLogger(__name__) - def setup_platform(hass, config, add_entities, discovery_info=None): """Set up scenes for the LiteJet platform.""" diff --git a/homeassistant/components/litejet/trigger.py b/homeassistant/components/litejet/trigger.py index 9fe3089c35..0b0117465d 100644 --- a/homeassistant/components/litejet/trigger.py +++ b/homeassistant/components/litejet/trigger.py @@ -1,6 +1,4 @@ """Trigger an automation when a LiteJet switch is released.""" -import logging - import voluptuous as vol from homeassistant.const import CONF_PLATFORM @@ -11,8 +9,6 @@ import homeassistant.util.dt as dt_util # mypy: allow-untyped-defs, no-check-untyped-defs -_LOGGER = logging.getLogger(__name__) - CONF_NUMBER = "number" CONF_HELD_MORE_THAN = "held_more_than" CONF_HELD_LESS_THAN = "held_less_than" diff --git a/homeassistant/components/locative/device_tracker.py b/homeassistant/components/locative/device_tracker.py index 49983d44eb..84719d08e4 100644 --- a/homeassistant/components/locative/device_tracker.py +++ b/homeassistant/components/locative/device_tracker.py @@ -1,6 +1,4 @@ """Support for the Locative platform.""" -import logging - from homeassistant.components.device_tracker import SOURCE_TYPE_GPS from homeassistant.components.device_tracker.config_entry import TrackerEntity from homeassistant.core import callback @@ -8,8 +6,6 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect from . import DOMAIN as LT_DOMAIN, TRACKER_UPDATE -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry(hass, entry, async_add_entities): """Configure a dispatcher connection based on a config entry.""" diff --git a/homeassistant/components/lock/__init__.py b/homeassistant/components/lock/__init__.py index 84892f3f3f..bc7dc10ba8 100644 --- a/homeassistant/components/lock/__init__.py +++ b/homeassistant/components/lock/__init__.py @@ -41,8 +41,6 @@ LOCK_SERVICE_SCHEMA = make_entity_service_schema({vol.Optional(ATTR_CODE): cv.st # Bitfield of features supported by the lock entity SUPPORT_OPEN = 1 -_LOGGER = logging.getLogger(__name__) - PROP_TO_ATTR = {"changed_by": ATTR_CHANGED_BY, "code_format": ATTR_CODE_FORMAT} diff --git a/homeassistant/components/logbook/__init__.py b/homeassistant/components/logbook/__init__.py index 9eb3c80435..99fdc54603 100644 --- a/homeassistant/components/logbook/__init__.py +++ b/homeassistant/components/logbook/__init__.py @@ -2,7 +2,6 @@ from datetime import timedelta from itertools import groupby import json -import logging import re import sqlalchemy @@ -53,8 +52,6 @@ ENTITY_ID_JSON_EXTRACT = re.compile('"entity_id": "([^"]+)"') DOMAIN_JSON_EXTRACT = re.compile('"domain": "([^"]+)"') ICON_JSON_EXTRACT = re.compile('"icon": "([^"]+)"') -_LOGGER = logging.getLogger(__name__) - ATTR_MESSAGE = "message" CONF_DOMAINS = "domains" diff --git a/homeassistant/components/logi_circle/__init__.py b/homeassistant/components/logi_circle/__init__.py index 87ee2e6e38..d355176507 100644 --- a/homeassistant/components/logi_circle/__init__.py +++ b/homeassistant/components/logi_circle/__init__.py @@ -1,6 +1,5 @@ """Support for Logi Circle devices.""" import asyncio -import logging from aiohttp.client_exceptions import ClientResponseError import async_timeout @@ -39,7 +38,6 @@ from .const import ( NOTIFICATION_ID = "logi_circle_notification" NOTIFICATION_TITLE = "Logi Circle Setup" -_LOGGER = logging.getLogger(__name__) _TIMEOUT = 15 # seconds SERVICE_SET_CONFIG = "set_config" diff --git a/homeassistant/components/london_underground/sensor.py b/homeassistant/components/london_underground/sensor.py index 12f40f7b46..c39ef2885b 100644 --- a/homeassistant/components/london_underground/sensor.py +++ b/homeassistant/components/london_underground/sensor.py @@ -1,6 +1,5 @@ """Sensor for checking the status of London Underground tube lines.""" from datetime import timedelta -import logging from london_tube_status import TubeData import voluptuous as vol @@ -10,8 +9,6 @@ from homeassistant.const import ATTR_ATTRIBUTION import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity -_LOGGER = logging.getLogger(__name__) - ATTRIBUTION = "Powered by TfL Open Data" CONF_LINE = "line" diff --git a/homeassistant/components/lutron/light.py b/homeassistant/components/lutron/light.py index 411a1d494d..d74d24f71a 100644 --- a/homeassistant/components/lutron/light.py +++ b/homeassistant/components/lutron/light.py @@ -1,6 +1,4 @@ """Support for Lutron lights.""" -import logging - from homeassistant.components.light import ( ATTR_BRIGHTNESS, SUPPORT_BRIGHTNESS, @@ -9,8 +7,6 @@ from homeassistant.components.light import ( from . import LUTRON_CONTROLLER, LUTRON_DEVICES, LutronDevice -_LOGGER = logging.getLogger(__name__) - def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the Lutron lights.""" diff --git a/homeassistant/components/lutron/scene.py b/homeassistant/components/lutron/scene.py index 468597ba5e..eaadc4197f 100644 --- a/homeassistant/components/lutron/scene.py +++ b/homeassistant/components/lutron/scene.py @@ -1,13 +1,10 @@ """Support for Lutron scenes.""" -import logging from typing import Any from homeassistant.components.scene import Scene from . import LUTRON_CONTROLLER, LUTRON_DEVICES, LutronDevice -_LOGGER = logging.getLogger(__name__) - def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the Lutron scenes.""" diff --git a/homeassistant/components/lutron/switch.py b/homeassistant/components/lutron/switch.py index ac00faaa9b..21586aaa26 100644 --- a/homeassistant/components/lutron/switch.py +++ b/homeassistant/components/lutron/switch.py @@ -1,12 +1,8 @@ """Support for Lutron switches.""" -import logging - from homeassistant.components.switch import SwitchEntity from . import LUTRON_CONTROLLER, LUTRON_DEVICES, LutronDevice -_LOGGER = logging.getLogger(__name__) - def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the Lutron switches.""" diff --git a/homeassistant/components/marytts/tts.py b/homeassistant/components/marytts/tts.py index f04f98896a..a5bdee618e 100644 --- a/homeassistant/components/marytts/tts.py +++ b/homeassistant/components/marytts/tts.py @@ -1,6 +1,4 @@ """Support for the MaryTTS service.""" -import logging - from speak2mary import MaryTTS import voluptuous as vol @@ -8,8 +6,6 @@ from homeassistant.components.tts import CONF_LANG, PLATFORM_SCHEMA, Provider from homeassistant.const import CONF_EFFECT, CONF_HOST, CONF_PORT import homeassistant.helpers.config_validation as cv -_LOGGER = logging.getLogger(__name__) - CONF_VOICE = "voice" CONF_CODEC = "codec" diff --git a/homeassistant/components/matrix/notify.py b/homeassistant/components/matrix/notify.py index 9f1f0eb992..0965783bf4 100644 --- a/homeassistant/components/matrix/notify.py +++ b/homeassistant/components/matrix/notify.py @@ -1,6 +1,4 @@ """Support for Matrix notifications.""" -import logging - import voluptuous as vol from homeassistant.components.notify import ( @@ -13,8 +11,6 @@ import homeassistant.helpers.config_validation as cv from .const import DOMAIN, SERVICE_SEND_MESSAGE -_LOGGER = logging.getLogger(__name__) - CONF_DEFAULT_ROOM = "default_room" PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({vol.Required(CONF_DEFAULT_ROOM): cv.string}) diff --git a/homeassistant/components/maxcube/binary_sensor.py b/homeassistant/components/maxcube/binary_sensor.py index 312f55ce0d..06b5345697 100644 --- a/homeassistant/components/maxcube/binary_sensor.py +++ b/homeassistant/components/maxcube/binary_sensor.py @@ -1,6 +1,4 @@ """Support for MAX! binary sensors via MAX! Cube.""" -import logging - from homeassistant.components.binary_sensor import ( DEVICE_CLASS_WINDOW, BinarySensorEntity, @@ -8,8 +6,6 @@ from homeassistant.components.binary_sensor import ( from . import DATA_KEY -_LOGGER = logging.getLogger(__name__) - def setup_platform(hass, config, add_entities, discovery_info=None): """Iterate through all MAX! Devices and add window shutters.""" diff --git a/homeassistant/components/mcp23017/binary_sensor.py b/homeassistant/components/mcp23017/binary_sensor.py index 8cc50fa9df..f6dafad43a 100644 --- a/homeassistant/components/mcp23017/binary_sensor.py +++ b/homeassistant/components/mcp23017/binary_sensor.py @@ -1,6 +1,4 @@ """Support for binary sensor using I2C MCP23017 chip.""" -import logging - from adafruit_mcp230xx.mcp23017 import MCP23017 # pylint: disable=import-error import board # pylint: disable=import-error import busio # pylint: disable=import-error @@ -11,8 +9,6 @@ from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensor from homeassistant.const import DEVICE_DEFAULT_NAME import homeassistant.helpers.config_validation as cv -_LOGGER = logging.getLogger(__name__) - CONF_INVERT_LOGIC = "invert_logic" CONF_I2C_ADDRESS = "i2c_address" CONF_PINS = "pins" diff --git a/homeassistant/components/mcp23017/switch.py b/homeassistant/components/mcp23017/switch.py index fe76f4ce63..d22593a4c3 100644 --- a/homeassistant/components/mcp23017/switch.py +++ b/homeassistant/components/mcp23017/switch.py @@ -1,6 +1,4 @@ """Support for switch sensor using I2C MCP23017 chip.""" -import logging - from adafruit_mcp230xx.mcp23017 import MCP23017 # pylint: disable=import-error import board # pylint: disable=import-error import busio # pylint: disable=import-error @@ -12,8 +10,6 @@ from homeassistant.const import DEVICE_DEFAULT_NAME import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import ToggleEntity -_LOGGER = logging.getLogger(__name__) - CONF_INVERT_LOGIC = "invert_logic" CONF_I2C_ADDRESS = "i2c_address" CONF_PINS = "pins" diff --git a/homeassistant/components/melcloud/climate.py b/homeassistant/components/melcloud/climate.py index ed2fefc823..4c409ec5a4 100644 --- a/homeassistant/components/melcloud/climate.py +++ b/homeassistant/components/melcloud/climate.py @@ -1,6 +1,5 @@ """Platform for climate integration.""" from datetime import timedelta -import logging from typing import Any, Dict, List, Optional from pymelcloud import DEVICE_TYPE_ATA, DEVICE_TYPE_ATW, AtaDevice, AtwDevice @@ -47,8 +46,6 @@ from .const import ( SCAN_INTERVAL = timedelta(seconds=60) -_LOGGER = logging.getLogger(__name__) - ATA_HVAC_MODE_LOOKUP = { ata.OPERATION_MODE_HEAT: HVAC_MODE_HEAT, diff --git a/homeassistant/components/melcloud/config_flow.py b/homeassistant/components/melcloud/config_flow.py index 8813883c15..41ce24989a 100644 --- a/homeassistant/components/melcloud/config_flow.py +++ b/homeassistant/components/melcloud/config_flow.py @@ -1,6 +1,5 @@ """Config flow for the MELCloud platform.""" import asyncio -import logging from typing import Optional from aiohttp import ClientError, ClientResponseError @@ -19,8 +18,6 @@ from homeassistant.const import ( from .const import DOMAIN # pylint: disable=unused-import -_LOGGER = logging.getLogger(__name__) - class FlowHandler(config_entries.ConfigFlow, domain=DOMAIN): """Handle a config flow.""" diff --git a/homeassistant/components/melcloud/sensor.py b/homeassistant/components/melcloud/sensor.py index 774b66ab67..c96433f17d 100644 --- a/homeassistant/components/melcloud/sensor.py +++ b/homeassistant/components/melcloud/sensor.py @@ -1,6 +1,4 @@ """Support for MelCloud device sensors.""" -import logging - from pymelcloud import DEVICE_TYPE_ATA, DEVICE_TYPE_ATW from pymelcloud.atw_device import Zone @@ -84,8 +82,6 @@ ATW_ZONE_SENSORS = { }, } -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry(hass, entry, async_add_entities): """Set up MELCloud device sensors based on config_entry.""" diff --git a/homeassistant/components/melissa/__init__.py b/homeassistant/components/melissa/__init__.py index c03939e3e9..dfbe2f27fc 100644 --- a/homeassistant/components/melissa/__init__.py +++ b/homeassistant/components/melissa/__init__.py @@ -1,6 +1,4 @@ """Support for Melissa climate.""" -import logging - import melissa import voluptuous as vol @@ -8,8 +6,6 @@ from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from homeassistant.helpers import config_validation as cv from homeassistant.helpers.discovery import async_load_platform -_LOGGER = logging.getLogger(__name__) - DOMAIN = "melissa" DATA_MELISSA = "MELISSA" diff --git a/homeassistant/components/metoffice/sensor.py b/homeassistant/components/metoffice/sensor.py index f8fabd56dc..aed763ca4a 100644 --- a/homeassistant/components/metoffice/sensor.py +++ b/homeassistant/components/metoffice/sensor.py @@ -1,7 +1,4 @@ """Support for UK Met Office weather service.""" - -import logging - from homeassistant.const import ( ATTR_ATTRIBUTION, DEVICE_CLASS_HUMIDITY, @@ -27,8 +24,6 @@ from .const import ( VISIBILITY_DISTANCE_CLASSES, ) -_LOGGER = logging.getLogger(__name__) - ATTR_LAST_UPDATE = "last_update" ATTR_SENSOR_ID = "sensor_id" ATTR_SITE_ID = "site_id" diff --git a/homeassistant/components/metoffice/weather.py b/homeassistant/components/metoffice/weather.py index 809943c616..351065226a 100644 --- a/homeassistant/components/metoffice/weather.py +++ b/homeassistant/components/metoffice/weather.py @@ -1,7 +1,4 @@ """Support for UK Met Office weather service.""" - -import logging - from homeassistant.components.weather import WeatherEntity from homeassistant.const import LENGTH_KILOMETERS, TEMP_CELSIUS from homeassistant.core import callback @@ -19,8 +16,6 @@ from .const import ( VISIBILITY_DISTANCE_CLASSES, ) -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry( hass: HomeAssistantType, entry: ConfigType, async_add_entities diff --git a/homeassistant/components/mill/__init__.py b/homeassistant/components/mill/__init__.py index 652153f9a8..117f2bcb5a 100644 --- a/homeassistant/components/mill/__init__.py +++ b/homeassistant/components/mill/__init__.py @@ -1,7 +1,4 @@ """The mill component.""" -import logging - -_LOGGER = logging.getLogger(__name__) async def async_setup(hass, config): diff --git a/homeassistant/components/mill/climate.py b/homeassistant/components/mill/climate.py index ee7fc8cffb..67ed692691 100644 --- a/homeassistant/components/mill/climate.py +++ b/homeassistant/components/mill/climate.py @@ -1,6 +1,4 @@ """Support for mill wifi-enabled home heaters.""" -import logging - from mill import Mill import voluptuous as vol @@ -36,8 +34,6 @@ from .const import ( SERVICE_SET_ROOM_TEMP, ) -_LOGGER = logging.getLogger(__name__) - SUPPORT_FLAGS = SUPPORT_TARGET_TEMPERATURE | SUPPORT_FAN_MODE SET_ROOM_TEMP_SCHEMA = vol.Schema( diff --git a/homeassistant/components/mill/config_flow.py b/homeassistant/components/mill/config_flow.py index 230849cc78..8c13545a80 100644 --- a/homeassistant/components/mill/config_flow.py +++ b/homeassistant/components/mill/config_flow.py @@ -1,6 +1,4 @@ """Adds config flow for Mill integration.""" -import logging - from mill import Mill import voluptuous as vol @@ -10,8 +8,6 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession from .const import DOMAIN # pylint:disable=unused-import -_LOGGER = logging.getLogger(__name__) - DATA_SCHEMA = vol.Schema( {vol.Required(CONF_USERNAME): str, vol.Required(CONF_PASSWORD): str} ) diff --git a/homeassistant/components/minecraft_server/sensor.py b/homeassistant/components/minecraft_server/sensor.py index 20f9e98e53..171ff9d170 100644 --- a/homeassistant/components/minecraft_server/sensor.py +++ b/homeassistant/components/minecraft_server/sensor.py @@ -1,6 +1,4 @@ """The Minecraft Server sensor platform.""" - -import logging from typing import Any, Dict from homeassistant.config_entries import ConfigEntry @@ -27,8 +25,6 @@ from .const import ( UNIT_VERSION, ) -_LOGGER = logging.getLogger(__name__) - async def async_setup_entry( hass: HomeAssistantType, config_entry: ConfigEntry, async_add_entities diff --git a/homeassistant/components/mobile_app/device_tracker.py b/homeassistant/components/mobile_app/device_tracker.py index 850d17212f..d2e987066e 100644 --- a/homeassistant/components/mobile_app/device_tracker.py +++ b/homeassistant/components/mobile_app/device_tracker.py @@ -1,6 +1,4 @@ """Device tracker platform that adds support for OwnTracks over MQTT.""" -import logging - from homeassistant.components.device_tracker import ( ATTR_BATTERY, ATTR_GPS, @@ -24,7 +22,6 @@ from .const import ( ) from .helpers import device_info -_LOGGER = logging.getLogger(__name__) ATTR_KEYS = (ATTR_ALTITUDE, ATTR_COURSE, ATTR_SPEED, ATTR_VERTICAL_ACCURACY) diff --git a/homeassistant/components/mochad/light.py b/homeassistant/components/mochad/light.py index a2264a65b1..90af33bd0c 100644 --- a/homeassistant/components/mochad/light.py +++ b/homeassistant/components/mochad/light.py @@ -1,6 +1,4 @@ """Support for X10 dimmer over Mochad.""" -import logging - from pymochad import device import voluptuous as vol @@ -15,8 +13,6 @@ from homeassistant.helpers import config_validation as cv from . import CONF_COMM_TYPE, DOMAIN, REQ_LOCK -_LOGGER = logging.getLogger(__name__) - CONF_BRIGHTNESS_LEVELS = "brightness_levels" PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( diff --git a/homeassistant/components/modbus/binary_sensor.py b/homeassistant/components/modbus/binary_sensor.py index 8d80a2a45d..c9e9cc4196 100644 --- a/homeassistant/components/modbus/binary_sensor.py +++ b/homeassistant/components/modbus/binary_sensor.py @@ -1,5 +1,4 @@ """Support for Modbus Coil and Discrete Input sensors.""" -import logging from typing import Optional from pymodbus.exceptions import ConnectionException, ModbusException @@ -26,8 +25,6 @@ from .const import ( MODBUS_DOMAIN, ) -_LOGGER = logging.getLogger(__name__) - PLATFORM_SCHEMA = vol.All( cv.deprecated(CONF_COILS, CONF_INPUTS), PLATFORM_SCHEMA.extend( diff --git a/homeassistant/components/modbus/cover.py b/homeassistant/components/modbus/cover.py index e6040daefa..ab16e5306f 100644 --- a/homeassistant/components/modbus/cover.py +++ b/homeassistant/components/modbus/cover.py @@ -1,6 +1,5 @@ """Support for Modbus covers.""" from datetime import timedelta -import logging from typing import Any, Dict, Optional from pymodbus.exceptions import ConnectionException, ModbusException @@ -37,8 +36,6 @@ from .const import ( MODBUS_DOMAIN, ) -_LOGGER = logging.getLogger(__name__) - async def async_setup_platform( hass: HomeAssistantType, diff --git a/homeassistant/components/moon/sensor.py b/homeassistant/components/moon/sensor.py index 3a25b68eea..f7914177f8 100644 --- a/homeassistant/components/moon/sensor.py +++ b/homeassistant/components/moon/sensor.py @@ -1,6 +1,4 @@ """Support for tracking the moon phases.""" -import logging - from astral import Astral import voluptuous as vol @@ -10,8 +8,6 @@ import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity import homeassistant.util.dt as dt_util -_LOGGER = logging.getLogger(__name__) - DEFAULT_NAME = "Moon" STATE_FIRST_QUARTER = "first_quarter" diff --git a/homeassistant/components/mychevy/binary_sensor.py b/homeassistant/components/mychevy/binary_sensor.py index b009fe3b3f..eb28dd26b0 100644 --- a/homeassistant/components/mychevy/binary_sensor.py +++ b/homeassistant/components/mychevy/binary_sensor.py @@ -1,6 +1,4 @@ """Support for MyChevy binary sensors.""" -import logging - from homeassistant.components.binary_sensor import ( DOMAIN as BINARY_SENSOR_DOMAIN, BinarySensorEntity, @@ -10,8 +8,6 @@ from homeassistant.util import slugify from . import DOMAIN as MYCHEVY_DOMAIN, UPDATE_TOPIC, EVBinarySensorConfig -_LOGGER = logging.getLogger(__name__) - SENSORS = [EVBinarySensorConfig("Plugged In", "plugged_in", "plug")] diff --git a/homeassistant/components/mycroft/__init__.py b/homeassistant/components/mycroft/__init__.py index a7d6309546..86983092ad 100644 --- a/homeassistant/components/mycroft/__init__.py +++ b/homeassistant/components/mycroft/__init__.py @@ -1,14 +1,10 @@ """Support for Mycroft AI.""" -import logging - import voluptuous as vol from homeassistant.const import CONF_HOST from homeassistant.helpers import discovery import homeassistant.helpers.config_validation as cv -_LOGGER = logging.getLogger(__name__) - DOMAIN = "mycroft" CONFIG_SCHEMA = vol.Schema( diff --git a/homeassistant/components/myq/binary_sensor.py b/homeassistant/components/myq/binary_sensor.py index e5f8fbd057..57bd2451d2 100644 --- a/homeassistant/components/myq/binary_sensor.py +++ b/homeassistant/components/myq/binary_sensor.py @@ -1,6 +1,4 @@ """Support for MyQ gateways.""" -import logging - from pymyq.const import ( DEVICE_FAMILY as MYQ_DEVICE_FAMILY, DEVICE_FAMILY_GATEWAY as MYQ_DEVICE_FAMILY_GATEWAY, @@ -18,8 +16,6 @@ from homeassistant.helpers.update_coordinator import CoordinatorEntity from .const import DOMAIN, MYQ_COORDINATOR, MYQ_GATEWAY -_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/cover.py b/homeassistant/components/myq/cover.py index cccce36f31..59a7fb5bb2 100644 --- a/homeassistant/components/myq/cover.py +++ b/homeassistant/components/myq/cover.py @@ -1,5 +1,4 @@ """Support for MyQ-Enabled Garage Doors.""" -import logging import time from pymyq.const import ( @@ -43,9 +42,6 @@ from .const import ( TRANSITION_START_DURATION, ) -_LOGGER = logging.getLogger(__name__) - - PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( { vol.Required(CONF_USERNAME): cv.string, diff --git a/homeassistant/components/mysensors/handler.py b/homeassistant/components/mysensors/handler.py index 31e836f476..b5b8b511ae 100644 --- a/homeassistant/components/mysensors/handler.py +++ b/homeassistant/components/mysensors/handler.py @@ -1,6 +1,4 @@ """Handle MySensors messages.""" -import logging - from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_send from homeassistant.util import decorator @@ -9,7 +7,6 @@ from .const import CHILD_CALLBACK, MYSENSORS_GATEWAY_READY, NODE_CALLBACK from .device import get_mysensors_devices from .helpers import discover_mysensors_platform, validate_set_msg -_LOGGER = logging.getLogger(__name__) HANDLERS = decorator.Registry() diff --git a/homeassistant/components/mythicbeastsdns/__init__.py b/homeassistant/components/mythicbeastsdns/__init__.py index d961c2e6e3..3ab173ea43 100644 --- a/homeassistant/components/mythicbeastsdns/__init__.py +++ b/homeassistant/components/mythicbeastsdns/__init__.py @@ -1,6 +1,5 @@ """Support for Mythic Beasts Dynamic DNS service.""" from datetime import timedelta -import logging import mbddns import voluptuous as vol @@ -15,8 +14,6 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession import homeassistant.helpers.config_validation as cv from homeassistant.helpers.event import async_track_time_interval -_LOGGER = logging.getLogger(__name__) - DOMAIN = "mythicbeastsdns" DEFAULT_INTERVAL = timedelta(minutes=10) diff --git a/homeassistant/components/spotify/__init__.py b/homeassistant/components/spotify/__init__.py index 9459a4923c..10fe70c611 100644 --- a/homeassistant/components/spotify/__init__.py +++ b/homeassistant/components/spotify/__init__.py @@ -1,5 +1,4 @@ """The spotify integration.""" -import logging from spotipy import Spotify, SpotifyException import voluptuous as vol @@ -25,8 +24,6 @@ from .const import ( SPOTIFY_SCOPES, ) -_LOGGER = logging.getLogger(__name__) - CONFIG_SCHEMA = vol.Schema( { DOMAIN: vol.Schema( diff --git a/homeassistant/data_entry_flow.py b/homeassistant/data_entry_flow.py index b553c190f5..840a7afc2e 100644 --- a/homeassistant/data_entry_flow.py +++ b/homeassistant/data_entry_flow.py @@ -1,7 +1,6 @@ """Classes to help gather user submissions.""" import abc import asyncio -import logging from typing import Any, Dict, List, Optional, cast import uuid @@ -10,8 +9,6 @@ import voluptuous as vol from .core import HomeAssistant, callback from .exceptions import HomeAssistantError -_LOGGER = logging.getLogger(__name__) - RESULT_TYPE_FORM = "form" RESULT_TYPE_CREATE_ENTRY = "create_entry" RESULT_TYPE_ABORT = "abort" diff --git a/homeassistant/requirements.py b/homeassistant/requirements.py index b490db20b8..b3af06ad07 100644 --- a/homeassistant/requirements.py +++ b/homeassistant/requirements.py @@ -1,6 +1,5 @@ """Module to handle installing requirements.""" import asyncio -import logging import os from typing import Any, Dict, Iterable, List, Optional, Set, Union, cast @@ -13,7 +12,6 @@ DATA_PIP_LOCK = "pip_lock" DATA_PKG_CACHE = "pkg_cache" DATA_INTEGRATIONS_WITH_REQS = "integrations_with_reqs" CONSTRAINT_FILE = "package_constraints.txt" -_LOGGER = logging.getLogger(__name__) DISCOVERY_INTEGRATIONS: Dict[str, Iterable[str]] = { "mqtt": ("mqtt",), "ssdp": ("ssdp",), diff --git a/tests/components/synology_dsm/test_config_flow.py b/tests/components/synology_dsm/test_config_flow.py index 404653a035..5a1a86ef67 100644 --- a/tests/components/synology_dsm/test_config_flow.py +++ b/tests/components/synology_dsm/test_config_flow.py @@ -1,6 +1,4 @@ """Tests for the Synology DSM config flow.""" -import logging - import pytest from synology_dsm.exceptions import ( SynologyDSMException, @@ -39,9 +37,6 @@ from homeassistant.helpers.typing import HomeAssistantType from tests.async_mock import MagicMock, Mock, patch from tests.common import MockConfigEntry -_LOGGER = logging.getLogger(__name__) - - HOST = "nas.meontheinternet.com" SERIAL = "mySerial" HOST_2 = "nas.worldwide.me"