Cleanup unused loggers (components N-Z + tests) (#41982)
This commit is contained in:
parent
ad6ce5fa83
commit
dde6305549
326 changed files with 84 additions and 1156 deletions
|
@ -1,6 +1,4 @@
|
|||
"""Config Flow for Advantage Air integration."""
|
||||
import logging
|
||||
|
||||
from advantage_air import ApiError, advantage_air
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -19,8 +17,6 @@ ADVANTAGE_AIR_SCHEMA = vol.Schema(
|
|||
}
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class AdvantageAirConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
"""Config Advantage Air API connection."""
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Support for Arris TG2492LG router."""
|
||||
import logging
|
||||
from typing import List
|
||||
|
||||
from arris_tg2492lg import ConnectBox, Device
|
||||
|
@ -13,8 +12,6 @@ from homeassistant.components.device_tracker import (
|
|||
from homeassistant.const import CONF_HOST, CONF_PASSWORD
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DEFAULT_HOST = "192.168.178.1"
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Support for Blinkt! lights on Raspberry Pi."""
|
||||
import importlib
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -16,8 +15,6 @@ from homeassistant.const import CONF_NAME
|
|||
import homeassistant.helpers.config_validation as cv
|
||||
import homeassistant.util.color as color_util
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
SUPPORT_BLINKT = SUPPORT_BRIGHTNESS | SUPPORT_COLOR
|
||||
|
||||
DEFAULT_NAME = "blinkt"
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for Daikin AC sensors."""
|
||||
import logging
|
||||
|
||||
from homeassistant.const import (
|
||||
CONF_DEVICE_CLASS,
|
||||
CONF_ICON,
|
||||
|
@ -26,8 +24,6 @@ from .const import (
|
|||
SENSOR_TYPES,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
||||
"""Old way of setting up the Daikin sensors.
|
||||
|
|
|
@ -1,15 +1,10 @@
|
|||
"""The Elv integration."""
|
||||
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.const import CONF_DEVICE
|
||||
from homeassistant.helpers import discovery
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DOMAIN = "elv"
|
||||
|
||||
DEFAULT_DEVICE = "/dev/ttyUSB0"
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for EnOcean binary sensors."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
|
@ -13,8 +11,6 @@ import homeassistant.helpers.config_validation as cv
|
|||
|
||||
from .device import EnOceanEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DEFAULT_NAME = "EnOcean binary sensor"
|
||||
DEPENDENCIES = ["enocean"]
|
||||
EVENT_BUTTON_PRESSED = "button_pressed"
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Family Hub camera for Samsung Refrigerators."""
|
||||
import logging
|
||||
|
||||
from pyfamilyhublocal import FamilyHubCam
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -9,8 +7,6 @@ from homeassistant.const import CONF_IP_ADDRESS, CONF_NAME
|
|||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DEFAULT_NAME = "FamilyHub Camera"
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for the GPSLogger device tracking."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.device_tracker import SOURCE_TYPE_GPS
|
||||
from homeassistant.components.device_tracker.config_entry import TrackerEntity
|
||||
from homeassistant.const import (
|
||||
|
@ -24,8 +22,6 @@ from .const import (
|
|||
ATTR_SPEED,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistantType, entry, async_add_entities):
|
||||
"""Configure a dispatcher connection based on a config entry."""
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Helper and wrapper classes for Gree module."""
|
||||
import logging
|
||||
from typing import List
|
||||
|
||||
from greeclimate.device import Device, DeviceInfo
|
||||
|
@ -8,8 +7,6 @@ from greeclimate.exceptions import DeviceNotBoundError
|
|||
|
||||
from homeassistant import exceptions
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class DeviceHelper:
|
||||
"""Device search and bind wrapper for Gree platform."""
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Provides device automations for Philips Hue events."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA
|
||||
|
@ -20,8 +18,6 @@ from homeassistant.const import (
|
|||
from . import DOMAIN
|
||||
from .hue_event import CONF_HUE_EVENT
|
||||
|
||||
_LOGGER = logging.getLogger(__file__)
|
||||
|
||||
CONF_SUBTYPE = "subtype"
|
||||
|
||||
CONF_SHORT_PRESS = "remote_button_short_press"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Support for lights under the iGlo brand."""
|
||||
import logging
|
||||
import math
|
||||
|
||||
from iglo import Lamp
|
||||
|
@ -21,8 +20,6 @@ from homeassistant.const import CONF_HOST, CONF_NAME, CONF_PORT
|
|||
import homeassistant.helpers.config_validation as cv
|
||||
import homeassistant.util.color as color_util
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DEFAULT_NAME = "iGlo Light"
|
||||
DEFAULT_PORT = 8080
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Platform to retrieve Islamic prayer times information for Home Assistant."""
|
||||
import logging
|
||||
|
||||
from homeassistant.const import DEVICE_CLASS_TIMESTAMP
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
|
@ -8,8 +7,6 @@ import homeassistant.util.dt as dt_util
|
|||
|
||||
from .const import DATA_UPDATED, DOMAIN, PRAYER_TIMES_ICON, SENSOR_TYPES
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
"""Set up the Islamic prayer times sensor platform."""
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Support for Lupusec Security System binary sensors."""
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
import lupupy.constants as CONST
|
||||
|
||||
|
@ -10,8 +9,6 @@ from . import DOMAIN as LUPUSEC_DOMAIN, LupusecDevice
|
|||
|
||||
SCAN_INTERVAL = timedelta(seconds=2)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""Set up a sensor for an Lupusec device."""
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Support for Lupusec Security System switches."""
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
import lupupy.constants as CONST
|
||||
|
||||
|
@ -10,8 +9,6 @@ from . import DOMAIN as LUPUSEC_DOMAIN, LupusecDevice
|
|||
|
||||
SCAN_INTERVAL = timedelta(seconds=2)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""Set up Lupusec switch devices."""
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
"""Support for Lutron Caseta scenes."""
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
from homeassistant.components.scene import Scene
|
||||
|
||||
from . import DOMAIN as CASETA_DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
"""Set up the Lutron Caseta scene platform.
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
"""Support for N26 bank account sensors."""
|
||||
import logging
|
||||
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
from . import DEFAULT_SCAN_INTERVAL, DOMAIN, timestamp_ms_to_date
|
||||
from .const import DATA
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
SCAN_INTERVAL = DEFAULT_SCAN_INTERVAL
|
||||
|
||||
ATTR_IBAN = "account"
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
"""Support for N26 switches."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.switch import SwitchEntity
|
||||
|
||||
from . import DEFAULT_SCAN_INTERVAL, DOMAIN
|
||||
from .const import CARD_STATE_ACTIVE, CARD_STATE_BLOCKED, DATA
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
SCAN_INTERVAL = DEFAULT_SCAN_INTERVAL
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for interfacing with NAD receivers through RS-232."""
|
||||
import logging
|
||||
|
||||
from nad_receiver import NADReceiver, NADReceiverTCP, NADReceiverTelnet
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -16,8 +14,6 @@ from homeassistant.components.media_player.const import (
|
|||
from homeassistant.const import CONF_HOST, CONF_NAME, STATE_OFF, STATE_ON
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DEFAULT_TYPE = "RS232"
|
||||
DEFAULT_SERIAL_PORT = "/dev/ttyUSB0"
|
||||
DEFAULT_PORT = 53
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
"""Support for Ness D8X/D16X devices."""
|
||||
from collections import namedtuple
|
||||
import datetime
|
||||
import logging
|
||||
|
||||
from nessclient import ArmingState, Client
|
||||
import voluptuous as vol
|
||||
|
@ -18,8 +17,6 @@ from homeassistant.helpers import config_validation as cv
|
|||
from homeassistant.helpers.discovery import async_load_platform
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_send
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DOMAIN = "ness_alarm"
|
||||
DATA_NESS = "ness_alarm"
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for Ness D8X/D16X zone states - represented as binary sensors."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.binary_sensor import BinarySensorEntity
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
|
@ -14,8 +12,6 @@ from . import (
|
|||
ZoneChangedData,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
||||
"""Set up the Ness Alarm binary sensor devices."""
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
"""API for Netatmo bound to HASS OAuth."""
|
||||
from asyncio import run_coroutine_threadsafe
|
||||
import logging
|
||||
|
||||
import pyatmo
|
||||
|
||||
from homeassistant import config_entries, core
|
||||
from homeassistant.helpers import config_entry_oauth2_flow
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ConfigEntryNetatmoAuth(pyatmo.auth.NetatmoOAuth2):
|
||||
"""Provide Netatmo authentication tied to an OAuth2 based config entry."""
|
||||
|
|
|
@ -22,8 +22,6 @@ from .const import (
|
|||
DOMAIN,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class NetatmoFlowHandler(
|
||||
config_entry_oauth2_flow.AbstractOAuth2FlowHandler, domain=DOMAIN
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
"""Support for Netgear LTE binary sensors."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.binary_sensor import DOMAIN, BinarySensorEntity
|
||||
from homeassistant.exceptions import PlatformNotReady
|
||||
|
||||
from . import CONF_MONITORED_CONDITIONS, DATA_KEY, LTEEntity
|
||||
from .sensor_types import BINARY_SENSOR_CLASSES
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_platform(hass, config, async_add_entities, discovery_info):
|
||||
"""Set up Netgear LTE binary sensor devices."""
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
"""Support for Netgear LTE sensors."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.sensor import DOMAIN
|
||||
from homeassistant.exceptions import PlatformNotReady
|
||||
|
||||
from . import CONF_MONITORED_CONDITIONS, DATA_KEY, LTEEntity
|
||||
from .sensor_types import SENSOR_SMS, SENSOR_SMS_TOTAL, SENSOR_UNITS, SENSOR_USAGE
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_platform(hass, config, async_add_entities, discovery_info):
|
||||
"""Set up Netgear LTE sensor devices."""
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for Nexia / Trane XL thermostats."""
|
||||
import logging
|
||||
|
||||
from nexia.const import (
|
||||
OPERATION_MODE_AUTO,
|
||||
OPERATION_MODE_COOL,
|
||||
|
@ -82,8 +80,6 @@ SET_HUMIDITY_SCHEMA = vol.Schema(
|
|||
)
|
||||
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
#
|
||||
# Nexia has two bits to determine hvac mode
|
||||
# There are actually eight states so we map to
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
"""Summary binary data from Nextcoud."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.binary_sensor import BinarySensorEntity
|
||||
|
||||
from . import BINARY_SENSORS, DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""Set up the Nextcloud sensors."""
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
"""Summary data from Nextcoud."""
|
||||
import logging
|
||||
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
from . import DOMAIN, SENSORS
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""Set up the Nextcloud sensors."""
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
"""The Nightscout integration."""
|
||||
import asyncio
|
||||
from asyncio import TimeoutError as AsyncIOTimeoutError
|
||||
import logging
|
||||
|
||||
from aiohttp import ClientError
|
||||
from py_nightscout import Api as NightscoutAPI
|
||||
|
@ -16,7 +15,6 @@ from homeassistant.helpers.entity import SLOW_UPDATE_WARNING
|
|||
|
||||
from .const import DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
PLATFORMS = ["sensor"]
|
||||
_API_TIMEOUT = SLOW_UPDATE_WARNING - 1
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Support for Notion binary sensors."""
|
||||
import logging
|
||||
from typing import Callable
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
|
@ -29,8 +28,6 @@ from .const import (
|
|||
SENSOR_WINDOW_HINGED_VERTICAL,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
BINARY_SENSOR_TYPES = {
|
||||
SENSOR_BATTERY: ("Low Battery", "battery"),
|
||||
SENSOR_DOOR: ("Door", DEVICE_CLASS_DOOR),
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""The NZBGet integration."""
|
||||
import asyncio
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -35,8 +34,6 @@ from .const import (
|
|||
)
|
||||
from .coordinator import NZBGetDataUpdateCoordinator
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
PLATFORMS = ["sensor", "switch"]
|
||||
|
||||
CONFIG_SCHEMA = vol.Schema(
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""OpenEnergyMonitor Thermostat Support."""
|
||||
import logging
|
||||
|
||||
from oemthermostat import Thermostat
|
||||
import requests
|
||||
import voluptuous as vol
|
||||
|
@ -26,9 +24,6 @@ from homeassistant.const import (
|
|||
)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
{
|
||||
vol.Required(CONF_HOST): cv.string,
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
"""Definition and setup of the Omnilogic Sensors for Home Assistant."""
|
||||
|
||||
import logging
|
||||
|
||||
from homeassistant.components.sensor import DEVICE_CLASS_TEMPERATURE
|
||||
from homeassistant.const import (
|
||||
CONCENTRATION_PARTS_PER_MILLION,
|
||||
|
@ -15,8 +12,6 @@ from homeassistant.const import (
|
|||
from .common import OmniLogicEntity, OmniLogicUpdateCoordinator
|
||||
from .const import COORDINATOR, DOMAIN, PUMP_TYPES
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(hass, entry, async_add_entities):
|
||||
"""Set up the sensor platform."""
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
"""Component that will help set the OpenALPR local for ALPR processing."""
|
||||
import asyncio
|
||||
import io
|
||||
import logging
|
||||
import re
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -21,8 +20,6 @@ from homeassistant.core import callback, split_entity_id
|
|||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.util.async_ import run_callback_threadsafe
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
RE_ALPR_PLATE = re.compile(r"^plate\d*:")
|
||||
RE_ALPR_RESULT = re.compile(r"- (\w*)\s*confidence: (\d*.\d*)")
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Support for OpenERZ API for Zurich city waste disposal system."""
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
from openerz_api.main import OpenERZConnector
|
||||
import voluptuous as vol
|
||||
|
@ -9,7 +8,6 @@ import homeassistant.helpers.config_validation as cv
|
|||
from homeassistant.helpers.config_validation import PLATFORM_SCHEMA
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
SCAN_INTERVAL = timedelta(hours=12)
|
||||
|
||||
CONF_ZIP = "zip"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Sensor for the Open Sky Network."""
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
import requests
|
||||
import voluptuous as vol
|
||||
|
@ -21,8 +20,6 @@ import homeassistant.helpers.config_validation as cv
|
|||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.util import distance as util_distance, location as util_location
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_ALTITUDE = "altitude"
|
||||
|
||||
ATTR_CALLSIGN = "callsign"
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
"""Abstraction form OWM sensors."""
|
||||
import logging
|
||||
|
||||
from homeassistant.const import ATTR_ATTRIBUTION
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
|
||||
|
||||
from .const import ATTRIBUTION, SENSOR_DEVICE_CLASS, SENSOR_NAME, SENSOR_UNIT
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class AbstractOpenWeatherMapSensor(Entity):
|
||||
"""Abstract class for an OpenWeatherMap sensor."""
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Config flow for OpenWeatherMap."""
|
||||
import logging
|
||||
|
||||
from pyowm import OWM
|
||||
from pyowm.exceptions.api_call_error import APICallError
|
||||
from pyowm.exceptions.api_response_error import UnauthorizedError
|
||||
|
@ -38,8 +36,6 @@ SCHEMA = vol.Schema(
|
|||
}
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class OpenWeatherMapConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
"""Config flow for OpenWeatherMap."""
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for the OpenWeatherMap (OWM) service."""
|
||||
import logging
|
||||
|
||||
from .abstract_owm_sensor import AbstractOpenWeatherMapSensor
|
||||
from .const import (
|
||||
ATTR_API_THIS_DAY_FORECAST,
|
||||
|
@ -16,8 +14,6 @@ from .const import (
|
|||
from .forecast_update_coordinator import ForecastUpdateCoordinator
|
||||
from .weather_update_coordinator import WeatherUpdateCoordinator
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
"""Set up OpenWeatherMap sensor entities based on a config entry."""
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for the OpenWeatherMap (OWM) service."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.weather import WeatherEntity
|
||||
from homeassistant.const import TEMP_CELSIUS
|
||||
|
||||
|
@ -21,8 +19,6 @@ from .const import (
|
|||
from .forecast_update_coordinator import ForecastUpdateCoordinator
|
||||
from .weather_update_coordinator import WeatherUpdateCoordinator
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
"""Set up OpenWeatherMap weather entity based on a config entry."""
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
"""Device tracker support for OPNSense routers."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.device_tracker import DeviceScanner
|
||||
from homeassistant.components.opnsense import CONF_TRACKER_INTERFACE, OPNSENSE_DATA
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_get_scanner(hass, config, discovery_info=None):
|
||||
"""Configure the OPNSense device_tracker."""
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Support for One-Time Password (OTP)."""
|
||||
import logging
|
||||
import time
|
||||
|
||||
import pyotp
|
||||
|
@ -11,8 +10,6 @@ from homeassistant.core import callback
|
|||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DEFAULT_NAME = "OTP Sensor"
|
||||
|
||||
TIME_STEP = 30 # Default time step assumed by Google Authenticator
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Config flow to configure the OVO Energy integration."""
|
||||
import logging
|
||||
|
||||
import aiohttp
|
||||
from ovoenergy.ovoenergy import OVOEnergy
|
||||
import voluptuous as vol
|
||||
|
@ -11,8 +9,6 @@ from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
|
|||
|
||||
from .const import CONF_ACCOUNT_ID, DOMAIN # pylint: disable=unused-import
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
USER_SCHEMA = vol.Schema(
|
||||
{vol.Required(CONF_USERNAME): str, vol.Required(CONF_PASSWORD): str}
|
||||
)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Support for OVO Energy sensors."""
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
from ovoenergy import OVODailyUsage
|
||||
from ovoenergy.ovoenergy import OVOEnergy
|
||||
|
@ -12,8 +11,6 @@ from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
|
|||
from . import OVOEnergyDeviceEntity
|
||||
from .const import DATA_CLIENT, DATA_COORDINATOR, DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
SCAN_INTERVAL = timedelta(seconds=300)
|
||||
PARALLEL_UPDATES = 4
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Device tracker platform that adds support for OwnTracks over MQTT."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.device_tracker.config_entry import TrackerEntity
|
||||
from homeassistant.components.device_tracker.const import (
|
||||
ATTR_SOURCE_TYPE,
|
||||
|
@ -19,8 +17,6 @@ from homeassistant.helpers.restore_state import RestoreEntity
|
|||
|
||||
from . import DOMAIN as OT_DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(hass, entry, async_add_entities):
|
||||
"""Set up OwnTracks based off an entry."""
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
"""Representation of Z-Wave binary_sensors."""
|
||||
|
||||
import logging
|
||||
|
||||
from openzwavemqtt.const import CommandClass, ValueIndex, ValueType
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
|
@ -25,8 +22,6 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
|||
from .const import DATA_UNSUBSCRIBE, DOMAIN
|
||||
from .entity import ZWaveDeviceEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
NOTIFICATION_TYPE = "index"
|
||||
NOTIFICATION_VALUES = "values"
|
||||
NOTIFICATION_DEVICE_CLASS = "device_class"
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for Z-Wave cover devices."""
|
||||
import logging
|
||||
|
||||
from openzwavemqtt.const import CommandClass
|
||||
|
||||
from homeassistant.components.cover import (
|
||||
|
@ -18,9 +16,6 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
|||
from .const import DATA_UNSUBSCRIBE, DOMAIN
|
||||
from .entity import ZWaveDeviceEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
SUPPORTED_FEATURES_POSITION = SUPPORT_OPEN | SUPPORT_CLOSE | SUPPORT_SET_POSITION
|
||||
SUPPORT_GARAGE = SUPPORT_OPEN | SUPPORT_CLOSE
|
||||
VALUE_SELECTED_ID = "Selected_id"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Support for Panasonic Blu-ray players."""
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
from panacotta import PanasonicBD
|
||||
import voluptuous as vol
|
||||
|
@ -23,8 +22,6 @@ from homeassistant.const import (
|
|||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.util.dt import utcnow
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DEFAULT_NAME = "Panasonic Blu-Ray"
|
||||
|
||||
SCAN_INTERVAL = timedelta(seconds=30)
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for binary sensor using I2C PCAL9535A chip."""
|
||||
import logging
|
||||
|
||||
from pcal9535a import PCAL9535A
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -8,8 +6,6 @@ from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensor
|
|||
from homeassistant.const import DEVICE_DEFAULT_NAME
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_INVERT_LOGIC = "invert_logic"
|
||||
CONF_I2C_ADDRESS = "i2c_address"
|
||||
CONF_I2C_BUS = "i2c_bus"
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for switch sensor using I2C PCAL9535A chip."""
|
||||
import logging
|
||||
|
||||
from pcal9535a import PCAL9535A
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -8,8 +6,6 @@ from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchEntity
|
|||
from homeassistant.const import DEVICE_DEFAULT_NAME
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_INVERT_LOGIC = "invert_logic"
|
||||
CONF_I2C_ADDRESS = "i2c_address"
|
||||
CONF_I2C_BUS = "i2c_bus"
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for binary sensor using RPi GPIO."""
|
||||
import logging
|
||||
|
||||
from pi4ioe5v9xxxx import pi4ioe5v9xxxx # pylint: disable=import-error
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -8,8 +6,6 @@ from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensor
|
|||
from homeassistant.const import DEVICE_DEFAULT_NAME
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_INVERT_LOGIC = "invert_logic"
|
||||
CONF_PINS = "pins"
|
||||
CONF_I2CBUS = "i2c_bus"
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Allows to configure a switch using RPi GPIO."""
|
||||
import logging
|
||||
|
||||
from pi4ioe5v9xxxx import pi4ioe5v9xxxx # pylint: disable=import-error
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -8,8 +6,6 @@ from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchEntity
|
|||
from homeassistant.const import DEVICE_DEFAULT_NAME
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_PINS = "pins"
|
||||
CONF_INVERT_LOGIC = "invert_logic"
|
||||
CONF_I2CBUS = "i2c_bus"
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
"""Support for getting status from a Pi-hole system."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.binary_sensor import BinarySensorEntity
|
||||
from homeassistant.const import CONF_NAME
|
||||
|
||||
from . import PiHoleEntity
|
||||
from .const import DATA_KEY_API, DATA_KEY_COORDINATOR, DOMAIN as PIHOLE_DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(hass, entry, async_add_entities):
|
||||
"""Set up the Pi-hole binary sensor."""
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Support for getting statistical data from a Pi-hole system."""
|
||||
import logging
|
||||
|
||||
from homeassistant.const import CONF_NAME
|
||||
|
||||
|
@ -13,8 +12,6 @@ from .const import (
|
|||
SENSOR_LIST,
|
||||
)
|
||||
|
||||
LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(hass, entry, async_add_entities):
|
||||
"""Set up the Pi-hole sensor."""
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Base class for pilight."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.pilight import DOMAIN, EVENT, SERVICE_NAME
|
||||
|
@ -28,8 +26,6 @@ from .const import (
|
|||
CONF_UNITCODE,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
COMMAND_SCHEMA = vol.Schema(
|
||||
{
|
||||
vol.Optional(CONF_PROTOCOL): cv.string,
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Support for Pilight binary sensors."""
|
||||
import datetime
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -17,8 +16,6 @@ from homeassistant.helpers import config_validation as cv
|
|||
from homeassistant.helpers.event import track_point_in_time
|
||||
from homeassistant.util import dt as dt_util
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_VARIABLE = "variable"
|
||||
CONF_RESET_DELAY_SEC = "reset_delay_sec"
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for switching devices via Pilight to on and off."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.light import (
|
||||
|
@ -15,8 +13,6 @@ import homeassistant.helpers.config_validation as cv
|
|||
from .base_class import SWITCHES_SCHEMA, PilightBaseDevice
|
||||
from .const import CONF_DIMLEVEL_MAX, CONF_DIMLEVEL_MIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
LIGHTS_SCHEMA = SWITCHES_SCHEMA.extend(
|
||||
{
|
||||
vol.Optional(CONF_DIMLEVEL_MIN, default=0): cv.positive_int,
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for switching devices via Pilight to on and off."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchEntity
|
||||
|
@ -9,8 +7,6 @@ import homeassistant.helpers.config_validation as cv
|
|||
|
||||
from .base_class import SWITCHES_SCHEMA, PilightBaseDevice
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
{vol.Required(CONF_SWITCHES): vol.Schema({cv.string: SWITCHES_SCHEMA})}
|
||||
)
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for controlling projector via the PJLink protocol."""
|
||||
import logging
|
||||
|
||||
from pypjlink import MUTE_AUDIO, Projector
|
||||
from pypjlink.projector import ProjectorError
|
||||
import voluptuous as vol
|
||||
|
@ -22,8 +20,6 @@ from homeassistant.const import (
|
|||
)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_ENCODING = "encoding"
|
||||
|
||||
DEFAULT_PORT = 4352
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
"""Plugwise platform for Home Assistant Core."""
|
||||
|
||||
import asyncio
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -14,8 +12,6 @@ from .gateway import async_setup_entry_gw
|
|||
|
||||
CONFIG_SCHEMA = vol.Schema({DOMAIN: vol.Schema({})}, extra=vol.ALLOW_EXTRA)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup(hass: HomeAssistant, config: dict):
|
||||
"""Set up the Plugwise platform."""
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Support for Plum Lightpad lights."""
|
||||
import asyncio
|
||||
import logging
|
||||
from typing import Callable, List
|
||||
|
||||
from plumlightpad import Plum
|
||||
|
@ -20,8 +19,6 @@ import homeassistant.util.color as color_util
|
|||
|
||||
from .const import DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(
|
||||
hass: HomeAssistant,
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for PoolSense binary sensors."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_PROBLEM,
|
||||
BinarySensorEntity,
|
||||
|
@ -10,8 +8,6 @@ from homeassistant.const import CONF_EMAIL
|
|||
from . import PoolSenseEntity
|
||||
from .const import DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
BINARY_SENSORS = {
|
||||
"pH Status": {
|
||||
"unit": None,
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Sensor platform for the PoolSense sensor."""
|
||||
import logging
|
||||
|
||||
from homeassistant.const import (
|
||||
ATTR_ATTRIBUTION,
|
||||
CONF_EMAIL,
|
||||
|
@ -15,8 +13,6 @@ from homeassistant.helpers.entity import Entity
|
|||
from . import PoolSenseEntity
|
||||
from .const import ATTRIBUTION, DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
SENSORS = {
|
||||
"Chlorine": {
|
||||
"unit": "mV",
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for powerwall binary sensors."""
|
||||
import logging
|
||||
|
||||
from tesla_powerwall import GridStatus
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
|
@ -23,8 +21,6 @@ from .const import (
|
|||
)
|
||||
from .entity import PowerWallEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
"""Set up the August sensors."""
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
"""The profiler integration."""
|
||||
import asyncio
|
||||
import cProfile
|
||||
import logging
|
||||
import time
|
||||
|
||||
from pyprof2calltree import convert
|
||||
|
@ -17,8 +16,6 @@ from .const import DOMAIN
|
|||
SERVICE_START = "start"
|
||||
CONF_SECONDS = "seconds"
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
"""Set up the profiler component."""
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Config flow for Profiler integration."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant import config_entries
|
||||
|
@ -8,8 +6,6 @@ from homeassistant import config_entries
|
|||
from .const import DEFAULT_NAME
|
||||
from .const import DOMAIN # pylint: disable=unused-import
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
"""Handle a config flow for Profiler."""
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Config Flow for PlayStation 4."""
|
||||
from collections import OrderedDict
|
||||
import logging
|
||||
|
||||
from pyps4_2ndscreen.errors import CredentialTimeout
|
||||
from pyps4_2ndscreen.helpers import Helper
|
||||
|
@ -20,8 +19,6 @@ from homeassistant.util import location
|
|||
|
||||
from .const import CONFIG_ENTRY_VERSION, DEFAULT_ALIAS, DEFAULT_NAME, DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_MODE = "Config Mode"
|
||||
CONF_AUTO = "Auto Discover"
|
||||
CONF_MANUAL = "Manual Entry"
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
"""Support for Rain Bird Irrigation system LNK WiFi Module."""
|
||||
|
||||
import logging
|
||||
|
||||
from pyrainbird import AvailableStations, RainbirdController
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -11,8 +8,6 @@ from homeassistant.helpers import config_validation as cv
|
|||
|
||||
from . import CONF_ZONES, DATA_RAINBIRD, DOMAIN, RAINBIRD_CONTROLLER
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
ATTR_DURATION = "duration"
|
||||
|
||||
SERVICE_START_IRRIGATION = "start_irrigation"
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""This platform provides binary sensors for key RainMachine data."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.binary_sensor import BinarySensorEntity
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
|
@ -15,8 +13,6 @@ from .const import (
|
|||
SENSOR_UPDATE_TOPIC,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
TYPE_FLOW_SENSOR = "flow_sensor"
|
||||
TYPE_FREEZE = "freeze"
|
||||
TYPE_FREEZE_PROTECTION = "freeze_protection"
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""This platform provides support for sensor data from RainMachine."""
|
||||
import logging
|
||||
|
||||
from homeassistant.const import TEMP_CELSIUS, VOLUME_CUBIC_METERS
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
|
@ -14,8 +12,6 @@ from .const import (
|
|||
SENSOR_UPDATE_TOPIC,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
TYPE_FLOW_SENSOR_CLICK_M3 = "flow_sensor_clicks_cubic_meter"
|
||||
TYPE_FLOW_SENSOR_CONSUMED_LITERS = "flow_sensor_consumed_liters"
|
||||
TYPE_FLOW_SENSOR_START_INDEX = "flow_sensor_start_index"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Support for showing random states."""
|
||||
import logging
|
||||
from random import getrandbits
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -12,8 +11,6 @@ from homeassistant.components.binary_sensor import (
|
|||
from homeassistant.const import CONF_DEVICE_CLASS, CONF_NAME
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DEFAULT_NAME = "Random Binary Sensor"
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Support for showing random numbers."""
|
||||
import logging
|
||||
from random import randrange
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -14,8 +13,6 @@ from homeassistant.const import (
|
|||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
ATTR_MAXIMUM = "maximum"
|
||||
ATTR_MINIMUM = "minimum"
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for switches that can be controlled using the RaspyRFM rc module."""
|
||||
import logging
|
||||
|
||||
from raspyrfm_client import RaspyRFMClient
|
||||
from raspyrfm_client.device_implementations.controlunit.actions import Action
|
||||
from raspyrfm_client.device_implementations.controlunit.controlunit_constants import (
|
||||
|
@ -22,8 +20,6 @@ from homeassistant.const import (
|
|||
)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_GATEWAY_MANUFACTURER = "gateway_manufacturer"
|
||||
CONF_GATEWAY_MODEL = "gateway_model"
|
||||
CONF_CONTROLUNIT_MANUFACTURER = "controlunit_manufacturer"
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
"""Support for controlling GPIO pins of a Raspberry Pi."""
|
||||
import logging
|
||||
|
||||
from gpiozero import LED, Button
|
||||
from gpiozero.pins.pigpio import PiGPIOFactory
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_BOUNCETIME = "bouncetime"
|
||||
CONF_INVERT_LOGIC = "invert_logic"
|
||||
CONF_PULL_MODE = "pull_mode"
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for binary sensor using RPi GPIO."""
|
||||
import logging
|
||||
|
||||
import requests
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -18,8 +16,6 @@ from . import (
|
|||
)
|
||||
from .. import remote_rpi_gpio
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_PORTS = "ports"
|
||||
|
||||
_SENSORS_SCHEMA = vol.Schema({cv.positive_int: cv.string})
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Allows to configure a switch using RPi GPIO."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchEntity
|
||||
|
@ -10,8 +8,6 @@ import homeassistant.helpers.config_validation as cv
|
|||
from . import CONF_INVERT_LOGIC, DEFAULT_INVERT_LOGIC
|
||||
from .. import remote_rpi_gpio
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_PORTS = "ports"
|
||||
|
||||
_SENSORS_SCHEMA = vol.Schema({cv.positive_int: cv.string})
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for RESTful binary sensors."""
|
||||
import logging
|
||||
|
||||
import httpx
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -34,8 +32,6 @@ from homeassistant.helpers.reload import async_setup_reload_service
|
|||
from . import DOMAIN, PLATFORMS
|
||||
from .sensor import RestData
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DEFAULT_METHOD = "GET"
|
||||
DEFAULT_NAME = "REST Binary Sensor"
|
||||
DEFAULT_VERIFY_SSL = True
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for Rflink binary sensors."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
|
@ -17,8 +15,6 @@ from . import CONF_ALIASES, CONF_DEVICES, RflinkDevice
|
|||
CONF_OFF_DELAY = "off_delay"
|
||||
DEFAULT_FORCE_UPDATE = False
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
{
|
||||
vol.Optional(CONF_DEVICES, default={}): {
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for Rflink sensors."""
|
||||
import logging
|
||||
|
||||
from rflink.parser import PACKET_FIELDS, UNITS
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -28,8 +26,6 @@ from . import (
|
|||
RflinkDevice,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
SENSOR_ICONS = {
|
||||
"humidity": "mdi:water-percent",
|
||||
"battery": "mdi:battery",
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for Rflink switches."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchEntity
|
||||
|
@ -20,8 +18,6 @@ from . import (
|
|||
SwitchableRflinkDevice,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
PARALLEL_UPDATES = 0
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Config flow for RFXCOM RFXtrx integration."""
|
||||
import copy
|
||||
import logging
|
||||
import os
|
||||
|
||||
import RFXtrx as rfxtrxmod
|
||||
|
@ -47,8 +46,6 @@ from .cover import supported as cover_supported
|
|||
from .light import supported as light_supported
|
||||
from .switch import supported as switch_supported
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_EVENT_CODE = "event_code"
|
||||
CONF_MANUAL_PATH = "Enter Manually"
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""This component provides HA sensor support for Ring Door Bell/Chimes."""
|
||||
from datetime import datetime
|
||||
import logging
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_MOTION,
|
||||
|
@ -12,8 +11,6 @@ from homeassistant.core import callback
|
|||
from . import DOMAIN
|
||||
from .entity import RingEntityMixin
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
# Sensor types: Name, category, device_class
|
||||
SENSOR_TYPES = {
|
||||
"ding": ["Ding", ["doorbots", "authorized_doorbots"], DEVICE_CLASS_OCCUPANCY],
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""This component provides HA sensor support for Ring Door Bell/Chimes."""
|
||||
import logging
|
||||
|
||||
from homeassistant.const import PERCENTAGE, SIGNAL_STRENGTH_DECIBELS_MILLIWATT
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
@ -9,8 +7,6 @@ from homeassistant.helpers.icon import icon_for_battery_level
|
|||
from . import DOMAIN
|
||||
from .entity import RingEntityMixin
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
"""Set up a sensor for a Ring device."""
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
"""Roomba binary sensor entities."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.binary_sensor import BinarySensorEntity
|
||||
|
||||
from . import roomba_reported_state
|
||||
from .const import BLID, DOMAIN, ROOMBA_SESSION
|
||||
from .irobot_base import IRobotEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
"""Set up the iRobot Roomba vacuum cleaner."""
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Config flow to configure roomba component."""
|
||||
import logging
|
||||
|
||||
from roomba import Roomba
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -30,8 +28,6 @@ DATA_SCHEMA = vol.Schema(
|
|||
}
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def validate_input(hass: core.HomeAssistant, data):
|
||||
"""Validate the user input allows us to connect.
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Sensor for checking the battery level of Roomba."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.vacuum import STATE_DOCKED
|
||||
from homeassistant.const import DEVICE_CLASS_BATTERY, PERCENTAGE
|
||||
from homeassistant.helpers.icon import icon_for_battery_level
|
||||
|
@ -8,8 +6,6 @@ from homeassistant.helpers.icon import icon_for_battery_level
|
|||
from .const import BLID, DOMAIN, ROOMBA_SESSION
|
||||
from .irobot_base import IRobotEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
"""Set up the iRobot Roomba vacuum cleaner."""
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
"""Support for Wi-Fi enabled iRobot Roombas."""
|
||||
import logging
|
||||
|
||||
from . import roomba_reported_state
|
||||
from .braava import BraavaJet
|
||||
from .const import BLID, DOMAIN, ROOMBA_SESSION
|
||||
from .roomba import RoombaVacuum, RoombaVacuumCarpetBoost
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
"""Set up the iRobot Roomba vacuum cleaner."""
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
"""Roon (www.roonlabs.com) component."""
|
||||
import logging
|
||||
|
||||
from homeassistant.const import CONF_HOST
|
||||
from homeassistant.helpers import device_registry as dr
|
||||
|
||||
from .const import DOMAIN
|
||||
from .server import RoonServer
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup(hass, config):
|
||||
"""Set up the Roon platform."""
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""The rpi_camera component."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.const import CONF_FILE_PATH, CONF_NAME
|
||||
|
@ -27,8 +25,6 @@ from .const import (
|
|||
DOMAIN,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONFIG_SCHEMA = vol.Schema(
|
||||
{
|
||||
DOMAIN: vol.Schema(
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
"""Support for controlling GPIO pins of a Raspberry Pi."""
|
||||
import logging
|
||||
|
||||
from RPi import GPIO # pylint: disable=import-error
|
||||
|
||||
from homeassistant.const import EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DOMAIN = "rpi_gpio"
|
||||
PLATFORMS = ["binary_sensor", "cover", "switch"]
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for binary sensor using RPi GPIO."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components import rpi_gpio
|
||||
|
@ -11,8 +9,6 @@ from homeassistant.helpers.reload import setup_reload_service
|
|||
|
||||
from . import DOMAIN, PLATFORMS
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_BOUNCETIME = "bouncetime"
|
||||
CONF_INVERT_LOGIC = "invert_logic"
|
||||
CONF_PORTS = "ports"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Support for controlling a Raspberry Pi cover."""
|
||||
import logging
|
||||
from time import sleep
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -12,8 +11,6 @@ from homeassistant.helpers.reload import setup_reload_service
|
|||
|
||||
from . import DOMAIN, PLATFORMS
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_COVERS = "covers"
|
||||
CONF_RELAY_PIN = "relay_pin"
|
||||
CONF_RELAY_TIME = "relay_time"
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Allows to configure a switch using RPi GPIO."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components import rpi_gpio
|
||||
|
@ -12,8 +10,6 @@ from homeassistant.helpers.reload import setup_reload_service
|
|||
|
||||
from . import DOMAIN, PLATFORMS
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_PULL_MODE = "pull_mode"
|
||||
CONF_PORTS = "ports"
|
||||
CONF_INVERT_LOGIC = "invert_logic"
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
"""Support for controlling the PiFace Digital I/O module on a RPi."""
|
||||
import logging
|
||||
|
||||
import pifacedigitalio as PFIO
|
||||
|
||||
from homeassistant.const import EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DOMAIN = "rpi_pfio"
|
||||
|
||||
DATA_PFIO_LISTENER = "pfio_listener"
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for binary sensor using the PiFace Digital I/O module on a RPi."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components import rpi_pfio
|
||||
|
@ -8,8 +6,6 @@ from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensor
|
|||
from homeassistant.const import CONF_NAME, DEVICE_DEFAULT_NAME
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_INVERT_LOGIC = "invert_logic"
|
||||
CONF_PORTS = "ports"
|
||||
CONF_SETTLE_TIME = "settle_time"
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for switches using the PiFace Digital I/O module on a RPi."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components import rpi_pfio
|
||||
|
@ -9,8 +7,6 @@ from homeassistant.const import ATTR_NAME, DEVICE_DEFAULT_NAME
|
|||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import ToggleEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
ATTR_INVERT_LOGIC = "invert_logic"
|
||||
|
||||
CONF_PORTS = "ports"
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for Russound multizone controllers using RIO Protocol."""
|
||||
import logging
|
||||
|
||||
from russound_rio import Russound
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -24,8 +22,6 @@ from homeassistant.const import (
|
|||
from homeassistant.core import callback
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
SUPPORT_RUSSOUND = (
|
||||
SUPPORT_VOLUME_MUTE
|
||||
| SUPPORT_VOLUME_SET
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
"""Support for monitoring an SABnzbd NZB client."""
|
||||
import logging
|
||||
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
from . import DATA_SABNZBD, SENSOR_TYPES, SIGNAL_SABNZBD_UPDATED
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
||||
"""Set up the SABnzbd sensors."""
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for Satel Integra zone states- represented as binary sensors."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_SMOKE,
|
||||
BinarySensorEntity,
|
||||
|
@ -18,8 +16,6 @@ from . import (
|
|||
SIGNAL_ZONES_UPDATED,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
||||
"""Set up the Satel Integra binary sensor devices."""
|
||||
|
|
|
@ -59,8 +59,9 @@ PLATFORM_SCHEMA = vol.Schema(
|
|||
|
||||
async def async_setup(hass, config):
|
||||
"""Set up the scenes."""
|
||||
logger = logging.getLogger(__name__)
|
||||
component = hass.data[DOMAIN] = EntityComponent(logger, DOMAIN, hass)
|
||||
component = hass.data[DOMAIN] = EntityComponent(
|
||||
logging.getLogger(__name__), DOMAIN, hass
|
||||
)
|
||||
|
||||
await component.async_setup(config)
|
||||
# Ensure Home Assistant platform always loaded.
|
||||
|
|
|
@ -14,8 +14,6 @@ import homeassistant.helpers.config_validation as cv
|
|||
|
||||
from . import CONF_SCS_ID, DOMAIN, SCSGATE_SCHEMA
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
{vol.Required(CONF_DEVICES): cv.schema_with_slug_keys(SCSGATE_SCHEMA)}
|
||||
)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue