Cleanup unused loggers (#46510)
parent
10e88cd23d
commit
a5a45f29e2
|
@ -1,6 +1,4 @@
|
|||
"""Config flow to configure Agent devices."""
|
||||
import logging
|
||||
|
||||
from agent import AgentConnectionError, AgentError
|
||||
from agent.a import Agent
|
||||
import voluptuous as vol
|
||||
|
@ -13,7 +11,6 @@ from .const import DOMAIN, SERVER_URL # pylint:disable=unused-import
|
|||
from .helpers import generate_url
|
||||
|
||||
DEFAULT_PORT = 8090
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class AgentFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for AirVisual air quality sensors."""
|
||||
from logging import getLogger
|
||||
|
||||
from homeassistant.const import (
|
||||
ATTR_LATITUDE,
|
||||
ATTR_LONGITUDE,
|
||||
|
@ -31,8 +29,6 @@ from .const import (
|
|||
INTEGRATION_TYPE_GEOGRAPHY_NAME,
|
||||
)
|
||||
|
||||
_LOGGER = getLogger(__name__)
|
||||
|
||||
ATTR_CITY = "city"
|
||||
ATTR_COUNTRY = "country"
|
||||
ATTR_POLLUTANT_SYMBOL = "pollutant_symbol"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Support for ASUSWRT devices."""
|
||||
import asyncio
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -41,8 +40,6 @@ PLATFORMS = ["device_tracker", "sensor"]
|
|||
CONF_PUB_KEY = "pub_key"
|
||||
SECRET_GROUP = "Password or SSH Key"
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONFIG_SCHEMA = vol.Schema(
|
||||
vol.All(
|
||||
cv.deprecated(DOMAIN),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Support for ASUSWRT routers."""
|
||||
import logging
|
||||
from typing import Dict
|
||||
|
||||
from homeassistant.components.device_tracker import SOURCE_TYPE_ROUTER
|
||||
|
@ -15,8 +14,6 @@ from .router import AsusWrtRouter
|
|||
|
||||
DEFAULT_DEVICE_NAME = "Unknown device"
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(
|
||||
hass: HomeAssistantType, entry: ConfigEntry, async_add_entities
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
"""Support for Aurora Forecast binary sensor."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.binary_sensor import BinarySensorEntity
|
||||
|
||||
from . import AuroraEntity
|
||||
from .const import COORDINATOR, DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(hass, entry, async_add_entries):
|
||||
"""Set up the binary_sensor platform."""
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
"""Support for Aurora Forecast sensor."""
|
||||
import logging
|
||||
|
||||
from homeassistant.const import PERCENTAGE
|
||||
|
||||
from . import AuroraEntity
|
||||
from .const import COORDINATOR, DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(hass, entry, async_add_entries):
|
||||
"""Set up the sensor platform."""
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Websocket API for blueprint."""
|
||||
import logging
|
||||
from typing import Dict, Optional
|
||||
|
||||
import async_timeout
|
||||
|
@ -15,8 +14,6 @@ from . import importer, models
|
|||
from .const import DOMAIN
|
||||
from .errors import FileAlreadyExists
|
||||
|
||||
_LOGGER = logging.getLogger(__package__)
|
||||
|
||||
|
||||
@callback
|
||||
def async_setup(hass: HomeAssistant):
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Config flow for BMW ConnectedDrive integration."""
|
||||
import logging
|
||||
|
||||
from bimmer_connected.account import ConnectedDriveAccount
|
||||
from bimmer_connected.country_selector import get_region_from_name
|
||||
import voluptuous as vol
|
||||
|
@ -12,9 +10,6 @@ from homeassistant.core import callback
|
|||
from . import DOMAIN # pylint: disable=unused-import
|
||||
from .const import CONF_ALLOWED_REGIONS, CONF_READ_ONLY, CONF_USE_LOCATION
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
DATA_SCHEMA = vol.Schema(
|
||||
{
|
||||
vol.Required(CONF_USERNAME): str,
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for Dyson Pure Cool Air Quality Sensors."""
|
||||
import logging
|
||||
|
||||
from libpurecool.dyson_pure_cool import DysonPureCool
|
||||
from libpurecool.dyson_pure_state_v2 import DysonEnvironmentalSensorV2State
|
||||
|
||||
|
@ -10,8 +8,6 @@ from . import DYSON_DEVICES, DysonEntity
|
|||
|
||||
ATTRIBUTION = "Dyson purifier air quality sensor"
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DYSON_AIQ_DEVICES = "dyson_aiq_devices"
|
||||
|
||||
ATTR_VOC = "volatile_organic_compounds"
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for Dyson Pure Cool Link Sensors."""
|
||||
import logging
|
||||
|
||||
from libpurecool.dyson_pure_cool import DysonPureCool
|
||||
from libpurecool.dyson_pure_cool_link import DysonPureCoolLink
|
||||
|
||||
|
@ -58,8 +56,6 @@ SENSOR_NAMES = {
|
|||
|
||||
DYSON_SENSOR_DEVICES = "dyson_sensor_devices"
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""Set up the Dyson Sensors."""
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for Rheem EcoNet water heaters."""
|
||||
import logging
|
||||
|
||||
from pyeconet.equipment import EquipmentType
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
|
@ -12,8 +10,6 @@ from homeassistant.components.binary_sensor import (
|
|||
from . import EcoNetEntity
|
||||
from .const import DOMAIN, EQUIPMENT
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
SENSOR_NAME_RUNNING = "running"
|
||||
SENSOR_NAME_SHUTOFF_VALVE = "shutoff_valve"
|
||||
SENSOR_NAME_VACATION = "vacation"
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for Rheem EcoNet water heaters."""
|
||||
import logging
|
||||
|
||||
from pyeconet.equipment import EquipmentType
|
||||
|
||||
from homeassistant.const import (
|
||||
|
@ -25,9 +23,6 @@ WIFI_SIGNAL = "wifi_signal"
|
|||
RUNNING_STATE = "running_state"
|
||||
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(hass, entry, async_add_entities):
|
||||
"""Set up EcoNet sensor based on a config entry."""
|
||||
equipment = hass.data[DOMAIN][EQUIPMENT][entry.entry_id]
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Binary Sensor platform for FireServiceRota integration."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.binary_sensor import BinarySensorEntity
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.helpers.typing import HomeAssistantType
|
||||
|
@ -11,8 +9,6 @@ from homeassistant.helpers.update_coordinator import (
|
|||
|
||||
from .const import DATA_CLIENT, DATA_COORDINATOR, DOMAIN as FIRESERVICEROTA_DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(
|
||||
hass: HomeAssistantType, entry: ConfigEntry, async_add_entities
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Support for interface with a Gree climate systems."""
|
||||
import logging
|
||||
from typing import Optional
|
||||
|
||||
from homeassistant.components.switch import DEVICE_CLASS_SWITCH, SwitchEntity
|
||||
|
@ -8,8 +7,6 @@ from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
|||
|
||||
from .const import COORDINATOR, DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
"""Set up the Gree HVAC device from a config entry."""
|
||||
|
|
|
@ -1,14 +1,9 @@
|
|||
"""Constants for Google Hangouts Component."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.notify import ATTR_DATA, ATTR_MESSAGE, ATTR_TARGET
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
_LOGGER = logging.getLogger(".")
|
||||
|
||||
|
||||
DOMAIN = "hangouts"
|
||||
|
||||
CONF_2FA = "2fa"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Config flow for HomeKit integration."""
|
||||
import logging
|
||||
import random
|
||||
import string
|
||||
|
||||
|
@ -101,8 +100,6 @@ _EMPTY_ENTITY_FILTER = {
|
|||
CONF_EXCLUDE_ENTITIES: [],
|
||||
}
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
"""Handle a config flow for HomeKit."""
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for HomematicIP Cloud devices."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant import config_entries
|
||||
|
@ -23,8 +21,6 @@ from .generic_entity import HomematicipGenericEntity # noqa: F401
|
|||
from .hap import HomematicipAuth, HomematicipHAP # noqa: F401
|
||||
from .services import async_setup_services, async_unload_services
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONFIG_SCHEMA = vol.Schema(
|
||||
{
|
||||
vol.Optional(DOMAIN, default=[]): vol.All(
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Constants for IPMA component."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.weather import DOMAIN as WEATHER_DOMAIN
|
||||
|
||||
DOMAIN = "ipma"
|
||||
|
@ -8,5 +6,3 @@ DOMAIN = "ipma"
|
|||
HOME_LOCATION_NAME = "Home"
|
||||
|
||||
ENTITY_ID_SENSOR_FORMAT_HOME = f"{WEATHER_DOMAIN}.ipma_{HOME_LOCATION_NAME}"
|
||||
|
||||
_LOGGER = logging.getLogger(".")
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
"""Internal discovery service for iZone AC."""
|
||||
|
||||
import logging
|
||||
|
||||
import pizone
|
||||
|
||||
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
|
||||
|
@ -18,8 +15,6 @@ from .const import (
|
|||
DISPATCH_ZONE_UPDATE,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class DiscoveryService(pizone.Listener):
|
||||
"""Discovery data and interfacing with pizone library."""
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Provides device triggers for lutron caseta."""
|
||||
import logging
|
||||
from typing import List
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -32,9 +31,6 @@ from .const import (
|
|||
LUTRON_CASETA_BUTTON_EVENT,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
SUPPORTED_INPUTS_EVENTS_TYPES = [ACTION_PRESS, ACTION_RELEASE]
|
||||
|
||||
LUTRON_BUTTON_TRIGGER_SCHEMA = TRIGGER_BASE_SCHEMA.extend(
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Constants for Met component."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.weather import (
|
||||
ATTR_CONDITION_CLEAR_NIGHT,
|
||||
ATTR_CONDITION_CLOUDY,
|
||||
|
@ -191,5 +189,3 @@ ATTR_MAP = {
|
|||
ATTR_WEATHER_WIND_BEARING: "wind_bearing",
|
||||
ATTR_WEATHER_WIND_SPEED: "wind_speed",
|
||||
}
|
||||
|
||||
_LOGGER = logging.getLogger(".")
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for Modbus."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.cover import (
|
||||
|
@ -69,8 +67,6 @@ from .const import (
|
|||
)
|
||||
from .modbus import modbus_setup
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
BASE_SCHEMA = vol.Schema({vol.Optional(CONF_NAME, default=DEFAULT_HUB): cv.string})
|
||||
|
||||
CLIMATE_SCHEMA = vol.Schema(
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Config flow to configure Motion Blinds using their WLAN API."""
|
||||
import logging
|
||||
|
||||
from motionblinds import MotionDiscovery
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -11,9 +9,6 @@ from homeassistant.const import CONF_API_KEY, CONF_HOST
|
|||
from .const import DEFAULT_GATEWAY_NAME, DOMAIN
|
||||
from .gateway import ConnectMotionGateway
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
CONFIG_SCHEMA = vol.Schema(
|
||||
{
|
||||
vol.Optional(CONF_HOST): str,
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for Motion Blinds sensors."""
|
||||
import logging
|
||||
|
||||
from motionblinds import BlindType
|
||||
|
||||
from homeassistant.const import (
|
||||
|
@ -14,8 +12,6 @@ from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
|||
|
||||
from .const import DOMAIN, KEY_COORDINATOR, KEY_GATEWAY
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
ATTR_BATTERY_VOLTAGE = "battery_voltage"
|
||||
TYPE_BLIND = "blind"
|
||||
TYPE_GATEWAY = "gateway"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Camera that loads a picture from an MQTT topic."""
|
||||
import functools
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -23,8 +22,6 @@ from .mixins import (
|
|||
async_setup_entry_helper,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_TOPIC = "topic"
|
||||
DEFAULT_NAME = "MQTT Camera"
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Config flow for MQTT."""
|
||||
from collections import OrderedDict
|
||||
import logging
|
||||
import queue
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -31,8 +30,6 @@ from .const import (
|
|||
)
|
||||
from .util import MQTT_WILL_BIRTH_SCHEMA
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@config_entries.HANDLERS.register("mqtt")
|
||||
class FlowHandler(config_entries.ConfigFlow):
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
"""Helper to handle a set of topics to subscribe to."""
|
||||
from collections import deque
|
||||
from functools import wraps
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
from homeassistant.helpers.typing import HomeAssistantType
|
||||
|
@ -9,8 +8,6 @@ from homeassistant.helpers.typing import HomeAssistantType
|
|||
from .const import ATTR_DISCOVERY_PAYLOAD, ATTR_DISCOVERY_TOPIC
|
||||
from .models import MessageCallbackType
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DATA_MQTT_DEBUG_INFO = "mqtt_debug_info"
|
||||
STORED_MESSAGES = 10
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Provides device automations for MQTT."""
|
||||
import functools
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -10,8 +9,6 @@ from . import device_trigger
|
|||
from .. import mqtt
|
||||
from .mixins import async_setup_entry_helper
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
AUTOMATION_TYPE_TRIGGER = "trigger"
|
||||
AUTOMATION_TYPES = [AUTOMATION_TYPE_TRIGGER]
|
||||
AUTOMATION_TYPES_SCHEMA = vol.In(AUTOMATION_TYPES)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Support for tracking MQTT enabled devices identified through discovery."""
|
||||
import functools
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -34,8 +33,6 @@ from ..mixins import (
|
|||
async_setup_entry_helper,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_PAYLOAD_HOME = "payload_home"
|
||||
CONF_PAYLOAD_NOT_HOME = "payload_not_home"
|
||||
CONF_SOURCE_TYPE = "source_type"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Support for MQTT fans."""
|
||||
import functools
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -48,8 +47,6 @@ from .mixins import (
|
|||
async_setup_entry_helper,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_STATE_VALUE_TEMPLATE = "state_value_template"
|
||||
CONF_SPEED_STATE_TOPIC = "speed_state_topic"
|
||||
CONF_SPEED_COMMAND_TOPIC = "speed_command_topic"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Support for MQTT lights."""
|
||||
import functools
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -15,8 +14,6 @@ from .schema_basic import PLATFORM_SCHEMA_BASIC, async_setup_entity_basic
|
|||
from .schema_json import PLATFORM_SCHEMA_JSON, async_setup_entity_json
|
||||
from .schema_template import PLATFORM_SCHEMA_TEMPLATE, async_setup_entity_template
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def validate_mqtt_light(value):
|
||||
"""Validate MQTT light schema."""
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Support for MQTT locks."""
|
||||
import functools
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -37,8 +36,6 @@ from .mixins import (
|
|||
async_setup_entry_helper,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_PAYLOAD_LOCK = "payload_lock"
|
||||
CONF_PAYLOAD_UNLOCK = "payload_unlock"
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Support for MQTT scenes."""
|
||||
import functools
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -20,8 +19,6 @@ from .mixins import (
|
|||
async_setup_entry_helper,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DEFAULT_NAME = "MQTT Scene"
|
||||
DEFAULT_RETAIN = False
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
"""Support for MQTT sensors."""
|
||||
from datetime import timedelta
|
||||
import functools
|
||||
import logging
|
||||
from typing import Optional
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -38,8 +37,6 @@ from .mixins import (
|
|||
async_setup_entry_helper,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_EXPIRE_AFTER = "expire_after"
|
||||
|
||||
DEFAULT_NAME = "MQTT Sensor"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Helper to handle a set of topics to subscribe to."""
|
||||
import logging
|
||||
from typing import Any, Callable, Dict, Optional
|
||||
|
||||
import attr
|
||||
|
@ -12,8 +11,6 @@ from .. import mqtt
|
|||
from .const import DEFAULT_QOS
|
||||
from .models import MessageCallbackType
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@attr.s(slots=True)
|
||||
class EntitySubscription:
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Support for MQTT switches."""
|
||||
import functools
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -42,8 +41,6 @@ from .mixins import (
|
|||
async_setup_entry_helper,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DEFAULT_NAME = "MQTT Switch"
|
||||
DEFAULT_PAYLOAD_ON = "ON"
|
||||
DEFAULT_PAYLOAD_OFF = "OFF"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Support for MQTT vacuums."""
|
||||
import functools
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -13,8 +12,6 @@ from .schema import CONF_SCHEMA, LEGACY, MQTT_VACUUM_SCHEMA, STATE
|
|||
from .schema_legacy import PLATFORM_SCHEMA_LEGACY, async_setup_entity_legacy
|
||||
from .schema_state import PLATFORM_SCHEMA_STATE, async_setup_entity_state
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def validate_mqtt_vacuum(value):
|
||||
"""Validate MQTT vacuum schema."""
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Support for Legacy MQTT vacuum."""
|
||||
import json
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -39,8 +38,6 @@ from ..mixins import (
|
|||
)
|
||||
from .schema import MQTT_VACUUM_SCHEMA, services_to_strings, strings_to_services
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
SERVICE_TO_STRING = {
|
||||
SUPPORT_TURN_ON: "turn_on",
|
||||
SUPPORT_TURN_OFF: "turn_off",
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Support for a State MQTT vacuum."""
|
||||
import json
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -43,8 +42,6 @@ from ..mixins import (
|
|||
)
|
||||
from .schema import MQTT_VACUUM_SCHEMA, services_to_strings, strings_to_services
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
SERVICE_TO_STRING = {
|
||||
SUPPORT_START: "start",
|
||||
SUPPORT_PAUSE: "pause",
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
"""API for Neato Botvac bound to Home Assistant OAuth."""
|
||||
from asyncio import run_coroutine_threadsafe
|
||||
import logging
|
||||
|
||||
import pybotvac
|
||||
|
||||
from homeassistant import config_entries, core
|
||||
from homeassistant.helpers import config_entry_oauth2_flow
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ConfigEntryAuth(pybotvac.OAuthSession):
|
||||
"""Provide Neato Botvac authentication tied to an OAuth2 based config entry."""
|
||||
|
|
|
@ -11,8 +11,6 @@ from homeassistant.helpers import config_entry_oauth2_flow
|
|||
# pylint: disable=unused-import
|
||||
from .const import NEATO_DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class OAuth2FlowHandler(
|
||||
config_entry_oauth2_flow.AbstractOAuth2FlowHandler, domain=NEATO_DOMAIN
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Provides device automations for Nest."""
|
||||
import logging
|
||||
from typing import List
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -17,8 +16,6 @@ from homeassistant.helpers.typing import ConfigType
|
|||
from .const import DATA_SUBSCRIBER, DOMAIN
|
||||
from .events import DEVICE_TRAIT_TRIGGER_MAP, NEST_EVENT
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DEVICE = "device"
|
||||
|
||||
TRIGGER_TYPES = set(DEVICE_TRAIT_TRIGGER_MAP.values())
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Support for NWS weather service."""
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
from homeassistant.components.weather import (
|
||||
ATTR_CONDITION_CLEAR_NIGHT,
|
||||
|
@ -47,8 +46,6 @@ from .const import (
|
|||
NWS_DATA,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
PARALLEL_UPDATES = 0
|
||||
|
||||
OBSERVATION_VALID_TIME = timedelta(minutes=20)
|
||||
|
|
|
@ -7,8 +7,6 @@ from homeassistant.helpers import config_entry_oauth2_flow
|
|||
from .const import DOMAIN
|
||||
from .oauth_impl import OndiloOauth2Implementation
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class OAuth2FlowHandler(
|
||||
config_entry_oauth2_flow.AbstractOAuth2FlowHandler, domain=DOMAIN
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Support for Z-Wave fans."""
|
||||
import logging
|
||||
import math
|
||||
|
||||
from homeassistant.components.fan import (
|
||||
|
@ -17,8 +16,6 @@ from homeassistant.util.percentage import (
|
|||
from .const import DATA_UNSUBSCRIBE, DOMAIN
|
||||
from .entity import ZWaveDeviceEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
SUPPORTED_FEATURES = SUPPORT_SET_SPEED
|
||||
SPEED_RANGE = (1, 99) # off is not included
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for Plaato Airlock sensors."""
|
||||
|
||||
import logging
|
||||
from typing import Optional
|
||||
|
||||
from pyplaato.models.device import PlaatoDevice
|
||||
|
@ -25,8 +23,6 @@ from .const import (
|
|||
)
|
||||
from .entity import PlaatoEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
||||
"""Set up the Plaato sensor."""
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
"""Binary sensor to read Proxmox VE data."""
|
||||
import logging
|
||||
|
||||
from homeassistant.const import STATE_OFF, STATE_ON
|
||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
|
||||
|
||||
from . import COORDINATOR, DOMAIN, ProxmoxEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""Set up binary sensors."""
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
"""Webhooks used by rachio."""
|
||||
|
||||
import logging
|
||||
|
||||
from aiohttp import web
|
||||
|
||||
from homeassistant.const import URL_API
|
||||
|
@ -80,9 +77,6 @@ SIGNAL_MAP = {
|
|||
}
|
||||
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@callback
|
||||
def async_register_webhook(hass, webhook_id, entry_id):
|
||||
"""Register a webhook."""
|
||||
|
|
|
@ -21,8 +21,6 @@ from homeassistant.exceptions import HomeAssistantError
|
|||
|
||||
from .const import DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(hass, entry, async_add_entities) -> None:
|
||||
"""Set up TotalConnect alarm panels based on a config entry."""
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Interfaces with TotalConnect sensors."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_DOOR,
|
||||
DEVICE_CLASS_GAS,
|
||||
|
@ -10,8 +8,6 @@ from homeassistant.components.binary_sensor import (
|
|||
|
||||
from .const import DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(hass, entry, async_add_entities) -> None:
|
||||
"""Set up TotalConnect device sensors based on a config entry."""
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Support for the Tuya climate devices."""
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
from homeassistant.components.climate import (
|
||||
DOMAIN as SENSOR_DOMAIN,
|
||||
|
@ -56,8 +55,6 @@ TUYA_STATE_TO_HA = {value: key for key, value in HA_STATE_TO_TUYA.items()}
|
|||
|
||||
FAN_MODES = {FAN_LOW, FAN_MEDIUM, FAN_HIGH}
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
"""Set up tuya sensors dynamically through tuya discovery."""
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Binary sensors on Zigbee Home Automation networks."""
|
||||
import functools
|
||||
import logging
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_GAS,
|
||||
|
@ -32,8 +31,6 @@ from .core.const import (
|
|||
from .core.registries import ZHA_ENTITIES
|
||||
from .entity import ZhaEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
# Zigbee Cluster Library Zone Type to Home Assistant device class
|
||||
CLASS_MAPPING = {
|
||||
0x000D: DEVICE_CLASS_MOTION,
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Websocket API for Z-Wave JS."""
|
||||
import json
|
||||
import logging
|
||||
|
||||
from aiohttp import hdrs, web, web_exceptions
|
||||
import voluptuous as vol
|
||||
|
@ -17,8 +16,6 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
|||
|
||||
from .const import DATA_CLIENT, DOMAIN, EVENT_DEVICE_ADDED_TO_REGISTRY
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
ID = "id"
|
||||
ENTRY_ID = "entry_id"
|
||||
NODE_ID = "node_id"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Representation of Z-Wave thermostats."""
|
||||
import logging
|
||||
from typing import Any, Callable, Dict, List, Optional
|
||||
|
||||
from zwave_js_server.client import Client as ZwaveClient
|
||||
|
@ -47,8 +46,6 @@ from .const import DATA_CLIENT, DATA_UNSUBSCRIBE, DOMAIN
|
|||
from .discovery import ZwaveDiscoveryInfo
|
||||
from .entity import ZWaveBaseEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
# Map Z-Wave HVAC Mode to Home Assistant value
|
||||
# Note: We treat "auto" as "heat_cool" as most Z-Wave devices
|
||||
# report auto_changeover as auto without schedule support.
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Support for Z-Wave fans."""
|
||||
import logging
|
||||
import math
|
||||
from typing import Any, Callable, List, Optional
|
||||
|
||||
|
@ -22,8 +21,6 @@ from .const import DATA_CLIENT, DATA_UNSUBSCRIBE, DOMAIN
|
|||
from .discovery import ZwaveDiscoveryInfo
|
||||
from .entity import ZWaveBaseEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
SUPPORTED_FEATURES = SUPPORT_SET_SPEED
|
||||
|
||||
SPEED_RANGE = (1, 99) # off is not included
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""The tests for the feedreader component."""
|
||||
from datetime import timedelta
|
||||
from logging import getLogger
|
||||
from os import remove
|
||||
from os.path import exists
|
||||
import time
|
||||
|
@ -24,8 +23,6 @@ from homeassistant.setup import setup_component
|
|||
|
||||
from tests.common import get_test_home_assistant, load_fixture
|
||||
|
||||
_LOGGER = getLogger(__name__)
|
||||
|
||||
URL = "http://some.rss.local/rss_feed.xml"
|
||||
VALID_CONFIG_1 = {feedreader.DOMAIN: {CONF_URLS: [URL]}}
|
||||
VALID_CONFIG_2 = {feedreader.DOMAIN: {CONF_URLS: [URL], CONF_SCAN_INTERVAL: 60}}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Fixtures for harmony tests."""
|
||||
import logging
|
||||
from unittest.mock import AsyncMock, MagicMock, PropertyMock, patch
|
||||
|
||||
from aioharmony.const import ClientCallbackType
|
||||
|
@ -9,8 +8,6 @@ from homeassistant.components.harmony.const import ACTIVITY_POWER_OFF
|
|||
|
||||
from .const import NILE_TV_ACTIVITY_ID, PLAY_MUSIC_ACTIVITY_ID, WATCH_TV_ACTIVITY_ID
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
ACTIVITIES_TO_IDS = {
|
||||
ACTIVITY_POWER_OFF: -1,
|
||||
"Watch TV": WATCH_TV_ACTIVITY_ID,
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
"""Test the Logitech Harmony Hub activity switches."""
|
||||
|
||||
import logging
|
||||
|
||||
from homeassistant.components.harmony.const import DOMAIN
|
||||
from homeassistant.components.remote import ATTR_ACTIVITY, DOMAIN as REMOTE_DOMAIN
|
||||
from homeassistant.components.switch import (
|
||||
|
@ -22,8 +19,6 @@ from .const import ENTITY_PLAY_MUSIC, ENTITY_REMOTE, ENTITY_WATCH_TV, HUB_NAME
|
|||
|
||||
from tests.common import MockConfigEntry
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def test_switch_toggles(mock_hc, hass, mock_write_config):
|
||||
"""Ensure calls to the switch modify the harmony state."""
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
"""Tests for the Hyperion component."""
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
from types import TracebackType
|
||||
from typing import Any, Dict, Optional, Type
|
||||
from unittest.mock import AsyncMock, Mock, patch
|
||||
|
@ -63,8 +62,6 @@ TEST_AUTH_NOT_REQUIRED_RESP = {
|
|||
"info": {"required": False},
|
||||
}
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class AsyncContextManagerMock(Mock):
|
||||
"""An async context manager mock for Hyperion."""
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Tests for the Hyperion config flow."""
|
||||
|
||||
import logging
|
||||
from typing import Any, Dict, Optional
|
||||
from unittest.mock import AsyncMock, patch
|
||||
|
||||
|
@ -41,8 +39,6 @@ from . import (
|
|||
|
||||
from tests.common import MockConfigEntry
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
TEST_IP_ADDRESS = "192.168.0.1"
|
||||
TEST_HOST_PORT: Dict[str, Any] = {
|
||||
CONF_HOST: TEST_HOST,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Tests for the Hyperion integration."""
|
||||
import logging
|
||||
from typing import Optional
|
||||
from unittest.mock import AsyncMock, Mock, call, patch
|
||||
|
||||
|
@ -52,8 +51,6 @@ from . import (
|
|||
setup_test_config_entry,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
COLOR_BLACK = color_util.COLORS["black"]
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Tests for the Hyperion integration."""
|
||||
import logging
|
||||
from unittest.mock import AsyncMock, call, patch
|
||||
|
||||
from hyperion.const import (
|
||||
|
@ -35,7 +34,6 @@ TEST_COMPONENTS = [
|
|||
{"enabled": True, "name": "LEDDEVICE"},
|
||||
]
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
TEST_SWITCH_COMPONENT_BASE_ENTITY_ID = "switch.test_instance_1_component"
|
||||
TEST_SWITCH_COMPONENT_ALL_ENTITY_ID = f"{TEST_SWITCH_COMPONENT_BASE_ENTITY_ID}_all"
|
||||
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
"""The tests for the litejet component."""
|
||||
import logging
|
||||
import unittest
|
||||
|
||||
from homeassistant.components import litejet
|
||||
|
||||
from tests.common import get_test_home_assistant
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class TestLiteJet(unittest.TestCase):
|
||||
"""Test the litejet component."""
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""The tests for the litejet component."""
|
||||
import logging
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
|
@ -9,8 +8,6 @@ from homeassistant.components import litejet
|
|||
from tests.common import get_test_home_assistant
|
||||
from tests.components.scene import common
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
ENTITY_SCENE = "scene.mock_scene_1"
|
||||
ENTITY_SCENE_NUMBER = 1
|
||||
ENTITY_OTHER_SCENE = "scene.mock_scene_2"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Test check_config script."""
|
||||
import logging
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
@ -9,8 +8,6 @@ import homeassistant.scripts.check_config as check_config
|
|||
|
||||
from tests.common import get_test_config_dir, patch_yaml_files
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
BASE_CONFIG = (
|
||||
"homeassistant:\n"
|
||||
" name: Home\n"
|
||||
|
|
Loading…
Reference in New Issue