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 5a39090ae44..d2ce63f9490 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 45cc07ae581..ddceeaae826 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 2fc8c379861..359f79ce6ce 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 c799c4a7135..d728eed3003 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 10eec606028..05e23ba8b80 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 d481420b4d4..0cf89dfa7cc 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 1a350b3e39f..5348873c7d0 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 74701066078..82ead5fbf59 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 134acae3f94..2f411b27723 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 c8231d8a31d..9f807899e54 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 878a100684f..fc52ee0ef36 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 bc2d74a5042..5e3118b1d3d 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 4ce953af1d4..a8aed8dac73 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 7522b7e2d58..5180a8d55b6 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 490c41255bf..e9247b9fd73 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 5aba9d637d4..0a3a91e515c 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 b3b76715368..540e2facd4d 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 333da7dceea..905d0262862 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 52f57a4b753..e0bcc04360b 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 138a4ecc8c8..f92cd11c011 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 94822eaef18..08bba4cbd2d 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 c04757e75d3..d270af9295b 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 8da656d217a..f31272b3a20 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 99b73c86fdb..6ee742fd506 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 12587e531d7..28f48c7ab70 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 1742a00b4e9..0d259778796 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 fba96b24084..43451632f38 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 c3f6e19c2e2..eca020f6cd0 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 e5281c13654..0af2f15b34e 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 3165b6ee87a..f3b659ddccd 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 eedeac01366..b757f787088 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 69030871b8d..94235acbba6 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 30a4bacc4da..61d98c7413e 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 229f7a6c61e..c772cf86f00 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 cc776c21f9e..03a9065a15b 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 b155a1e06be..e8a37d51be4 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 0b8e2682f30..c1cee98208c 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 71e6a6b2c71..d1120420756 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 43c5614679c..4234b4fb145 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 eaa03ef2f3b..df06e39db7e 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 a0ed6545b91..9af92f6e7e7 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 74f26b5fbd6..501afaac930 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 9fe83e350cf..179fac79dd7 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 abc0447e718..7239976f85e 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 c799f8daa9b..870d96dab86 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 652e37714f5..44f86589b27 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 957b659eb79..e4dda0f9f33 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 4d0a4a0d169..608dfe02b8a 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 ecf6ce18342..3d993fb2bc0 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 54dc0f18374..481cdd7ecad 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 3d97e110475..37fb5cbf6f3 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 7478c9a7f2b..44ba5c3d600 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 ad97284d857..b1ad55c0b04 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 5a70948555d..8e309d92c7f 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 cb78b7b9144..6021a5ef4f7 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 d03dbe1fe7b..9ddd9d76ed9 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 2f09cba2eb1..d2dcf13a62a 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 49183dd028e..ccf2e7f2c75 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 4f352900012..df1a224bcce 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 ff65658073f..8919b2d09b1 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 0dae8848d39..b39d7f27c55 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 afba3e2878a..88e49ee36d4 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 2059f258972..56726bba8b7 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 57feae64a89..a6d166662ae 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 528944ae27b..ebb6b57ce14 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 bb5adb943e9..01752f0373f 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 1db4af12f22..bba02147c71 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 f884ce0219d..b48f19b75b4 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 297e431e63a..a703bdab165 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 21e555e3122..46f3df34314 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 8056192340c..482edd51f1e 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 d32a2887842..c76d0c30e8e 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 bc62dbfe2b9..32da37bcc38 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 26c0c92ca78..1d6d52fa0c9 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 9e56668eb3e..c2bec855b9b 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 1e4cb81a5eb..294780c81dc 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 0de159861d6..46ff402788e 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 7eaa57fe8d3..01c98496de2 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 0c0d6c53ed1..96e485a94e6 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 f1cf60bb97e..19b10c3e6c5 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 f1998dd5b2e..963f547283f 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 bd3b216d705..57a8d420c43 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 17a43f36235..2c51c59fd47 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 6882171b67f..61f43301fd9 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 31f8c2b59cf..d6c849a4c5a 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 624774b9bf4..a6f25b8827c 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 3bcacde64b9..2e3c1ca3187 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 7872b8215a6..1cbc893f98b 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 a086f5ba27c..b0d46d76b7b 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 04b234425c1..b8ea753b8d0 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 047d0a03986..011dcdafdb6 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 6ce5fbd3180..614bd8f4e43 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 19510337d6a..883b5c43d7e 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 bf35da16fa5..87677e85065 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 ca3c1f13c14..3c3dbfe6ce6 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 cee3d00242a..7c6042c8959 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 c3615c4726d..1678281c3de 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 46ed214afba..fe171d24fb9 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 fcf7c22a2a2..4c42fe0d522 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 8b9b4b4922c..df663f8b10a 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 36c22f28016..adbb36188fd 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 0856f270710..fbf3925953b 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 a3c7eeab946..3f8ca90d6c5 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 eca637ec371..2b006deb4e8 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 2c23eca483f..ceff6775492 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 586965aa42b..c718c8b7691 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 fe131e4dab4..ad3711b1319 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 ca752208f12..70ea74dde3f 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 db3eb5621ff..729c51cf949 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 9b4218c011c..9dbe08ec649 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 387f25afe6e..8425ed173b4 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 21ce22ea8e3..96c688bac16 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 943df5b5681..6c6c6ddfe1f 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 f73347cf356..6dc69df1343 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 a0dd60d52fe..17c16a566db 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 714f019168d..d1232468620 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 3c812970022..4e9af8803f2 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 a38f642775f..331d6b8fc95 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 528d44bbb83..35c8ebf7df6 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 2bccd38688a..6b05c96416f 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 36779b28df2..77380afc2b5 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 0d83921cb2f..43e41e25e5e 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 50a7d8ac577..e0a3dc47818 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 e730f108f8f..f090f516fb1 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 c19e7d4b303..9ea8b378fce 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 deb8650cd4f..fb36312cf1e 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 3642e28ccac..5779ccaaa65 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 e748b420edb..08520ad46ee 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 f09a7f86d2a..d230d3dedc5 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 42f7c0334b3..c8cd1669f05 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 7a155586fac..f8a900d92be 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 ab2ad65713d..25a8665db9f 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 007e05edfbb..6d90312e644 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 2209e0e2333..97c019163e8 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 1fa4ad63b36..f885aa832c7 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 01e4208fd48..77dcec8111a 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 30a857f8b99..bd804fbe77a 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 5bc4a132914..e425b5ce94a 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 52926ba7968..326b5c5895d 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 4a714bac73f..9d7cefc00e8 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 1bd6a37cd1c..c5baf6ca4b2 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 0b4fd8a08c3..2f3ebfb82d9 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 baa5cc59a50..20abcedb341 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 b79c0074360..3107d590d91 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 31c341c9144..220014d7d4e 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 3d35b685271..8332e9cec77 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 6a9fb126c21..b7139741be2 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 333eb462439..bf3a5f27142 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 29fddf99189..c718f7dc11a 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 5f43b3e8564..db824ea060d 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 e3b392ea107..5fe119f65b7 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 b024efe6121..3f9f6f3de29 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 93bb4f1568f..52e9947d986 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 32c7fd8515e..3408d036b58 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 7315a266a30..286c7372fd2 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 243e1782a37..3b77b90ff25 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 c0074d349d1..e9f2943b53b 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 7ef632dae81..11731e2ae5f 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 9a705627fa4..fa907ce9393 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 3d48adc6df2..a8ae59d4c31 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 afde1ac8527..ff3bbe61039 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 e53307c533b..2b078966ee8 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 3c04fd7410a..da5bf844e08 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 3f9cdcbcbdd..dcd5aeb284e 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 5b2f02e8a2d..60d3867d05a 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 e4d85c00b19..f387e7bfda3 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 77d7560e622..66e0e1afd70 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 b9fbdad651a..22fd1c25078 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 c845343c030..b880cfdf1cc 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 89e723a02ac..61c93078aa1 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 589665b5a10..6241ddd4d62 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 669188c473f..07edc2dd2ea 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 362ef8b8b8e..b86b2c00f57 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 80f18dc8191..50f2a832211 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 b71253ade12..d19c334b461 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 df06bc9f47b..723e89ed781 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 0b245416887..59554c001ef 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 37bbdf69703..859148d8190 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 c35cb2224cf..86aaca9e296 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 259fe20f7bc..ad87c69bd0f 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 1b30554b82d..f05cf9d2940 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 9d480937c9c..498d194667c 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 74271acfd4a..fb741d7a4b0 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 a3e79fcd6d4..48223981103 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 a0ec04cda1b..f49dafed2fe 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 f0daf54990e..43430ceb7a0 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 37761e88347..8410303ac81 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 3bde4a3122f..ebbd2bb824e 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 cb8603d5669..bc5c5ec1c4e 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 dbf5fc15007..41c5ad35d83 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 8a0b17aa63b..a6f689e8c2d 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 5db4456b3c6..9f9c2d534fc 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 76f8d0dfaab..fba69a6f578 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 a62930ff9dc..29ec7eb4558 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 1b4d2f19d1c..95aad189899 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 dfde274faa8..70d55a74b98 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 d736be0d578..6edcc7b27c3 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 37d36a2b24c..86e1c92e4da 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 b6704516e3b..10008f30e7c 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 f09ec5559eb..64c367740ac 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 5c9edfa7793..3fed7bbf5ab 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 385adf662be..15cc00839fc 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 7b3f23277a6..e0c37efec51 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 443e1bcd1bc..f7993c28393 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 20494eee424..dc7a15758d9 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 12c786c5aef..dece8d06c87 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 b7872ca1ab4..bd0430f9786 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 5a2f289ff32..e204d465ec8 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 448b4d3bb97..9bc0ba08e25 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 8338cbf7f11..75ffffc521e 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 1d3ab4f6b19..9977bb9bdb4 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 466ca7296f8..3311b8d86a0 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 9fe3089c356..0b0117465df 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 49983d44eb9..84719d08e4a 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 84892f3f3fd..bc7dc10ba8d 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 9eb3c80435c..99fdc54603b 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 87ee2e6e384..d3551765079 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 12f40f7b461..c39ef2885b0 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 411a1d494df..d74d24f71a1 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 468597ba5ea..eaadc4197fe 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 ac00faaa9bc..21586aaa266 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 f04f98896a5..a5bdee618ee 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 9f1f0eb992a..0965783bf4d 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 312f55ce0d8..06b53456973 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 8cc50fa9dfa..f6dafad43ac 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 fe76f4ce632..d22593a4c3e 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 ed2fefc823d..4c409ec5a4d 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 8813883c151..41ce24989a5 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 774b66ab67e..c96433f17df 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 c03939e3e9c..dfbe2f27fcb 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 f8fabd56dce..aed763ca4a4 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 809943c616f..351065226af 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 652153f9a8c..117f2bcb5aa 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 ee7fc8cffb7..67ed692691b 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 230849cc78d..8c13545a801 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 20f9e98e530..171ff9d1701 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 850d17212fd..d2e987066ef 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 a2264a65b16..90af33bd0cd 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 8d80a2a45d0..c9e9cc4196a 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 e6040daefac..ab16e5306f1 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 3a25b68eeac..f7914177f8a 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 b009fe3b3f4..eb28dd26b06 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 a7d63095469..86983092ad0 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 e5f8fbd057e..57bd2451d2a 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 cccce36f314..59a7fb5bb2e 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 31e836f4767..b5b8b511aee 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 d961c2e6e3d..3ab173ea43a 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 9459a4923c8..10fe70c611e 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 b553c190f55..840a7afc2ee 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 b490db20b8d..b3af06ad070 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 404653a0353..5a1a86ef673 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"