Cleanup unused loggers (components A-M) (#41600)

This commit is contained in:
Philip Allgaier 2020-10-12 16:59:05 +02:00 committed by GitHub
parent 9e6df38994
commit 625bbe6238
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
251 changed files with 16 additions and 891 deletions

View File

@ -2,7 +2,6 @@
import asyncio import asyncio
from collections import OrderedDict from collections import OrderedDict
from datetime import timedelta from datetime import timedelta
import logging
from typing import Any, Dict, List, Optional, Tuple, cast from typing import Any, Dict, List, Optional, Tuple, cast
import jwt import jwt
@ -20,7 +19,6 @@ from .providers import AuthProvider, LoginFlow, auth_provider_from_config
EVENT_USER_ADDED = "user_added" EVENT_USER_ADDED = "user_added"
EVENT_USER_REMOVED = "user_removed" EVENT_USER_REMOVED = "user_removed"
_LOGGER = logging.getLogger(__name__)
_MfaModuleDict = Dict[str, MultiFactorAuthModule] _MfaModuleDict = Dict[str, MultiFactorAuthModule]
_ProviderKey = Tuple[str, Optional[str]] _ProviderKey = Tuple[str, Optional[str]]
_ProviderDict = Dict[_ProviderKey, AuthProvider] _ProviderDict = Dict[_ProviderKey, AuthProvider]

View File

@ -1,5 +1,4 @@
"""Example auth module.""" """Example auth module."""
import logging
from typing import Any, Dict from typing import Any, Dict
import voluptuous as vol import voluptuous as vol
@ -22,8 +21,6 @@ CONFIG_SCHEMA = MULTI_FACTOR_AUTH_MODULE_SCHEMA.extend(
extra=vol.PREVENT_EXTRA, extra=vol.PREVENT_EXTRA,
) )
_LOGGER = logging.getLogger(__name__)
@MULTI_FACTOR_AUTH_MODULES.register("insecure_example") @MULTI_FACTOR_AUTH_MODULES.register("insecure_example")
class InsecureExampleModule(MultiFactorAuthModule): class InsecureExampleModule(MultiFactorAuthModule):

View File

@ -1,7 +1,6 @@
"""Time-based One Time Password auth module.""" """Time-based One Time Password auth module."""
import asyncio import asyncio
from io import BytesIO from io import BytesIO
import logging
from typing import Any, Dict, Optional, Tuple from typing import Any, Dict, Optional, Tuple
import voluptuous as vol import voluptuous as vol
@ -30,8 +29,6 @@ INPUT_FIELD_CODE = "code"
DUMMY_SECRET = "FPPTH34D4E3MI2HG" DUMMY_SECRET = "FPPTH34D4E3MI2HG"
_LOGGER = logging.getLogger(__name__)
def _generate_qr_code(data: str) -> str: def _generate_qr_code(data: str) -> str:
"""Generate a base64 PNG string represent QR Code image of data.""" """Generate a base64 PNG string represent QR Code image of data."""

View File

@ -1,6 +1,4 @@
"""Config flow to configure the AdGuard Home integration.""" """Config flow to configure the AdGuard Home integration."""
import logging
from adguardhome import AdGuardHome, AdGuardHomeConnectionError from adguardhome import AdGuardHome, AdGuardHomeConnectionError
import voluptuous as vol import voluptuous as vol
@ -17,8 +15,6 @@ from homeassistant.const import (
) )
from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.aiohttp_client import async_get_clientsession
_LOGGER = logging.getLogger(__name__)
@config_entries.HANDLERS.register(DOMAIN) @config_entries.HANDLERS.register(DOMAIN)
class AdGuardHomeFlowHandler(ConfigFlow): class AdGuardHomeFlowHandler(ConfigFlow):

View File

@ -1,6 +1,5 @@
"""Support for AdGuard Home sensors.""" """Support for AdGuard Home sensors."""
from datetime import timedelta from datetime import timedelta
import logging
from adguardhome import AdGuardHomeConnectionError from adguardhome import AdGuardHomeConnectionError
@ -15,8 +14,6 @@ from homeassistant.const import PERCENTAGE, TIME_MILLISECONDS
from homeassistant.exceptions import PlatformNotReady from homeassistant.exceptions import PlatformNotReady
from homeassistant.helpers.typing import HomeAssistantType from homeassistant.helpers.typing import HomeAssistantType
_LOGGER = logging.getLogger(__name__)
SCAN_INTERVAL = timedelta(seconds=300) SCAN_INTERVAL = timedelta(seconds=300)
PARALLEL_UPDATES = 4 PARALLEL_UPDATES = 4

View File

@ -1,6 +1,4 @@
"""Support for ADS binary sensors.""" """Support for ADS binary sensors."""
import logging
import voluptuous as vol import voluptuous as vol
from homeassistant.components.binary_sensor import ( 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 from . import CONF_ADS_VAR, DATA_ADS, STATE_KEY_STATE, AdsEntity
_LOGGER = logging.getLogger(__name__)
DEFAULT_NAME = "ADS binary sensor" DEFAULT_NAME = "ADS binary sensor"
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
{ {

View File

@ -1,6 +1,4 @@
"""Support for ADS covers.""" """Support for ADS covers."""
import logging
import voluptuous as vol import voluptuous as vol
from homeassistant.components.cover import ( from homeassistant.components.cover import (
@ -25,8 +23,6 @@ from . import (
AdsEntity, AdsEntity,
) )
_LOGGER = logging.getLogger(__name__)
DEFAULT_NAME = "ADS Cover" DEFAULT_NAME = "ADS Cover"
CONF_ADS_VAR_SET_POS = "adsvar_set_position" CONF_ADS_VAR_SET_POS = "adsvar_set_position"

View File

@ -1,6 +1,4 @@
"""Support for ADS light sources.""" """Support for ADS light sources."""
import logging
import voluptuous as vol import voluptuous as vol
from homeassistant.components.light import ( from homeassistant.components.light import (
@ -21,7 +19,6 @@ from . import (
AdsEntity, AdsEntity,
) )
_LOGGER = logging.getLogger(__name__)
DEFAULT_NAME = "ADS Light" DEFAULT_NAME = "ADS Light"
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
{ {

View File

@ -1,6 +1,4 @@
"""Support for ADS sensors.""" """Support for ADS sensors."""
import logging
import voluptuous as vol import voluptuous as vol
from homeassistant.components import ads 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 from . import CONF_ADS_FACTOR, CONF_ADS_TYPE, CONF_ADS_VAR, STATE_KEY_STATE, AdsEntity
_LOGGER = logging.getLogger(__name__)
DEFAULT_NAME = "ADS sensor" DEFAULT_NAME = "ADS sensor"
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
{ {

View File

@ -1,6 +1,4 @@
"""Support for ADS switch platform.""" """Support for ADS switch platform."""
import logging
import voluptuous as vol import voluptuous as vol
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchEntity 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 from . import CONF_ADS_VAR, DATA_ADS, STATE_KEY_STATE, AdsEntity
_LOGGER = logging.getLogger(__name__)
DEFAULT_NAME = "ADS Switch" DEFAULT_NAME = "ADS Switch"
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(

View File

@ -1,6 +1,5 @@
"""Support for Agent.""" """Support for Agent."""
import asyncio import asyncio
import logging
from agent import AgentError from agent import AgentError
from agent.a import Agent from agent.a import Agent
@ -14,8 +13,6 @@ from .const import CONNECTION, DOMAIN as AGENT_DOMAIN, SERVER_URL
ATTRIBUTION = "ispyconnect.com" ATTRIBUTION = "ispyconnect.com"
DEFAULT_BRAND = "Agent DVR by ispyconnect.com" DEFAULT_BRAND = "Agent DVR by ispyconnect.com"
_LOGGER = logging.getLogger(__name__)
FORWARDS = ["alarm_control_panel", "camera"] FORWARDS = ["alarm_control_panel", "camera"]

View File

@ -1,6 +1,4 @@
"""Support for AlarmDecoder-based alarm control panels (Honeywell/DSC).""" """Support for AlarmDecoder-based alarm control panels (Honeywell/DSC)."""
import logging
import voluptuous as vol import voluptuous as vol
from homeassistant.components.alarm_control_panel import ( from homeassistant.components.alarm_control_panel import (
@ -36,8 +34,6 @@ from .const import (
SIGNAL_PANEL_MESSAGE, SIGNAL_PANEL_MESSAGE,
) )
_LOGGER = logging.getLogger(__name__)
SERVICE_ALARM_TOGGLE_CHIME = "alarm_toggle_chime" SERVICE_ALARM_TOGGLE_CHIME = "alarm_toggle_chime"
SERVICE_ALARM_KEYPRESS = "alarm_keypress" SERVICE_ALARM_KEYPRESS = "alarm_keypress"

View File

@ -1,14 +1,10 @@
"""Support for AlarmDecoder sensors (Shows Panel Display).""" """Support for AlarmDecoder sensors (Shows Panel Display)."""
import logging
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.helpers.entity import Entity from homeassistant.helpers.entity import Entity
from homeassistant.helpers.typing import HomeAssistantType from homeassistant.helpers.typing import HomeAssistantType
from .const import SIGNAL_PANEL_MESSAGE from .const import SIGNAL_PANEL_MESSAGE
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry( async def async_setup_entry(
hass: HomeAssistantType, entry: ConfigEntry, async_add_entities hass: HomeAssistantType, entry: ConfigEntry, async_add_entities

View File

@ -1,6 +1,4 @@
"""Support for Alexa skill service end point.""" """Support for Alexa skill service end point."""
import logging
import voluptuous as vol import voluptuous as vol
from homeassistant.const import CONF_CLIENT_ID, CONF_CLIENT_SECRET, CONF_NAME from homeassistant.const import CONF_CLIENT_ID, CONF_CLIENT_SECRET, CONF_NAME
@ -24,8 +22,6 @@ from .const import (
DOMAIN, DOMAIN,
) )
_LOGGER = logging.getLogger(__name__)
CONF_FLASH_BRIEFINGS = "flash_briefings" CONF_FLASH_BRIEFINGS = "flash_briefings"
CONF_SMART_HOME = "smart_home" CONF_SMART_HOME = "smart_home"
DEFAULT_LOCALE = "en-US" DEFAULT_LOCALE = "en-US"

View File

@ -1,6 +1,4 @@
"""Support for Ambiclimate devices.""" """Support for Ambiclimate devices."""
import logging
import voluptuous as vol import voluptuous as vol
from homeassistant.const import CONF_CLIENT_ID, CONF_CLIENT_SECRET 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 . import config_flow
from .const import DOMAIN from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
CONFIG_SCHEMA = vol.Schema( CONFIG_SCHEMA = vol.Schema(
{ {
DOMAIN: vol.Schema( DOMAIN: vol.Schema(

View File

@ -1,6 +1,4 @@
"""Support for Ambient Weather Station binary sensors.""" """Support for Ambient Weather Station binary sensors."""
import logging
from homeassistant.components.binary_sensor import BinarySensorEntity from homeassistant.components.binary_sensor import BinarySensorEntity
from homeassistant.const import ATTR_NAME from homeassistant.const import ATTR_NAME
from homeassistant.core import callback from homeassistant.core import callback
@ -28,8 +26,6 @@ from .const import (
TYPE_BINARY_SENSOR, TYPE_BINARY_SENSOR,
) )
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up Ambient PWS binary sensors based on a config entry.""" """Set up Ambient PWS binary sensors based on a config entry."""

View File

@ -1,6 +1,4 @@
"""Support for Ambient Weather Station sensors.""" """Support for Ambient Weather Station sensors."""
import logging
from homeassistant.const import ATTR_NAME from homeassistant.const import ATTR_NAME
from homeassistant.core import callback from homeassistant.core import callback
@ -18,8 +16,6 @@ from .const import (
TYPE_SENSOR, TYPE_SENSOR,
) )
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up Ambient PWS sensors based on a config entry.""" """Set up Ambient PWS sensors based on a config entry."""

View File

@ -1,7 +1,6 @@
"""Support for Android IP Webcam.""" """Support for Android IP Webcam."""
import asyncio import asyncio
from datetime import timedelta from datetime import timedelta
import logging
from pydroid_ipcam import PyDroidIPCam from pydroid_ipcam import PyDroidIPCam
import voluptuous as vol 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.helpers.event import async_track_point_in_utc_time
from homeassistant.util.dt import utcnow from homeassistant.util.dt import utcnow
_LOGGER = logging.getLogger(__name__)
ATTR_AUD_CONNS = "Audio Connections" ATTR_AUD_CONNS = "Audio Connections"
ATTR_HOST = "host" ATTR_HOST = "host"
ATTR_VID_CONNS = "Video Connections" ATTR_VID_CONNS = "Video Connections"

View File

@ -1,7 +1,6 @@
"""Support for Apache Kafka.""" """Support for Apache Kafka."""
from datetime import datetime from datetime import datetime
import json import json
import logging
from aiokafka import AIOKafkaProducer from aiokafka import AIOKafkaProducer
import voluptuous as vol import voluptuous as vol
@ -20,8 +19,6 @@ import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entityfilter import FILTER_SCHEMA from homeassistant.helpers.entityfilter import FILTER_SCHEMA
from homeassistant.util import ssl as ssl_util from homeassistant.util import ssl as ssl_util
_LOGGER = logging.getLogger(__name__)
DOMAIN = "apache_kafka" DOMAIN = "apache_kafka"
CONF_FILTER = "filter" CONF_FILTER = "filter"

View File

@ -1,5 +1,4 @@
"""Support for AquaLogic sensors.""" """Support for AquaLogic sensors."""
import logging
import voluptuous as vol import voluptuous as vol
@ -17,8 +16,6 @@ from homeassistant.helpers.entity import Entity
from . import DOMAIN, UPDATE_TOPIC from . import DOMAIN, UPDATE_TOPIC
_LOGGER = logging.getLogger(__name__)
TEMP_UNITS = [TEMP_CELSIUS, TEMP_FAHRENHEIT] TEMP_UNITS = [TEMP_CELSIUS, TEMP_FAHRENHEIT]
PERCENT_UNITS = [PERCENTAGE, PERCENTAGE] PERCENT_UNITS = [PERCENTAGE, PERCENTAGE]
SALT_UNITS = ["g/L", "PPM"] SALT_UNITS = ["g/L", "PPM"]

View File

@ -1,6 +1,4 @@
"""Support for AquaLogic switches.""" """Support for AquaLogic switches."""
import logging
from aqualogic.core import States from aqualogic.core import States
import voluptuous as vol import voluptuous as vol
@ -10,8 +8,6 @@ import homeassistant.helpers.config_validation as cv
from . import DOMAIN, UPDATE_TOPIC from . import DOMAIN, UPDATE_TOPIC
_LOGGER = logging.getLogger(__name__)
SWITCH_TYPES = { SWITCH_TYPES = {
"lights": "Lights", "lights": "Lights",
"filter": "Filter", "filter": "Filter",

View File

@ -1,5 +1,4 @@
"""Config flow to configure the Arcam FMJ component.""" """Config flow to configure the Arcam FMJ component."""
import logging
from urllib.parse import urlparse from urllib.parse import urlparse
from arcam.fmj.client import Client, ConnectionFailed 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 from .const import DEFAULT_NAME, DEFAULT_PORT, DOMAIN, DOMAIN_DATA_ENTRIES
_LOGGER = logging.getLogger(__name__)
def get_entry_client(hass, entry): def get_entry_client(hass, entry):
"""Retrieve client associated with a config entry.""" """Retrieve client associated with a config entry."""

View File

@ -1,6 +1,4 @@
"""Support for getting information from Arduino pins.""" """Support for getting information from Arduino pins."""
import logging
import voluptuous as vol import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.components.sensor import PLATFORM_SCHEMA
@ -10,8 +8,6 @@ from homeassistant.helpers.entity import Entity
from . import DOMAIN from . import DOMAIN
_LOGGER = logging.getLogger(__name__)
CONF_PINS = "pins" CONF_PINS = "pins"
CONF_TYPE = "analog" CONF_TYPE = "analog"

View File

@ -1,6 +1,4 @@
"""Support for switching Arduino pins on and off.""" """Support for switching Arduino pins on and off."""
import logging
import voluptuous as vol import voluptuous as vol
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchEntity from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchEntity
@ -9,8 +7,6 @@ import homeassistant.helpers.config_validation as cv
from . import DOMAIN from . import DOMAIN
_LOGGER = logging.getLogger(__name__)
CONF_PINS = "pins" CONF_PINS = "pins"
CONF_TYPE = "digital" CONF_TYPE = "digital"
CONF_NEGATE = "negate" CONF_NEGATE = "negate"

View File

@ -1,7 +1,6 @@
"""Support for the Asterisk CDR interface.""" """Support for the Asterisk CDR interface."""
import datetime import datetime
import hashlib import hashlib
import logging
from homeassistant.components.asterisk_mbox import ( from homeassistant.components.asterisk_mbox import (
DOMAIN as ASTERISK_DOMAIN, DOMAIN as ASTERISK_DOMAIN,
@ -11,8 +10,6 @@ from homeassistant.components.mailbox import Mailbox
from homeassistant.core import callback from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.helpers.dispatcher import async_dispatcher_connect
_LOGGER = logging.getLogger(__name__)
MAILBOX_NAME = "asterisk_cdr" MAILBOX_NAME = "asterisk_cdr"

View File

@ -1,15 +1,10 @@
"""Base class for August entity.""" """Base class for August entity."""
import logging
from homeassistant.core import callback from homeassistant.core import callback
from homeassistant.helpers.entity import Entity from homeassistant.helpers.entity import Entity
from . import DOMAIN from . import DOMAIN
from .const import MANUFACTURER from .const import MANUFACTURER
_LOGGER = logging.getLogger(__name__)
class AugustEntityMixin(Entity): class AugustEntityMixin(Entity):
"""Base implementation for August device.""" """Base implementation for August device."""

View File

@ -115,7 +115,6 @@ Result will be a long-lived access token:
""" """
from datetime import timedelta from datetime import timedelta
import logging
import uuid import uuid
from aiohttp import web 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_CREDENTIALS = "credentials"
RESULT_TYPE_USER = "user" RESULT_TYPE_USER = "user"
_LOGGER = logging.getLogger(__name__)
@bind_hass @bind_hass
def create_auth_code(hass, client_id: str, user: User) -> str: def create_auth_code(hass, client_id: str, user: User) -> str:

View File

@ -1,6 +1,4 @@
"""Support for the Elgato Avea lights.""" """Support for the Elgato Avea lights."""
import logging
import avea # pylint: disable=import-error import avea # pylint: disable=import-error
from homeassistant.components.light import ( from homeassistant.components.light import (
@ -13,8 +11,6 @@ from homeassistant.components.light import (
from homeassistant.exceptions import PlatformNotReady from homeassistant.exceptions import PlatformNotReady
import homeassistant.util.color as color_util import homeassistant.util.color as color_util
_LOGGER = logging.getLogger(__name__)
SUPPORT_AVEA = SUPPORT_BRIGHTNESS | SUPPORT_COLOR SUPPORT_AVEA = SUPPORT_BRIGHTNESS | SUPPORT_COLOR

View File

@ -1,6 +1,5 @@
"""Support for Avion dimmers.""" """Support for Avion dimmers."""
import importlib import importlib
import logging
import time import time
import voluptuous as vol import voluptuous as vol
@ -21,8 +20,6 @@ from homeassistant.const import (
) )
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
SUPPORT_AVION_LED = SUPPORT_BRIGHTNESS SUPPORT_AVION_LED = SUPPORT_BRIGHTNESS
DEVICE_SCHEMA = vol.Schema( DEVICE_SCHEMA = vol.Schema(

View File

@ -1,7 +1,6 @@
"""The avri component.""" """The avri component."""
import asyncio import asyncio
from datetime import timedelta from datetime import timedelta
import logging
from avri.api import Avri from avri.api import Avri
@ -16,8 +15,6 @@ from .const import (
DOMAIN, DOMAIN,
) )
_LOGGER = logging.getLogger(__name__)
PLATFORMS = ["sensor"] PLATFORMS = ["sensor"]
SCAN_INTERVAL = timedelta(hours=4) SCAN_INTERVAL = timedelta(hours=4)

View File

@ -7,7 +7,7 @@ from homeassistant.const import CONF_DEVICE, EVENT_HOMEASSISTANT_STOP
from .const import DOMAIN as AXIS_DOMAIN from .const import DOMAIN as AXIS_DOMAIN
from .device import AxisNetworkDevice from .device import AxisNetworkDevice
LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup(hass, config): 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): async def async_migrate_entry(hass, config_entry):
"""Migrate old 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 # Flatten configuration but keep old data if user rollbacks HASS
if config_entry.version == 1: if config_entry.version == 1:
@ -55,6 +55,6 @@ async def async_migrate_entry(hass, config_entry):
config_entry.version = 2 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 return True

View File

@ -1,6 +1,4 @@
"""Config flow to configure the Azure DevOps integration.""" """Config flow to configure the Azure DevOps integration."""
import logging
from aioazuredevops.client import DevOpsClient from aioazuredevops.client import DevOpsClient
import aiohttp import aiohttp
import voluptuous as vol import voluptuous as vol
@ -14,8 +12,6 @@ from homeassistant.components.azure_devops.const import ( # pylint:disable=unus
) )
from homeassistant.config_entries import ConfigFlow from homeassistant.config_entries import ConfigFlow
_LOGGER = logging.getLogger(__name__)
class AzureDevOpsFlowHandler(ConfigFlow, domain=DOMAIN): class AzureDevOpsFlowHandler(ConfigFlow, domain=DOMAIN):
"""Handle a Azure DevOps config flow.""" """Handle a Azure DevOps config flow."""

View File

@ -1,12 +1,8 @@
"""Support for controlling GPIO pins of a Beaglebone Black.""" """Support for controlling GPIO pins of a Beaglebone Black."""
import logging
from Adafruit_BBIO import GPIO # pylint: disable=import-error from Adafruit_BBIO import GPIO # pylint: disable=import-error
from homeassistant.const import EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP from homeassistant.const import EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP
_LOGGER = logging.getLogger(__name__)
DOMAIN = "bbb_gpio" DOMAIN = "bbb_gpio"

View File

@ -1,6 +1,4 @@
"""Support for binary sensor using Beaglebone Black GPIO.""" """Support for binary sensor using Beaglebone Black GPIO."""
import logging
import voluptuous as vol import voluptuous as vol
from homeassistant.components import bbb_gpio 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 from homeassistant.const import CONF_NAME, DEVICE_DEFAULT_NAME
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
CONF_PINS = "pins" CONF_PINS = "pins"
CONF_BOUNCETIME = "bouncetime" CONF_BOUNCETIME = "bouncetime"
CONF_INVERT_LOGIC = "invert_logic" CONF_INVERT_LOGIC = "invert_logic"

View File

@ -1,6 +1,4 @@
"""Allows to configure a switch using BeagleBone Black GPIO.""" """Allows to configure a switch using BeagleBone Black GPIO."""
import logging
import voluptuous as vol import voluptuous as vol
from homeassistant.components import bbb_gpio 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 import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import ToggleEntity from homeassistant.helpers.entity import ToggleEntity
_LOGGER = logging.getLogger(__name__)
CONF_PINS = "pins" CONF_PINS = "pins"
CONF_INITIAL = "initial" CONF_INITIAL = "initial"
CONF_INVERT_LOGIC = "invert_logic" CONF_INVERT_LOGIC = "invert_logic"

View File

@ -1,6 +1,4 @@
"""Platform for beewi_smartclim integration.""" """Platform for beewi_smartclim integration."""
import logging
from beewi_smartclim import BeewiSmartClimPoller # pylint: disable=import-error from beewi_smartclim import BeewiSmartClimPoller # pylint: disable=import-error
import voluptuous as vol import voluptuous as vol
@ -17,8 +15,6 @@ from homeassistant.const import (
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity from homeassistant.helpers.entity import Entity
_LOGGER = logging.getLogger(__name__)
# Default values # Default values
DEFAULT_NAME = "BeeWi SmartClim" DEFAULT_NAME = "BeeWi SmartClim"

View File

@ -1,7 +1,4 @@
"""Support for Bizkaibus, Biscay (Basque Country, Spain) Bus service.""" """Support for Bizkaibus, Biscay (Basque Country, Spain) Bus service."""
import logging
from bizkaibus.bizkaibus import BizkaibusData from bizkaibus.bizkaibus import BizkaibusData
import voluptuous as vol import voluptuous as vol
@ -10,8 +7,6 @@ from homeassistant.const import CONF_NAME, TIME_MINUTES
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity from homeassistant.helpers.entity import Entity
_LOGGER = logging.getLogger(__name__)
ATTR_DUE_IN = "Due in" ATTR_DUE_IN = "Due in"
CONF_STOP_ID = "stopid" CONF_STOP_ID = "stopid"

View File

@ -1,6 +1,4 @@
"""Support for Blinkstick lights.""" """Support for Blinkstick lights."""
import logging
from blinkstick import blinkstick from blinkstick import blinkstick
import voluptuous as vol import voluptuous as vol
@ -16,8 +14,6 @@ from homeassistant.const import CONF_NAME
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
import homeassistant.util.color as color_util import homeassistant.util.color as color_util
_LOGGER = logging.getLogger(__name__)
CONF_SERIAL = "serial" CONF_SERIAL = "serial"
DEFAULT_NAME = "Blinkstick" DEFAULT_NAME = "Blinkstick"

View File

@ -1,6 +1,4 @@
"""Support the binary sensors of a BloomSky weather station.""" """Support the binary sensors of a BloomSky weather station."""
import logging
import voluptuous as vol import voluptuous as vol
from homeassistant.components.binary_sensor import ( from homeassistant.components.binary_sensor import (
@ -13,8 +11,6 @@ import homeassistant.helpers.config_validation as cv
from . import DOMAIN from . import DOMAIN
_LOGGER = logging.getLogger(__name__)
SENSOR_TYPES = {"Rain": DEVICE_CLASS_MOISTURE, "Night": None} SENSOR_TYPES = {"Rain": DEVICE_CLASS_MOISTURE, "Night": None}
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(

View File

@ -1,6 +1,4 @@
"""Support the sensor of a BloomSky weather station.""" """Support the sensor of a BloomSky weather station."""
import logging
import voluptuous as vol import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.components.sensor import PLATFORM_SCHEMA
@ -18,8 +16,6 @@ from homeassistant.helpers.entity import Entity
from . import DOMAIN from . import DOMAIN
LOGGER = logging.getLogger(__name__)
# These are the available sensors # These are the available sensors
SENSOR_TYPES = [ SENSOR_TYPES = [
"Temperature", "Temperature",

View File

@ -1,7 +1,6 @@
"""The Bond integration.""" """The Bond integration."""
import asyncio import asyncio
from asyncio import TimeoutError as AsyncIOTimeoutError from asyncio import TimeoutError as AsyncIOTimeoutError
import logging
from aiohttp import ClientError, ClientTimeout from aiohttp import ClientError, ClientTimeout
from bond_api import Bond from bond_api import Bond
@ -16,7 +15,6 @@ from homeassistant.helpers.entity import SLOW_UPDATE_WARNING
from .const import DOMAIN from .const import DOMAIN
from .utils import BondHub from .utils import BondHub
_LOGGER = logging.getLogger(__name__)
PLATFORMS = ["cover", "fan", "light", "switch"] PLATFORMS = ["cover", "fan", "light", "switch"]
_API_TIMEOUT = SLOW_UPDATE_WARNING - 1 _API_TIMEOUT = SLOW_UPDATE_WARNING - 1

View File

@ -1,12 +1,9 @@
"""The Broadlink integration.""" """The Broadlink integration."""
from dataclasses import dataclass, field from dataclasses import dataclass, field
import logging
from .const import DOMAIN from .const import DOMAIN
from .device import BroadlinkDevice from .device import BroadlinkDevice
LOGGER = logging.getLogger(__name__)
@dataclass @dataclass
class BroadlinkData: class BroadlinkData:

View File

@ -1,6 +1,7 @@
"""Config flow for Broadlink devices.""" """Config flow for Broadlink devices."""
import errno import errno
from functools import partial from functools import partial
import logging
import socket import socket
import broadlink as blk 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.const import CONF_HOST, CONF_MAC, CONF_NAME, CONF_TIMEOUT, CONF_TYPE
from homeassistant.helpers import config_validation as cv from homeassistant.helpers import config_validation as cv
from . import LOGGER
from .const import ( # pylint: disable=unused-import from .const import ( # pylint: disable=unused-import
DEFAULT_PORT, DEFAULT_PORT,
DEFAULT_TIMEOUT, DEFAULT_TIMEOUT,
@ -24,6 +24,8 @@ from .const import ( # pylint: disable=unused-import
) )
from .helpers import format_mac from .helpers import format_mac
_LOGGER = logging.getLogger(__name__)
class BroadlinkFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): class BroadlinkFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a Broadlink config flow.""" """Handle a Broadlink config flow."""
@ -43,7 +45,7 @@ class BroadlinkFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
for device_type in device_types for device_type in device_types
} }
if device.type not in supported_types: if device.type not in supported_types:
LOGGER.error( _LOGGER.error(
"Unsupported device: %s. If it worked before, please open " "Unsupported device: %s. If it worked before, please open "
"an issue at https://github.com/home-assistant/core/issues", "an issue at https://github.com/home-assistant/core/issues",
hex(device.devtype), 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" 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: if self.source == config_entries.SOURCE_IMPORT:
return self.async_abort(reason=errors["base"]) return self.async_abort(reason=errors["base"])
@ -158,7 +160,7 @@ class BroadlinkFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
else: else:
await self.async_set_unique_id(device.mac.hex()) await self.async_set_unique_id(device.mac.hex())
if self.source == config_entries.SOURCE_IMPORT: if self.source == config_entries.SOURCE_IMPORT:
LOGGER.warning( _LOGGER.warning(
"The %s at %s is ready to be configured. Please " "The %s at %s is ready to be configured. Please "
"click Configuration in the sidebar and click " "click Configuration in the sidebar and click "
"Integrations. Then find the device there 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() return await self.async_step_finish()
await self.async_set_unique_id(device.mac.hex()) 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 "Failed to authenticate to the device at %s: %s", device.host[0], err_msg
) )
return self.async_show_form(step_id="auth", errors=errors) return self.async_show_form(step_id="auth", errors=errors)
@ -226,7 +228,7 @@ class BroadlinkFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
else: else:
return await self.async_step_finish() return await self.async_step_finish()
LOGGER.error( _LOGGER.error(
"Failed to unlock the device at %s: %s", device.host[0], err_msg "Failed to unlock the device at %s: %s", device.host[0], err_msg
) )

View File

@ -1,6 +1,5 @@
"""Support for the Brother service.""" """Support for the Brother service."""
from datetime import timedelta from datetime import timedelta
import logging
from homeassistant.const import DEVICE_CLASS_TIMESTAMP from homeassistant.const import DEVICE_CLASS_TIMESTAMP
from homeassistant.helpers.update_coordinator import CoordinatorEntity from homeassistant.helpers.update_coordinator import CoordinatorEntity
@ -37,8 +36,6 @@ ATTR_MODEL = "model"
ATTR_REMAINING_PAGES = "remaining_pages" ATTR_REMAINING_PAGES = "remaining_pages"
ATTR_SERIAL = "serial" ATTR_SERIAL = "serial"
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Add Brother entities from a config_entry.""" """Add Brother entities from a config_entry."""

View File

@ -1,6 +1,5 @@
"""The BSB-Lan integration.""" """The BSB-Lan integration."""
from datetime import timedelta from datetime import timedelta
import logging
from bsblan import BSBLan, BSBLanConnectionError from bsblan import BSBLan, BSBLanConnectionError
@ -16,8 +15,6 @@ from .const import CONF_PASSKEY, DATA_BSBLAN_CLIENT, DOMAIN
SCAN_INTERVAL = timedelta(seconds=30) SCAN_INTERVAL = timedelta(seconds=30)
_LOGGER = logging.getLogger(__name__)
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up the BSB-Lan component.""" """Set up the BSB-Lan component."""

View File

@ -17,7 +17,7 @@ CONF_DIMENSION = "dimension"
CONF_DELTA = "delta" CONF_DELTA = "delta"
CONF_COUNTRY = "country_code" CONF_COUNTRY = "country_code"
_LOG = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
# Maximum range according to docs # Maximum range according to docs
DIM_RANGE = vol.All(vol.Coerce(int), vol.Range(min=120, max=700)) DIM_RANGE = vol.All(vol.Coerce(int), vol.Range(min=120, max=700))
@ -125,7 +125,7 @@ class BuienradarCam(Camera):
res.raise_for_status() res.raise_for_status()
if res.status == 304: if res.status == 304:
_LOG.debug("HTTP 304 - success") _LOGGER.debug("HTTP 304 - success")
return True return True
last_modified = res.headers.get("Last-Modified") last_modified = res.headers.get("Last-Modified")
@ -133,11 +133,11 @@ class BuienradarCam(Camera):
self._last_modified = last_modified self._last_modified = last_modified
self._last_image = await res.read() 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 return True
except (asyncio.TimeoutError, aiohttp.ClientError) as err: 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 return False
async def async_camera_image(self) -> Optional[bytes]: async def async_camera_image(self) -> Optional[bytes]:
@ -166,7 +166,7 @@ class BuienradarCam(Camera):
async with self._condition: async with self._condition:
# can not be tested - mocked http response returns immediately # can not be tested - mocked http response returns immediately
if self._loading: if self._loading:
_LOG.debug("already loading - waiting for notification") _LOGGER.debug("already loading - waiting for notification")
await self._condition.wait() await self._condition.wait()
return self._last_image return self._last_image

View File

@ -1,5 +1,4 @@
"""Support for Canary alarm.""" """Support for Canary alarm."""
import logging
from typing import Callable, List from typing import Callable, List
from canary.api import LOCATION_MODE_AWAY, LOCATION_MODE_HOME, LOCATION_MODE_NIGHT 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 .const import DATA_COORDINATOR, DOMAIN
from .coordinator import CanaryDataUpdateCoordinator from .coordinator import CanaryDataUpdateCoordinator
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry( async def async_setup_entry(
hass: HomeAssistantType, hass: HomeAssistantType,

View File

@ -1,7 +1,6 @@
"""Support for Canary camera.""" """Support for Canary camera."""
import asyncio import asyncio
from datetime import timedelta from datetime import timedelta
import logging
from typing import Callable, List from typing import Callable, List
from haffmpeg.camera import CameraMjpeg from haffmpeg.camera import CameraMjpeg
@ -28,8 +27,6 @@ from .const import (
) )
from .coordinator import CanaryDataUpdateCoordinator from .coordinator import CanaryDataUpdateCoordinator
_LOGGER = logging.getLogger(__name__)
MIN_TIME_BETWEEN_SESSION_RENEW = timedelta(seconds=90) MIN_TIME_BETWEEN_SESSION_RENEW = timedelta(seconds=90)
PLATFORM_SCHEMA = vol.All( PLATFORM_SCHEMA = vol.All(

View File

@ -1,6 +1,5 @@
"""Counter for the days until an HTTPS (TLS) certificate will expire.""" """Counter for the days until an HTTPS (TLS) certificate will expire."""
from datetime import timedelta from datetime import timedelta
import logging
import voluptuous as vol import voluptuous as vol
@ -21,8 +20,6 @@ from homeassistant.util import dt
from .const import DEFAULT_PORT, DOMAIN from .const import DEFAULT_PORT, DOMAIN
_LOGGER = logging.getLogger(__name__)
SCAN_INTERVAL = timedelta(hours=12) SCAN_INTERVAL = timedelta(hours=12)
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(

View File

@ -1,6 +1,4 @@
"""Support for interfacing with an instance of getchannels.com.""" """Support for interfacing with an instance of getchannels.com."""
import logging
from pychannels import Channels from pychannels import Channels
import voluptuous as vol 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 from .const import SERVICE_SEEK_BACKWARD, SERVICE_SEEK_BY, SERVICE_SEEK_FORWARD
_LOGGER = logging.getLogger(__name__)
DATA_CHANNELS = "channels" DATA_CHANNELS = "channels"
DEFAULT_NAME = "Channels" DEFAULT_NAME = "Channels"
DEFAULT_PORT = 57000 DEFAULT_PORT = 57000

View File

@ -1,14 +1,9 @@
"""The Unify Circuit component.""" """The Unify Circuit component."""
import logging
import voluptuous as vol import voluptuous as vol
from homeassistant.const import CONF_NAME, CONF_URL from homeassistant.const import CONF_NAME, CONF_URL
from homeassistant.helpers import config_validation as cv, discovery from homeassistant.helpers import config_validation as cv, discovery
_LOGGER = logging.getLogger(__name__)
DOMAIN = "circuit" DOMAIN = "circuit"
CONF_WEBHOOK = "webhook" CONF_WEBHOOK = "webhook"

View File

@ -1,6 +1,5 @@
"""Support for Clementine Music Player as media player.""" """Support for Clementine Music Player as media player."""
from datetime import timedelta from datetime import timedelta
import logging
import time import time
from clementineremote import ClementineRemote from clementineremote import ClementineRemote
@ -28,8 +27,6 @@ from homeassistant.const import (
) )
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
DEFAULT_NAME = "Clementine Remote" DEFAULT_NAME = "Clementine Remote"
DEFAULT_PORT = 5500 DEFAULT_PORT = 5500

View File

@ -1,6 +1,4 @@
"""Component to integrate the Home Assistant cloud.""" """Component to integrate the Home Assistant cloud."""
import logging
from hass_nabucasa import Cloud from hass_nabucasa import Cloud
import voluptuous as vol import voluptuous as vol
@ -43,8 +41,6 @@ from .const import (
) )
from .prefs import CloudPreferences from .prefs import CloudPreferences
_LOGGER = logging.getLogger(__name__)
DEFAULT_MODE = MODE_PROD DEFAULT_MODE = MODE_PROD
SERVICE_REMOTE_CONNECT = "remote_connect" SERVICE_REMOTE_CONNECT = "remote_connect"

View File

@ -1,6 +1,5 @@
"""Interface implementation for cloud client.""" """Interface implementation for cloud client."""
import asyncio import asyncio
import logging
from pathlib import Path from pathlib import Path
from typing import Any, Dict from typing import Any, Dict
@ -22,8 +21,6 @@ from . import alexa_config, google_config, utils
from .const import DISPATCHER_REMOTE_UPDATE, DOMAIN from .const import DISPATCHER_REMOTE_UPDATE, DOMAIN
from .prefs import CloudPreferences from .prefs import CloudPreferences
_LOGGER = logging.getLogger(__name__)
class CloudClient(Interface): class CloudClient(Interface):
"""Interface class for Home Assistant Cloud.""" """Interface class for Home Assistant Cloud."""

View File

@ -1,6 +1,5 @@
"""Support for custom shell commands to retrieve values.""" """Support for custom shell commands to retrieve values."""
from datetime import timedelta from datetime import timedelta
import logging
import voluptuous as vol 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 .const import CONF_COMMAND_TIMEOUT, DEFAULT_TIMEOUT, DOMAIN, PLATFORMS
from .sensor import CommandSensorData from .sensor import CommandSensorData
_LOGGER = logging.getLogger(__name__)
DEFAULT_NAME = "Binary Command Sensor" DEFAULT_NAME = "Binary Command Sensor"
DEFAULT_PAYLOAD_ON = "ON" DEFAULT_PAYLOAD_ON = "ON"
DEFAULT_PAYLOAD_OFF = "OFF" DEFAULT_PAYLOAD_OFF = "OFF"

View File

@ -7,7 +7,6 @@ A callback has to be provided to `request_config` which will be called when
the user has submitted configuration information. the user has submitted configuration information.
""" """
import functools as ft import functools as ft
import logging
from homeassistant.const import ( from homeassistant.const import (
ATTR_ENTITY_PICTURE, ATTR_ENTITY_PICTURE,
@ -19,7 +18,6 @@ from homeassistant.helpers.entity import async_generate_entity_id
from homeassistant.loader import bind_hass from homeassistant.loader import bind_hass
from homeassistant.util.async_ import run_callback_threadsafe from homeassistant.util.async_ import run_callback_threadsafe
_LOGGER = logging.getLogger(__name__)
_KEY_INSTANCE = "configurator" _KEY_INSTANCE = "configurator"
DATA_REQUESTS = "configurator_requests" DATA_REQUESTS = "configurator_requests"

View File

@ -1,5 +1,4 @@
"""Standard conversastion implementation for Home Assistant.""" """Standard conversastion implementation for Home Assistant."""
import logging
import re import re
from typing import Optional from typing import Optional
@ -18,8 +17,6 @@ from .agent import AbstractConversationAgent
from .const import DOMAIN from .const import DOMAIN
from .util import create_matcher from .util import create_matcher
_LOGGER = logging.getLogger(__name__)
REGEX_TURN_COMMAND = re.compile(r"turn (?P<name>(?: |\w)+) (?P<command>\w+)") REGEX_TURN_COMMAND = re.compile(r"turn (?P<name>(?: |\w)+) (?P<command>\w+)")
REGEX_TYPE = type(re.compile("")) REGEX_TYPE = type(re.compile(""))

View File

@ -1,6 +1,4 @@
"""Config flow for Coronavirus integration.""" """Config flow for Coronavirus integration."""
import logging
import voluptuous as vol import voluptuous as vol
from homeassistant import config_entries from homeassistant import config_entries
@ -8,8 +6,6 @@ from homeassistant import config_entries
from . import get_coordinator from . import get_coordinator
from .const import DOMAIN, OPTION_WORLDWIDE # pylint:disable=unused-import from .const import DOMAIN, OPTION_WORLDWIDE # pylint:disable=unused-import
_LOGGER = logging.getLogger(__name__)
class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow for Coronavirus.""" """Handle a config flow for Coronavirus."""

View File

@ -1,6 +1,4 @@
"""Support for displaying the current CPU speed.""" """Support for displaying the current CPU speed."""
import logging
from cpuinfo import cpuinfo from cpuinfo import cpuinfo
import voluptuous as vol import voluptuous as vol
@ -9,8 +7,6 @@ from homeassistant.const import CONF_NAME, FREQUENCY_GIGAHERTZ
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity from homeassistant.helpers.entity import Entity
_LOGGER = logging.getLogger(__name__)
ATTR_BRAND = "brand" ATTR_BRAND = "brand"
ATTR_HZ = "ghz_advertised" ATTR_HZ = "ghz_advertised"
ATTR_ARCH = "arch" ATTR_ARCH = "arch"

View File

@ -1,7 +1,6 @@
"""Sensor for Crime Reports.""" """Sensor for Crime Reports."""
from collections import defaultdict from collections import defaultdict
from datetime import timedelta from datetime import timedelta
import logging
import crimereports import crimereports
import voluptuous as vol import voluptuous as vol
@ -26,8 +25,6 @@ from homeassistant.util import slugify
from homeassistant.util.distance import convert from homeassistant.util.distance import convert
from homeassistant.util.dt import now from homeassistant.util.dt import now
_LOGGER = logging.getLogger(__name__)
DOMAIN = "crimereports" DOMAIN = "crimereports"
EVENT_INCIDENT = f"{DOMAIN}_incident" EVENT_INCIDENT = f"{DOMAIN}_incident"

View File

@ -1,12 +1,8 @@
"""Support for Daikin AirBase zones.""" """Support for Daikin AirBase zones."""
import logging
from homeassistant.helpers.entity import ToggleEntity from homeassistant.helpers.entity import ToggleEntity
from . import DOMAIN as DAIKIN_DOMAIN from . import DOMAIN as DAIKIN_DOMAIN
_LOGGER = logging.getLogger(__name__)
ZONE_ICON = "mdi:home-circle" ZONE_ICON = "mdi:home-circle"

View File

@ -1,13 +1,11 @@
"""Set up the demo environment that mimics interaction with devices.""" """Set up the demo environment that mimics interaction with devices."""
import asyncio import asyncio
import logging
from homeassistant import bootstrap, config_entries from homeassistant import bootstrap, config_entries
from homeassistant.const import ATTR_ENTITY_ID, EVENT_HOMEASSISTANT_START from homeassistant.const import ATTR_ENTITY_ID, EVENT_HOMEASSISTANT_START
import homeassistant.core as ha import homeassistant.core as ha
DOMAIN = "demo" DOMAIN = "demo"
_LOGGER = logging.getLogger(__name__)
COMPONENTS_WITH_CONFIG_ENTRY_DEMO_PLATFORM = [ COMPONENTS_WITH_CONFIG_ENTRY_DEMO_PLATFORM = [
"air_quality", "air_quality",

View File

@ -1,11 +1,8 @@
"""Demo camera platform that has a fake camera.""" """Demo camera platform that has a fake camera."""
import logging
from pathlib import Path from pathlib import Path
from homeassistant.components.camera import SUPPORT_ON_OFF, Camera 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): async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the Demo camera platform.""" """Set up the Demo camera platform."""

View File

@ -1,6 +1,4 @@
"""Demo platform that offers a fake climate device.""" """Demo platform that offers a fake climate device."""
import logging
from homeassistant.components.climate import ClimateEntity from homeassistant.components.climate import ClimateEntity
from homeassistant.components.climate.const import ( from homeassistant.components.climate.const import (
ATTR_TARGET_TEMP_HIGH, ATTR_TARGET_TEMP_HIGH,
@ -26,7 +24,6 @@ from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS, TEMP_FAHRENHEIT
from . import DOMAIN from . import DOMAIN
SUPPORT_FLAGS = 0 SUPPORT_FLAGS = 0
_LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):

View File

@ -1,6 +1,4 @@
"""Demo platform for the vacuum component.""" """Demo platform for the vacuum component."""
import logging
from homeassistant.components.vacuum import ( from homeassistant.components.vacuum import (
ATTR_CLEANED_AREA, ATTR_CLEANED_AREA,
STATE_CLEANING, STATE_CLEANING,
@ -25,8 +23,6 @@ from homeassistant.components.vacuum import (
VacuumEntity, VacuumEntity,
) )
_LOGGER = logging.getLogger(__name__)
SUPPORT_MINIMAL_SERVICES = SUPPORT_TURN_ON | SUPPORT_TURN_OFF SUPPORT_MINIMAL_SERVICES = SUPPORT_TURN_ON | SUPPORT_TURN_OFF
SUPPORT_BASIC_SERVICES = ( SUPPORT_BASIC_SERVICES = (

View File

@ -1,6 +1,5 @@
"""Support for information about the German train system.""" """Support for information about the German train system."""
from datetime import timedelta from datetime import timedelta
import logging
import schiene import schiene
import voluptuous as vol import voluptuous as vol
@ -10,8 +9,6 @@ import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity from homeassistant.helpers.entity import Entity
import homeassistant.util.dt as dt_util import homeassistant.util.dt as dt_util
_LOGGER = logging.getLogger(__name__)
CONF_DESTINATION = "to" CONF_DESTINATION = "to"
CONF_START = "from" CONF_START = "from"
CONF_OFFSET = "offset" CONF_OFFSET = "offset"

View File

@ -1,7 +1,6 @@
"""Helpers for device automations.""" """Helpers for device automations."""
import asyncio import asyncio
from functools import wraps from functools import wraps
import logging
from types import ModuleType from types import ModuleType
from typing import Any, List, MutableMapping from typing import Any, List, MutableMapping
@ -22,8 +21,6 @@ from .exceptions import DeviceNotFound, InvalidDeviceAutomationConfig
DOMAIN = "device_automation" DOMAIN = "device_automation"
_LOGGER = logging.getLogger(__name__)
TRIGGER_BASE_SCHEMA = vol.Schema( TRIGGER_BASE_SCHEMA = vol.Schema(
{ {

View File

@ -1,6 +1,4 @@
"""Platform for binary sensor integration.""" """Platform for binary sensor integration."""
import logging
from homeassistant.components.binary_sensor import ( from homeassistant.components.binary_sensor import (
DEVICE_CLASS_DOOR, DEVICE_CLASS_DOOR,
DEVICE_CLASS_HEAT, DEVICE_CLASS_HEAT,
@ -15,8 +13,6 @@ from homeassistant.helpers.typing import HomeAssistantType
from .const import DOMAIN from .const import DOMAIN
from .devolo_device import DevoloDeviceEntity from .devolo_device import DevoloDeviceEntity
_LOGGER = logging.getLogger(__name__)
DEVICE_CLASS_MAPPING = { DEVICE_CLASS_MAPPING = {
"Water alarm": DEVICE_CLASS_MOISTURE, "Water alarm": DEVICE_CLASS_MOISTURE,
"Home Security": DEVICE_CLASS_MOTION, "Home Security": DEVICE_CLASS_MOTION,

View File

@ -1,5 +1,4 @@
"""Platform for climate integration.""" """Platform for climate integration."""
import logging
from typing import List, Optional from typing import List, Optional
from homeassistant.components.climate import ( from homeassistant.components.climate import (
@ -16,8 +15,6 @@ from homeassistant.helpers.typing import HomeAssistantType
from .const import DOMAIN from .const import DOMAIN
from .devolo_multi_level_switch import DevoloMultiLevelSwitchDeviceEntity from .devolo_multi_level_switch import DevoloMultiLevelSwitchDeviceEntity
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry( async def async_setup_entry(
hass: HomeAssistantType, entry: ConfigEntry, async_add_entities hass: HomeAssistantType, entry: ConfigEntry, async_add_entities

View File

@ -1,6 +1,4 @@
"""Platform for cover integration.""" """Platform for cover integration."""
import logging
from homeassistant.components.cover import ( from homeassistant.components.cover import (
DEVICE_CLASS_BLIND, DEVICE_CLASS_BLIND,
SUPPORT_CLOSE, SUPPORT_CLOSE,
@ -14,8 +12,6 @@ from homeassistant.helpers.typing import HomeAssistantType
from .const import DOMAIN from .const import DOMAIN
from .devolo_multi_level_switch import DevoloMultiLevelSwitchDeviceEntity from .devolo_multi_level_switch import DevoloMultiLevelSwitchDeviceEntity
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry( async def async_setup_entry(
hass: HomeAssistantType, entry: ConfigEntry, async_add_entities hass: HomeAssistantType, entry: ConfigEntry, async_add_entities

View File

@ -1,10 +1,6 @@
"""Base class for multi level switches in devolo Home Control.""" """Base class for multi level switches in devolo Home Control."""
import logging
from .devolo_device import DevoloDeviceEntity from .devolo_device import DevoloDeviceEntity
_LOGGER = logging.getLogger(__name__)
class DevoloMultiLevelSwitchDeviceEntity(DevoloDeviceEntity): class DevoloMultiLevelSwitchDeviceEntity(DevoloDeviceEntity):
"""Representation of a multi level switch device within devolo Home Control. Something like a dimmer or a thermostat.""" """Representation of a multi level switch device within devolo Home Control. Something like a dimmer or a thermostat."""

View File

@ -1,6 +1,4 @@
"""Platform for sensor integration.""" """Platform for sensor integration."""
import logging
from homeassistant.components.sensor import ( from homeassistant.components.sensor import (
DEVICE_CLASS_BATTERY, DEVICE_CLASS_BATTERY,
DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_HUMIDITY,
@ -15,8 +13,6 @@ from homeassistant.helpers.typing import HomeAssistantType
from .const import DOMAIN from .const import DOMAIN
from .devolo_device import DevoloDeviceEntity from .devolo_device import DevoloDeviceEntity
_LOGGER = logging.getLogger(__name__)
DEVICE_CLASS_MAPPING = { DEVICE_CLASS_MAPPING = {
"battery": DEVICE_CLASS_BATTERY, "battery": DEVICE_CLASS_BATTERY,
"temperature": DEVICE_CLASS_TEMPERATURE, "temperature": DEVICE_CLASS_TEMPERATURE,

View File

@ -1,6 +1,4 @@
"""Platform for switch integration.""" """Platform for switch integration."""
import logging
from homeassistant.components.switch import SwitchEntity from homeassistant.components.switch import SwitchEntity
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.helpers.typing import HomeAssistantType from homeassistant.helpers.typing import HomeAssistantType
@ -8,8 +6,6 @@ from homeassistant.helpers.typing import HomeAssistantType
from .const import DOMAIN from .const import DOMAIN
from .devolo_device import DevoloDeviceEntity from .devolo_device import DevoloDeviceEntity
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry( async def async_setup_entry(
hass: HomeAssistantType, entry: ConfigEntry, async_add_entities hass: HomeAssistantType, entry: ConfigEntry, async_add_entities

View File

@ -1,6 +1,4 @@
"""Config flow for Dexcom integration.""" """Config flow for Dexcom integration."""
import logging
from pydexcom import AccountError, Dexcom, SessionError from pydexcom import AccountError, Dexcom, SessionError
import voluptuous as vol import voluptuous as vol
@ -17,8 +15,6 @@ from .const import ( # pylint:disable=unused-import
SERVER_US, SERVER_US,
) )
_LOGGER = logging.getLogger(__name__)
DATA_SCHEMA = vol.Schema( DATA_SCHEMA = vol.Schema(
{ {
vol.Required(CONF_USERNAME): str, vol.Required(CONF_USERNAME): str,

View File

@ -1,6 +1,5 @@
"""Component that will help set the Dlib face detect processing.""" """Component that will help set the Dlib face detect processing."""
import io import io
import logging
import face_recognition # pylint: disable=import-error import face_recognition # pylint: disable=import-error
@ -17,8 +16,6 @@ from homeassistant.components.image_processing import ( # noqa: F401, isort:ski
PLATFORM_SCHEMA, PLATFORM_SCHEMA,
) )
_LOGGER = logging.getLogger(__name__)
ATTR_LOCATION = "location" ATTR_LOCATION = "location"

View File

@ -1,6 +1,5 @@
"""Support for powering relays in a DoorBird video doorbell.""" """Support for powering relays in a DoorBird video doorbell."""
import datetime import datetime
import logging
from homeassistant.components.switch import SwitchEntity from homeassistant.components.switch import SwitchEntity
import homeassistant.util.dt as dt_util 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 .const import DOMAIN, DOOR_STATION, DOOR_STATION_INFO
from .entity import DoorBirdEntity from .entity import DoorBirdEntity
_LOGGER = logging.getLogger(__name__)
IR_RELAY = "__ir_light__" IR_RELAY = "__ir_light__"

View File

@ -1,6 +1,5 @@
"""Support for sensors from the Dovado router.""" """Support for sensors from the Dovado router."""
from datetime import timedelta from datetime import timedelta
import logging
import re import re
import voluptuous as vol import voluptuous as vol
@ -12,8 +11,6 @@ from homeassistant.helpers.entity import Entity
from . import DOMAIN as DOVADO_DOMAIN from . import DOMAIN as DOVADO_DOMAIN
_LOGGER = logging.getLogger(__name__)
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=30) MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=30)
SENSOR_UPLOAD = "upload" SENSOR_UPLOAD = "upload"

View File

@ -1,15 +1,12 @@
"""The dsmr component.""" """The dsmr component."""
import asyncio import asyncio
from asyncio import CancelledError from asyncio import CancelledError
import logging
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from .const import DATA_TASK, DOMAIN, PLATFORMS from .const import DATA_TASK, DOMAIN, PLATFORMS
_LOGGER = logging.getLogger(__name__)
async def async_setup(hass, config: dict): async def async_setup(hass, config: dict):
"""Set up the DSMR platform.""" """Set up the DSMR platform."""

View File

@ -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 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 from datetime import datetime, timedelta
import logging
import requests import requests
import voluptuous as vol import voluptuous as vol
@ -16,7 +15,6 @@ import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity from homeassistant.helpers.entity import Entity
import homeassistant.util.dt as dt_util import homeassistant.util.dt as dt_util
_LOGGER = logging.getLogger(__name__)
_RESOURCE = "https://data.dublinked.ie/cgi-bin/rtpi/realtimebusinformation" _RESOURCE = "https://data.dublinked.ie/cgi-bin/rtpi/realtimebusinformation"
ATTR_STOP_ID = "Stop ID" ATTR_STOP_ID = "Stop ID"

View File

@ -1,6 +1,4 @@
"""Config flow to configure flood monitoring gauges.""" """Config flow to configure flood monitoring gauges."""
import logging
from aioeafm import get_stations from aioeafm import get_stations
import voluptuous as vol import voluptuous as vol
@ -10,8 +8,6 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession
# pylint: disable=unused-import # pylint: disable=unused-import
from .const import DOMAIN from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
class UKFloodsFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): class UKFloodsFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a UK Environment Agency flood monitoring config flow.""" """Handle a UK Environment Agency flood monitoring config flow."""

View File

@ -1,13 +1,9 @@
"""Allows reading temperatures from ecoal/esterownik.pl controller.""" """Allows reading temperatures from ecoal/esterownik.pl controller."""
import logging
from homeassistant.const import TEMP_CELSIUS from homeassistant.const import TEMP_CELSIUS
from homeassistant.helpers.entity import Entity from homeassistant.helpers.entity import Entity
from . import AVAILABLE_SENSORS, DATA_ECOAL_BOILER from . import AVAILABLE_SENSORS, DATA_ECOAL_BOILER
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_entities, discovery_info=None): def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the ecoal sensors.""" """Set up the ecoal sensors."""

View File

@ -1,13 +1,10 @@
"""Allows to configuration ecoal (esterownik.pl) pumps as switches.""" """Allows to configuration ecoal (esterownik.pl) pumps as switches."""
import logging
from typing import Optional from typing import Optional
from homeassistant.components.switch import SwitchEntity from homeassistant.components.switch import SwitchEntity
from . import AVAILABLE_PUMPS, DATA_ECOAL_BOILER from . import AVAILABLE_PUMPS, DATA_ECOAL_BOILER
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_entities, discovery_info=None): def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up switches based on ecoal interface.""" """Set up switches based on ecoal interface."""

View File

@ -1,6 +1,4 @@
"""Support for Edimax switches.""" """Support for Edimax switches."""
import logging
from pyedimax.smartplug import SmartPlug from pyedimax.smartplug import SmartPlug
import voluptuous as vol 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 from homeassistant.const import CONF_HOST, CONF_NAME, CONF_PASSWORD, CONF_USERNAME
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
DOMAIN = "edimax" DOMAIN = "edimax"
DEFAULT_NAME = "Edimax Smart Plug" DEFAULT_NAME = "Edimax Smart Plug"

View File

@ -1,6 +1,4 @@
"""Interfaces with Egardia/Woonveilig alarm control panel.""" """Interfaces with Egardia/Woonveilig alarm control panel."""
import logging
from homeassistant.components.binary_sensor import ( from homeassistant.components.binary_sensor import (
DEVICE_CLASS_MOTION, DEVICE_CLASS_MOTION,
DEVICE_CLASS_OPENING, DEVICE_CLASS_OPENING,
@ -10,8 +8,6 @@ from homeassistant.const import STATE_OFF, STATE_ON
from . import ATTR_DISCOVER_DEVICES, EGARDIA_DEVICE from . import ATTR_DISCOVER_DEVICES, EGARDIA_DEVICE
_LOGGER = logging.getLogger(__name__)
EGARDIA_TYPE_TO_DEVICE_CLASS = { EGARDIA_TYPE_TO_DEVICE_CLASS = {
"IR Sensor": DEVICE_CLASS_MOTION, "IR Sensor": DEVICE_CLASS_MOTION,
"Door Contact": DEVICE_CLASS_OPENING, "Door Contact": DEVICE_CLASS_OPENING,

View File

@ -1,6 +1,4 @@
"""Support for Elgato Key Lights.""" """Support for Elgato Key Lights."""
import logging
from elgato import Elgato, ElgatoConnectionError from elgato import Elgato, ElgatoConnectionError
from homeassistant.components.light import DOMAIN as LIGHT_DOMAIN 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 from .const import DATA_ELGATO_CLIENT, DOMAIN
_LOGGER = logging.getLogger(__name__)
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up the Elgato Key Light components.""" """Set up the Elgato Key Light components."""

View File

@ -1,5 +1,4 @@
"""Config flow to configure the Elgato Key Light integration.""" """Config flow to configure the Elgato Key Light integration."""
import logging
from typing import Any, Dict, Optional from typing import Any, Dict, Optional
from elgato import Elgato, ElgatoError, Info 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 from .const import CONF_SERIAL_NUMBER, DOMAIN # pylint: disable=unused-import
_LOGGER = logging.getLogger(__name__)
class ElgatoFlowHandler(ConfigFlow, domain=DOMAIN): class ElgatoFlowHandler(ConfigFlow, domain=DOMAIN):
"""Handle a Elgato Key Light config flow.""" """Handle a Elgato Key Light config flow."""

View File

@ -1,6 +1,4 @@
"""Each ElkM1 area will be created as a separate alarm_control_panel.""" """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.const import AlarmState, ArmedStatus, ArmLevel, ArmUpState
from elkm1_lib.util import username from elkm1_lib.util import username
import voluptuous as vol 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): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the ElkM1 alarm platform.""" """Set up the ElkM1 alarm platform."""

View File

@ -44,8 +44,6 @@ DEFAULT_PORT = 8096
DEFAULT_SSL_PORT = 8920 DEFAULT_SSL_PORT = 8920
DEFAULT_SSL = False DEFAULT_SSL = False
_LOGGER = logging.getLogger(__name__)
SUPPORT_EMBY = ( SUPPORT_EMBY = (
SUPPORT_PAUSE SUPPORT_PAUSE
| SUPPORT_PREVIOUS_TRACK | SUPPORT_PREVIOUS_TRACK

View File

@ -1,6 +1,4 @@
"""Support for Enigma2 media players.""" """Support for Enigma2 media players."""
import logging
from openwebif.api import CreateDevice from openwebif.api import CreateDevice
import voluptuous as vol import voluptuous as vol
@ -32,8 +30,6 @@ from homeassistant.const import (
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.config_validation import PLATFORM_SCHEMA from homeassistant.helpers.config_validation import PLATFORM_SCHEMA
_LOGGER = logging.getLogger(__name__)
ATTR_MEDIA_CURRENTLY_RECORDING = "media_currently_recording" ATTR_MEDIA_CURRENTLY_RECORDING = "media_currently_recording"
ATTR_MEDIA_DESCRIPTION = "media_description" ATTR_MEDIA_DESCRIPTION = "media_description"
ATTR_MEDIA_END_TIME = "media_end_time" ATTR_MEDIA_END_TIME = "media_end_time"

View File

@ -1,5 +1,4 @@
"""Support for EnOcean light sources.""" """Support for EnOcean light sources."""
import logging
import math import math
import voluptuous as vol import voluptuous as vol
@ -15,8 +14,6 @@ import homeassistant.helpers.config_validation as cv
from .device import EnOceanEntity from .device import EnOceanEntity
_LOGGER = logging.getLogger(__name__)
CONF_SENDER_ID = "sender_id" CONF_SENDER_ID = "sender_id"
DEFAULT_NAME = "EnOcean Light" DEFAULT_NAME = "EnOcean Light"

View File

@ -1,6 +1,4 @@
"""Support for EnOcean sensors.""" """Support for EnOcean sensors."""
import logging
import voluptuous as vol import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.components.sensor import PLATFORM_SCHEMA
@ -22,8 +20,6 @@ from homeassistant.helpers.restore_state import RestoreEntity
from .device import EnOceanEntity from .device import EnOceanEntity
_LOGGER = logging.getLogger(__name__)
CONF_MAX_TEMP = "max_temp" CONF_MAX_TEMP = "max_temp"
CONF_MIN_TEMP = "min_temp" CONF_MIN_TEMP = "min_temp"
CONF_RANGE_FROM = "range_from" CONF_RANGE_FROM = "range_from"

View File

@ -1,6 +1,4 @@
"""Support for EnOcean switches.""" """Support for EnOcean switches."""
import logging
import voluptuous as vol import voluptuous as vol
from homeassistant.components.switch import PLATFORM_SCHEMA from homeassistant.components.switch import PLATFORM_SCHEMA
@ -10,8 +8,6 @@ from homeassistant.helpers.entity import ToggleEntity
from .device import EnOceanEntity from .device import EnOceanEntity
_LOGGER = logging.getLogger(__name__)
CONF_CHANNEL = "channel" CONF_CHANNEL = "channel"
DEFAULT_NAME = "EnOcean Switch" DEFAULT_NAME = "EnOcean Switch"

View File

@ -1,6 +1,5 @@
"""Real-time information about public transport departures in Norway.""" """Real-time information about public transport departures in Norway."""
from datetime import datetime, timedelta from datetime import datetime, timedelta
import logging
from enturclient import EnturPublicTransportData from enturclient import EnturPublicTransportData
import voluptuous as vol import voluptuous as vol
@ -20,8 +19,6 @@ from homeassistant.helpers.entity import Entity
from homeassistant.util import Throttle from homeassistant.util import Throttle
import homeassistant.util.dt as dt_util import homeassistant.util.dt as dt_util
_LOGGER = logging.getLogger(__name__)
API_CLIENT_NAME = "homeassistant-homeassistant" API_CLIENT_NAME = "homeassistant-homeassistant"
ATTRIBUTION = "Data provided by entur.org under NLOD" ATTRIBUTION = "Data provided by entur.org under NLOD"

View File

@ -1,6 +1,5 @@
"""Support for the Environment Canada radar imagery.""" """Support for the Environment Canada radar imagery."""
import datetime import datetime
import logging
from env_canada import ECRadar # pylint: disable=import-error from env_canada import ECRadar # pylint: disable=import-error
import voluptuous as vol import voluptuous as vol
@ -15,8 +14,6 @@ from homeassistant.const import (
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
from homeassistant.util import Throttle from homeassistant.util import Throttle
_LOGGER = logging.getLogger(__name__)
ATTR_UPDATED = "updated" ATTR_UPDATED = "updated"
CONF_ATTRIBUTION = "Data provided by Environment Canada" CONF_ATTRIBUTION = "Data provided by Environment Canada"

View File

@ -1,6 +1,5 @@
"""Platform for retrieving meteorological data from Environment Canada.""" """Platform for retrieving meteorological data from Environment Canada."""
import datetime import datetime
import logging
import re import re
from env_canada import ECData # pylint: disable=import-error 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.helpers.config_validation as cv
import homeassistant.util.dt as dt import homeassistant.util.dt as dt
_LOGGER = logging.getLogger(__name__)
CONF_FORECAST = "forecast" CONF_FORECAST = "forecast"
CONF_ATTRIBUTION = "Data provided by Environment Canada" CONF_ATTRIBUTION = "Data provided by Environment Canada"
CONF_STATION = "station" CONF_STATION = "station"

View File

@ -1,6 +1,5 @@
"""Support for Epson Workforce Printer.""" """Support for Epson Workforce Printer."""
from datetime import timedelta from datetime import timedelta
import logging
from epsonprinter_pkg.epsonprinterapi import EpsonPrinterAPI from epsonprinter_pkg.epsonprinterapi import EpsonPrinterAPI
import voluptuous as vol import voluptuous as vol
@ -11,7 +10,6 @@ from homeassistant.exceptions import PlatformNotReady
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity from homeassistant.helpers.entity import Entity
_LOGGER = logging.getLogger(__name__)
MONITORED_CONDITIONS = { MONITORED_CONDITIONS = {
"black": ["Ink level Black", PERCENTAGE, "mdi:water"], "black": ["Ink level Black", PERCENTAGE, "mdi:water"],
"photoblack": ["Ink level Photoblack", PERCENTAGE, "mdi:water"], "photoblack": ["Ink level Photoblack", PERCENTAGE, "mdi:water"],

View File

@ -1,6 +1,5 @@
"""Support for ESPHome cameras.""" """Support for ESPHome cameras."""
import asyncio import asyncio
import logging
from typing import Optional from typing import Optional
from aioesphomeapi import CameraInfo, CameraState from aioesphomeapi import CameraInfo, CameraState
@ -12,8 +11,6 @@ from homeassistant.helpers.typing import HomeAssistantType
from . import EsphomeEntity, platform_async_setup_entry from . import EsphomeEntity, platform_async_setup_entry
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry( async def async_setup_entry(
hass: HomeAssistantType, entry: ConfigEntry, async_add_entities hass: HomeAssistantType, entry: ConfigEntry, async_add_entities

View File

@ -1,5 +1,4 @@
"""Support for ESPHome climate devices.""" """Support for ESPHome climate devices."""
import logging
from typing import List, Optional from typing import List, Optional
from aioesphomeapi import ( from aioesphomeapi import (
@ -64,8 +63,6 @@ from . import (
platform_async_setup_entry, platform_async_setup_entry,
) )
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up ESPHome climate devices based on a config entry.""" """Set up ESPHome climate devices based on a config entry."""

View File

@ -1,5 +1,4 @@
"""Support for ESPHome covers.""" """Support for ESPHome covers."""
import logging
from typing import Optional from typing import Optional
from aioesphomeapi import CoverInfo, CoverOperation, CoverState 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 from . import EsphomeEntity, esphome_state_property, platform_async_setup_entry
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry( async def async_setup_entry(
hass: HomeAssistantType, entry: ConfigEntry, async_add_entities hass: HomeAssistantType, entry: ConfigEntry, async_add_entities

View File

@ -1,5 +1,4 @@
"""Support for ESPHome fans.""" """Support for ESPHome fans."""
import logging
from typing import List, Optional from typing import List, Optional
from aioesphomeapi import FanInfo, FanSpeed, FanState from aioesphomeapi import FanInfo, FanSpeed, FanState
@ -23,8 +22,6 @@ from . import (
platform_async_setup_entry, platform_async_setup_entry,
) )
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry( async def async_setup_entry(
hass: HomeAssistantType, entry: ConfigEntry, async_add_entities hass: HomeAssistantType, entry: ConfigEntry, async_add_entities

Some files were not shown because too many files have changed in this diff Show More