Update file header (#21023)
* Update file header * Update file header * Update file header * Update file header * Update file header * Fix lint issues
This commit is contained in:
parent
22af9707ad
commit
127c55e0c1
492 changed files with 1015 additions and 3497 deletions
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
This component provides basic support for Abode Home Security system.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/abode/
|
||||
"""
|
||||
"""Support for Abode Home Security system."""
|
||||
import logging
|
||||
from functools import partial
|
||||
from requests.exceptions import HTTPError, ConnectTimeout
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
This component provides HA alarm_control_panel support for Abode System.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/alarm_control_panel.abode/
|
||||
"""
|
||||
"""Support for Abode Security System alarm control panels."""
|
||||
import logging
|
||||
|
||||
import homeassistant.components.alarm_control_panel as alarm
|
||||
|
|
|
@ -1,20 +1,14 @@
|
|||
"""
|
||||
This component provides HA binary_sensor support for Abode Security System.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/binary_sensor.abode/
|
||||
"""
|
||||
"""Support for Abode Security System binary sensors."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.abode import (AbodeDevice, AbodeAutomation,
|
||||
DOMAIN as ABODE_DOMAIN)
|
||||
from homeassistant.components.binary_sensor import BinarySensorDevice
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DEPENDENCIES = ['abode']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""Set up a sensor for an Abode device."""
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
This component provides HA camera support for Abode Security System.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/camera.abode/
|
||||
"""
|
||||
"""Support for Abode Security System cameras."""
|
||||
import logging
|
||||
|
||||
from datetime import timedelta
|
||||
|
@ -13,7 +8,6 @@ from homeassistant.components.abode import AbodeDevice, DOMAIN as ABODE_DOMAIN
|
|||
from homeassistant.components.camera import Camera
|
||||
from homeassistant.util import Throttle
|
||||
|
||||
|
||||
DEPENDENCIES = ['abode']
|
||||
|
||||
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=90)
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
"""
|
||||
This component provides HA cover support for Abode Security System.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/cover.abode/
|
||||
"""
|
||||
"""Support for Abode Security System covers."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.abode import AbodeDevice, DOMAIN as ABODE_DOMAIN
|
||||
from homeassistant.components.cover import CoverDevice
|
||||
|
||||
|
||||
DEPENDENCIES = ['abode']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
This component provides HA light support for Abode Security System.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/light.abode/
|
||||
"""
|
||||
"""Support for Abode Security System lights."""
|
||||
import logging
|
||||
from math import ceil
|
||||
from homeassistant.components.abode import AbodeDevice, DOMAIN as ABODE_DOMAIN
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
"""
|
||||
This component provides HA lock support for Abode Security System.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/lock.abode/
|
||||
"""
|
||||
"""Support for Abode Security System locks."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.abode import AbodeDevice, DOMAIN as ABODE_DOMAIN
|
||||
from homeassistant.components.lock import LockDevice
|
||||
|
||||
|
||||
DEPENDENCIES = ['abode']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Abode Security System sensors.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.abode/
|
||||
"""
|
||||
"""Support for Abode Security System sensors."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.abode import AbodeDevice, DOMAIN as ABODE_DOMAIN
|
||||
|
|
|
@ -1,20 +1,14 @@
|
|||
"""
|
||||
This component provides HA switch support for Abode Security System.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/switch.abode/
|
||||
"""
|
||||
"""Support for Abode Security System switches."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.abode import (AbodeDevice, AbodeAutomation,
|
||||
DOMAIN as ABODE_DOMAIN)
|
||||
from homeassistant.components.switch import SwitchDevice
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DEPENDENCIES = ['abode']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""Set up Abode switch devices."""
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Automation Device Specification (ADS).
|
||||
|
||||
For more details about this component, please refer to the documentation.
|
||||
https://home-assistant.io/components/ads/
|
||||
"""
|
||||
"""Support for Automation Device Specification (ADS)."""
|
||||
import threading
|
||||
import struct
|
||||
import logging
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for ADS binary sensors.
|
||||
|
||||
For more details about this platform, please refer to the documentation.
|
||||
https://home-assistant.io/components/binary_sensor.ads/
|
||||
"""
|
||||
"""Support for ADS binary sensors."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
"""
|
||||
Support for ADS light sources.
|
||||
|
||||
For more details about this platform, please refer to the documentation.
|
||||
https://home-assistant.io/components/light.ads/
|
||||
|
||||
"""
|
||||
"""Support for ADS light sources."""
|
||||
import logging
|
||||
import voluptuous as vol
|
||||
from homeassistant.components.light import Light, ATTR_BRIGHTNESS, \
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for ADS sensors.
|
||||
|
||||
For more details about this platform, please refer to the documentation.
|
||||
https://home-assistant.io/components/sensor.ads/
|
||||
"""
|
||||
"""Support for ADS sensors."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for ADS switch platform.
|
||||
|
||||
For more details about this platform, please refer to the documentation.
|
||||
https://home-assistant.io/components/switch.ads/
|
||||
"""
|
||||
"""Support for ADS switch platform."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -37,7 +32,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
|
||||
|
||||
class AdsSwitch(ToggleEntity):
|
||||
"""Representation of an Ads switch device."""
|
||||
"""Representation of an ADS switch device."""
|
||||
|
||||
def __init__(self, ads_hub, name, ads_var):
|
||||
"""Initialize the AdsSwitch entity."""
|
||||
|
@ -51,7 +46,7 @@ class AdsSwitch(ToggleEntity):
|
|||
"""Register device notification."""
|
||||
def update(name, value):
|
||||
"""Handle device notification."""
|
||||
_LOGGER.debug('Variable %s changed its value to %d', name, value)
|
||||
_LOGGER.debug("Variable %s changed its value to %d", name, value)
|
||||
self._on_state = value
|
||||
self.schedule_update_ha_state()
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for AlarmDecoder devices.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/alarmdecoder/
|
||||
"""
|
||||
"""Support for AlarmDecoder devices."""
|
||||
import logging
|
||||
|
||||
from datetime import timedelta
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for AlarmDecoder-based alarm control panels (Honeywell/DSC).
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/alarm_control_panel.alarmdecoder/
|
||||
"""
|
||||
"""Support for AlarmDecoder-based alarm control panels (Honeywell/DSC)."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for AlarmDecoder zone states- represented as binary sensors.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/binary_sensor.alarmdecoder/
|
||||
"""
|
||||
"""Support for AlarmDecoder zone states- represented as binary sensors."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.binary_sensor import BinarySensorDevice
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for AlarmDecoder Sensors (Shows Panel Display).
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.alarmdecoder/
|
||||
"""
|
||||
"""Support for AlarmDecoder sensors (Shows Panel Display)."""
|
||||
import logging
|
||||
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for repeating alerts when conditions are met.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/alert/
|
||||
"""
|
||||
"""Support for repeating alerts when conditions are met."""
|
||||
import asyncio
|
||||
import logging
|
||||
from datetime import datetime, timedelta
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Alexa skill service end point.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/alexa/
|
||||
"""
|
||||
"""Support for Alexa skill service end point."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -57,7 +52,7 @@ CONFIG_SCHEMA = vol.Schema({
|
|||
|
||||
|
||||
async def async_setup(hass, config):
|
||||
"""Activate Alexa component."""
|
||||
"""Activate the Alexa component."""
|
||||
config = config.get(DOMAIN, {})
|
||||
flash_briefings_config = config.get(CONF_FLASH_BRIEFINGS)
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Support for Alexa skill auth."""
|
||||
|
||||
import asyncio
|
||||
import json
|
||||
import logging
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Alexa skill service end point.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/alexa/
|
||||
"""
|
||||
"""Support for Alexa skill service end point."""
|
||||
import copy
|
||||
from datetime import datetime
|
||||
import logging
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Alexa skill service end point.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/alexa/
|
||||
"""
|
||||
"""Support for Alexa skill service end point."""
|
||||
import enum
|
||||
import logging
|
||||
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
"""Support for alexa Smart Home Skill API.
|
||||
|
||||
API documentation:
|
||||
https://developer.amazon.com/docs/smarthome/understand-the-smart-home-skill-api.html
|
||||
https://developer.amazon.com/docs/device-apis/message-guide.html
|
||||
"""
|
||||
|
||||
"""Support for alexa Smart Home Skill API."""
|
||||
import asyncio
|
||||
from collections import OrderedDict
|
||||
from datetime import datetime
|
||||
|
@ -67,7 +61,7 @@ API_THERMOSTAT_MODES = OrderedDict([
|
|||
(climate.STATE_OFF, 'OFF'),
|
||||
(climate.STATE_IDLE, 'OFF'),
|
||||
(climate.STATE_FAN_ONLY, 'OFF'),
|
||||
(climate.STATE_DRY, 'OFF')
|
||||
(climate.STATE_DRY, 'OFF'),
|
||||
])
|
||||
|
||||
SMART_HOME_HTTP_ENDPOINT = '/api/alexa/smart_home'
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Ambient Weather Station Service.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/ambient_station/
|
||||
"""
|
||||
"""Support for Ambient Weather Station Service."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -26,6 +21,7 @@ from .const import (
|
|||
TYPE_BINARY_SENSOR, TYPE_SENSOR)
|
||||
|
||||
REQUIREMENTS = ['aioambient==0.1.1']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DATA_CONFIG = 'config'
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Ambient Weather Station binary sensors.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/binary_sensor.ambient_station/
|
||||
"""
|
||||
"""Support for Ambient Weather Station binary sensors."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.ambient_station import (
|
||||
|
@ -15,9 +10,10 @@ from homeassistant.const import ATTR_NAME
|
|||
|
||||
from .const import ATTR_LAST_DATA, DATA_CLIENT, DOMAIN, TYPE_BINARY_SENSOR
|
||||
|
||||
DEPENDENCIES = ['ambient_station']
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DEPENDENCIES = ['ambient_station']
|
||||
|
||||
|
||||
async def async_setup_platform(
|
||||
hass, config, async_add_entities, discovery_info=None):
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"""Config flow to configure the Ambient PWS component."""
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant import config_entries
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Ambient Weather Station sensors.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.ambient_station/
|
||||
"""
|
||||
"""Support for Ambient Weather Station sensors."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.ambient_station import (
|
||||
|
@ -12,9 +7,10 @@ from homeassistant.const import ATTR_NAME
|
|||
|
||||
from .const import ATTR_LAST_DATA, DATA_CLIENT, DOMAIN, TYPE_SENSOR
|
||||
|
||||
DEPENDENCIES = ['ambient_station']
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DEPENDENCIES = ['ambient_station']
|
||||
|
||||
|
||||
async def async_setup_platform(
|
||||
hass, config, async_add_entities, discovery_info=None):
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
This component provides basic support for Amcrest IP cameras.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/amcrest/
|
||||
"""
|
||||
"""Support for Amcrest IP cameras."""
|
||||
import logging
|
||||
from datetime import timedelta
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
This component provides basic support for Amcrest IP cameras.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/camera.amcrest/
|
||||
"""
|
||||
"""Support for Amcrest IP cameras."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.amcrest import (
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
This component provides HA sensor support for Amcrest IP cameras.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.amcrest/
|
||||
"""
|
||||
"""Suppoort for Amcrest IP camera sensors."""
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
|
@ -18,8 +13,8 @@ _LOGGER = logging.getLogger(__name__)
|
|||
SCAN_INTERVAL = timedelta(seconds=10)
|
||||
|
||||
|
||||
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 a sensor for an Amcrest IP Camera."""
|
||||
if discovery_info is None:
|
||||
return
|
||||
|
@ -45,8 +40,8 @@ class AmcrestSensor(Entity):
|
|||
self._attrs = {}
|
||||
self._camera = camera
|
||||
self._sensor_type = sensor_type
|
||||
self._name = '{0}_{1}'.format(name,
|
||||
SENSORS.get(self._sensor_type)[0])
|
||||
self._name = '{0}_{1}'.format(
|
||||
name, SENSORS.get(self._sensor_type)[0])
|
||||
self._icon = 'mdi:{}'.format(SENSORS.get(self._sensor_type)[2])
|
||||
self._state = None
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for toggling Amcrest IP camera settings.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/switch.amcrest/
|
||||
"""
|
||||
"""Support for toggling Amcrest IP camera settings."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.amcrest import DATA_AMCREST, SWITCHES
|
||||
|
@ -16,8 +11,8 @@ _LOGGER = logging.getLogger(__name__)
|
|||
DEPENDENCIES = ['amcrest']
|
||||
|
||||
|
||||
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 IP Amcrest camera switch platform."""
|
||||
if discovery_info is None:
|
||||
return
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for IP Webcam, an Android app that acts as a full-featured webcam.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/android_ip_webcam/
|
||||
"""
|
||||
"""Support for Android IP Webcam."""
|
||||
import asyncio
|
||||
import logging
|
||||
from datetime import timedelta
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for IP Webcam binary sensors.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/binary_sensor.android_ip_webcam/
|
||||
"""
|
||||
"""Support for Android IP Webcam binary sensors."""
|
||||
from homeassistant.components.binary_sensor import BinarySensorDevice
|
||||
from homeassistant.components.android_ip_webcam import (
|
||||
KEY_MAP, DATA_IP_WEBCAM, AndroidIPCamEntity, CONF_HOST, CONF_NAME)
|
||||
|
@ -11,8 +6,8 @@ from homeassistant.components.android_ip_webcam import (
|
|||
DEPENDENCIES = ['android_ip_webcam']
|
||||
|
||||
|
||||
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 IP Webcam binary sensors."""
|
||||
if discovery_info is None:
|
||||
return
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
"""
|
||||
Support for IP Webcam sensors.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.android_ip_webcam/
|
||||
"""
|
||||
|
||||
"""Support for Android IP Webcam sensors."""
|
||||
from homeassistant.components.android_ip_webcam import (
|
||||
KEY_MAP, ICON_MAP, DATA_IP_WEBCAM, AndroidIPCamEntity, CONF_HOST,
|
||||
CONF_NAME, CONF_SENSORS)
|
||||
|
@ -13,8 +7,8 @@ from homeassistant.helpers.icon import icon_for_battery_level
|
|||
DEPENDENCIES = ['android_ip_webcam']
|
||||
|
||||
|
||||
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 IP Webcam Sensor."""
|
||||
if discovery_info is None:
|
||||
return
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
"""
|
||||
Support for IP Webcam settings.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/switch.android_ip_webcam/
|
||||
"""
|
||||
|
||||
"""Support for Android IP Webcam settings."""
|
||||
from homeassistant.components.switch import SwitchDevice
|
||||
from homeassistant.components.android_ip_webcam import (
|
||||
KEY_MAP, ICON_MAP, DATA_IP_WEBCAM, AndroidIPCamEntity, CONF_HOST,
|
||||
|
@ -13,8 +7,8 @@ from homeassistant.components.android_ip_webcam import (
|
|||
DEPENDENCIES = ['android_ip_webcam']
|
||||
|
||||
|
||||
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 IP Webcam switch platform."""
|
||||
if discovery_info is None:
|
||||
return
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for status output of APCUPSd via its Network Information Server (NIS).
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/apcupsd/
|
||||
"""
|
||||
"""Support for APCUPSd via its Network Information Server (NIS)."""
|
||||
import logging
|
||||
from datetime import timedelta
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for tracking the online status of a UPS.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/binary_sensor.apcupsd/
|
||||
"""
|
||||
"""Support for tracking the online status of a UPS."""
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Provides a sensor to track various status aspects of a UPS.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.apcupsd/
|
||||
"""
|
||||
"""Support for APCUPSd sensors."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Rest API for Home Assistant.
|
||||
|
||||
For more details about the RESTful API, please refer to the documentation at
|
||||
https://developers.home-assistant.io/docs/en/external_api_rest.html
|
||||
"""
|
||||
"""Rest API for Home Assistant."""
|
||||
import asyncio
|
||||
import json
|
||||
import logging
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Apple TV.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/apple_tv/
|
||||
"""
|
||||
"""Support for Apple TV."""
|
||||
import asyncio
|
||||
import logging
|
||||
from typing import Sequence, TypeVar, Union
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Apple TV.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/media_player.apple_tv/
|
||||
"""
|
||||
"""Support for Apple TV media player."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.apple_tv import (
|
||||
|
|
|
@ -1,21 +1,14 @@
|
|||
"""
|
||||
Remote control support for Apple TV.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/remote.apple_tv/
|
||||
"""
|
||||
|
||||
"""Remote control support for Apple TV."""
|
||||
from homeassistant.components.apple_tv import (
|
||||
ATTR_ATV, ATTR_POWER, DATA_APPLE_TV)
|
||||
from homeassistant.components import remote
|
||||
from homeassistant.const import (CONF_NAME, CONF_HOST)
|
||||
|
||||
|
||||
DEPENDENCIES = ['apple_tv']
|
||||
|
||||
|
||||
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 Apple TV remote platform."""
|
||||
if not discovery_info:
|
||||
return
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for AquaLogic component.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/aqualogic/
|
||||
"""
|
||||
"""Support for AquaLogic devices."""
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
import time
|
||||
|
@ -20,15 +15,15 @@ REQUIREMENTS = ["aqualogic==1.0"]
|
|||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DOMAIN = "aqualogic"
|
||||
UPDATE_TOPIC = DOMAIN + "_update"
|
||||
CONF_UNIT = "unit"
|
||||
DOMAIN = 'aqualogic'
|
||||
UPDATE_TOPIC = DOMAIN + '_update'
|
||||
CONF_UNIT = 'unit'
|
||||
RECONNECT_INTERVAL = timedelta(seconds=10)
|
||||
|
||||
CONFIG_SCHEMA = vol.Schema({
|
||||
DOMAIN: vol.Schema({
|
||||
vol.Required(CONF_HOST): cv.string,
|
||||
vol.Required(CONF_PORT): cv.port
|
||||
vol.Required(CONF_PORT): cv.port,
|
||||
}),
|
||||
}, extra=vol.ALLOW_EXTRA)
|
||||
|
||||
|
@ -39,10 +34,8 @@ def setup(hass, config):
|
|||
port = config[DOMAIN][CONF_PORT]
|
||||
processor = AquaLogicProcessor(hass, host, port)
|
||||
hass.data[DOMAIN] = processor
|
||||
hass.bus.listen_once(EVENT_HOMEASSISTANT_START,
|
||||
processor.start_listen)
|
||||
hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP,
|
||||
processor.shutdown)
|
||||
hass.bus.listen_once(EVENT_HOMEASSISTANT_START, processor.start_listen)
|
||||
hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, processor.shutdown)
|
||||
_LOGGER.debug("AquaLogicProcessor %s:%i initialized", host, port)
|
||||
return True
|
||||
|
||||
|
@ -85,8 +78,7 @@ class AquaLogicProcessor(threading.Thread):
|
|||
if self._shutdown:
|
||||
return
|
||||
|
||||
_LOGGER.error("Connection to %s:%d lost",
|
||||
self._host, self._port)
|
||||
_LOGGER.error("Connection to %s:%d lost", self._host, self._port)
|
||||
time.sleep(RECONNECT_INTERVAL.seconds)
|
||||
|
||||
@property
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for AquaLogic sensors.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.aqualogic/
|
||||
"""
|
||||
"""Support for AquaLogic sensors."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -46,8 +41,8 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
|||
})
|
||||
|
||||
|
||||
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 sensor platform."""
|
||||
sensors = []
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for AquaLogic switches.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/switch.aqualogic/
|
||||
"""
|
||||
"""Support for AquaLogic switches."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -37,8 +32,8 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
|||
})
|
||||
|
||||
|
||||
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 switch platform."""
|
||||
switches = []
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Arduino boards running with the Firmata firmware.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/arduino/
|
||||
"""
|
||||
"""Support for Arduino boards running with the Firmata firmware."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
"""
|
||||
Support for getting information from Arduino pins.
|
||||
|
||||
Only analog pins are supported.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.arduino/
|
||||
"""
|
||||
"""Support for getting information from Arduino pins."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
"""
|
||||
Support for switching Arduino pins on and off.
|
||||
|
||||
So far only digital pins are supported.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/switch.arduino/
|
||||
"""
|
||||
"""Support for switching Arduino pins on and off."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
This component provides support for Netgear Arlo IP cameras.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/arlo/
|
||||
"""
|
||||
"""Support for Netgear Arlo IP cameras."""
|
||||
import logging
|
||||
from datetime import timedelta
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Arlo Alarm Control Panels.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/alarm_control_panel.arlo/
|
||||
"""
|
||||
"""Support for Arlo Alarm Control Panels."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Netgear Arlo IP cameras.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/camera.arlo/
|
||||
"""
|
||||
"""Support for Netgear Arlo IP cameras."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
This component provides HA sensor for Netgear Arlo IP cameras.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.arlo/
|
||||
"""
|
||||
"""Sensor support for Netgear Arlo IP cameras."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Asterisk Voicemail interface.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/asterisk_mbox/
|
||||
"""
|
||||
"""Support for Asterisk Voicemail interface."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -78,9 +73,8 @@ class AsteriskData:
|
|||
@callback
|
||||
def handle_data(self, command, msg):
|
||||
"""Handle changes to the mailbox."""
|
||||
from asterisk_mbox.commands import (CMD_MESSAGE_LIST,
|
||||
CMD_MESSAGE_CDR_AVAILABLE,
|
||||
CMD_MESSAGE_CDR)
|
||||
from asterisk_mbox.commands import (
|
||||
CMD_MESSAGE_LIST, CMD_MESSAGE_CDR_AVAILABLE, CMD_MESSAGE_CDR)
|
||||
|
||||
if command == CMD_MESSAGE_LIST:
|
||||
_LOGGER.debug("AsteriskVM sent updated message list: Len %d",
|
||||
|
@ -89,8 +83,8 @@ class AsteriskData:
|
|||
self.messages = sorted(
|
||||
msg, key=lambda item: item['info']['origtime'], reverse=True)
|
||||
if not isinstance(old_messages, list):
|
||||
async_dispatcher_send(self.hass, SIGNAL_DISCOVER_PLATFORM,
|
||||
DOMAIN)
|
||||
async_dispatcher_send(
|
||||
self.hass, SIGNAL_DISCOVER_PLATFORM, DOMAIN)
|
||||
async_dispatcher_send(self.hass, SIGNAL_MESSAGE_UPDATE,
|
||||
self.messages)
|
||||
elif command == CMD_MESSAGE_CDR:
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Asterisk Voicemail interface.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/mailbox.asteriskvm/
|
||||
"""
|
||||
"""Support for the Asterisk Voicemail interface."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.asterisk_mbox import DOMAIN as ASTERISK_DOMAIN
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for ASUSWRT devices.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/asuswrt/
|
||||
"""
|
||||
"""Support for ASUSWRT devices."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -18,15 +13,16 @@ REQUIREMENTS = ['aioasuswrt==1.1.20']
|
|||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_PUB_KEY = 'pub_key'
|
||||
CONF_REQUIRE_IP = 'require_ip'
|
||||
CONF_SENSORS = 'sensors'
|
||||
CONF_SSH_KEY = 'ssh_key'
|
||||
|
||||
DOMAIN = "asuswrt"
|
||||
DATA_ASUSWRT = DOMAIN
|
||||
|
||||
CONF_PUB_KEY = 'pub_key'
|
||||
CONF_SSH_KEY = 'ssh_key'
|
||||
CONF_REQUIRE_IP = 'require_ip'
|
||||
DEFAULT_SSH_PORT = 22
|
||||
|
||||
SECRET_GROUP = 'Password or SSH Key'
|
||||
CONF_SENSORS = 'sensors'
|
||||
SENSOR_TYPES = ['upload_speed', 'download_speed', 'download', 'upload']
|
||||
|
||||
CONFIG_SCHEMA = vol.Schema({
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for August devices.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/august/
|
||||
"""
|
||||
"""Support for August devices."""
|
||||
import logging
|
||||
from datetime import timedelta
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for August binary sensors.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.august/
|
||||
"""
|
||||
"""Support for August binary sensors."""
|
||||
import logging
|
||||
from datetime import timedelta, datetime
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for August camera.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/camera.august/
|
||||
"""
|
||||
"""Support for August camera."""
|
||||
from datetime import timedelta
|
||||
|
||||
import requests
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for August lock.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/lock.august/
|
||||
"""
|
||||
"""Support for August lock."""
|
||||
import logging
|
||||
from datetime import timedelta
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Allow to set up simple automation rules via the config file.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/automation/
|
||||
"""
|
||||
"""Allow to set up simple automation rules via the config file."""
|
||||
import asyncio
|
||||
from functools import partial
|
||||
import importlib
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Offer event listening automation rules.
|
||||
|
||||
For more details about this automation rule, please refer to the documentation
|
||||
at https://home-assistant.io/docs/automation/trigger/#event-trigger
|
||||
"""
|
||||
"""Offer event listening automation rules."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
"""
|
||||
Offer geolocation automation rules.
|
||||
|
||||
For more details about this automation trigger, please refer to the
|
||||
documentation at
|
||||
https://home-assistant.io/docs/automation/trigger/#geolocation-trigger
|
||||
"""
|
||||
"""Offer geolocation automation rules."""
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.geo_location import DOMAIN
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Offer Home Assistant core automation rules.
|
||||
|
||||
For more details about this automation rule, please refer to the documentation
|
||||
at https://home-assistant.io/components/automation/#homeassistant-trigger
|
||||
"""
|
||||
"""Offer Home Assistant core automation rules."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Trigger an automation when a LiteJet switch is released.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/automation.litejet/
|
||||
"""
|
||||
"""Trigger an automation when a LiteJet switch is released."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Offer MQTT listening automation rules.
|
||||
|
||||
For more details about this automation rule, please refer to the documentation
|
||||
at https://home-assistant.io/docs/automation/trigger/#mqtt-trigger
|
||||
"""
|
||||
"""Offer MQTT listening automation rules."""
|
||||
import json
|
||||
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Offer numeric state listening automation rules.
|
||||
|
||||
For more details about this automation rule, please refer to the documentation
|
||||
at https://home-assistant.io/docs/automation/trigger/#numeric-state-trigger
|
||||
"""
|
||||
"""Offer numeric state listening automation rules."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Offer state listening automation rules.
|
||||
|
||||
For more details about this automation rule, please refer to the documentation
|
||||
at https://home-assistant.io/docs/automation/trigger/#state-trigger
|
||||
"""
|
||||
"""Offer state listening automation rules."""
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.core import callback
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Offer sun based automation rules.
|
||||
|
||||
For more details about this automation rule, please refer to the documentation
|
||||
at https://home-assistant.io/docs/automation/trigger/#sun-trigger
|
||||
"""
|
||||
"""Offer sun based automation rules."""
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Offer template automation rules.
|
||||
|
||||
For more details about this automation rule, please refer to the documentation
|
||||
at https://home-assistant.io/docs/automation/trigger/#template-trigger
|
||||
"""
|
||||
"""Offer template automation rules."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -13,7 +8,6 @@ from homeassistant.const import CONF_VALUE_TEMPLATE, CONF_PLATFORM
|
|||
from homeassistant.helpers.event import async_track_template
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
TRIGGER_SCHEMA = IF_ACTION_SCHEMA = vol.Schema({
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Offer time listening automation rules.
|
||||
|
||||
For more details about this automation rule, please refer to the documentation
|
||||
at https://home-assistant.io/docs/automation/trigger/#time-trigger
|
||||
"""
|
||||
"""Offer time listening automation rules."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Offer time listening automation rules.
|
||||
|
||||
For more details about this automation rule, please refer to the documentation
|
||||
at https://home-assistant.io/docs/automation/trigger/#time-trigger
|
||||
"""
|
||||
"""Offer time listening automation rules."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Offer webhook triggered automation rules.
|
||||
|
||||
For more details about this automation rule, please refer to the documentation
|
||||
at https://home-assistant.io/docs/automation/trigger/#webhook-trigger
|
||||
"""
|
||||
"""Offer webhook triggered automation rules."""
|
||||
from functools import partial
|
||||
import logging
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Offer zone automation rules.
|
||||
|
||||
For more details about this automation rule, please refer to the documentation
|
||||
at https://home-assistant.io/docs/automation/trigger/#zone-trigger
|
||||
"""
|
||||
"""Offer zone automation rules."""
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.core import callback
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Axis devices.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/axis/
|
||||
"""
|
||||
"""Support for Axis devices."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Axis binary sensors.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/binary_sensor.axis/
|
||||
"""
|
||||
"""Support for Axis binary sensors."""
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Axis camera streaming.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/camera.axis/
|
||||
"""
|
||||
"""Support for Axis camera streaming."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.camera.mjpeg import (
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for controlling GPIO pins of a Beaglebone Black.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/bbb_gpio/
|
||||
"""
|
||||
"""Support for controlling GPIO pins of a Beaglebone Black."""
|
||||
import logging
|
||||
|
||||
from homeassistant.const import (
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for binary sensor using Beaglebone Black GPIO.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/binary_sensor.bbb_gpio/
|
||||
"""
|
||||
"""Support for binary sensor using Beaglebone Black GPIO."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Allows to configure a switch using BeagleBone Black GPIO.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/switch.bbb_gpio/
|
||||
"""
|
||||
"""Allows to configure a switch using BeagleBone Black GPIO."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -29,8 +24,7 @@ PIN_SCHEMA = vol.Schema({
|
|||
})
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||
vol.Required(CONF_PINS, default={}):
|
||||
vol.Schema({cv.string: PIN_SCHEMA}),
|
||||
vol.Required(CONF_PINS, default={}): vol.Schema({cv.string: PIN_SCHEMA}),
|
||||
})
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Blink Home Camera System.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/blink/
|
||||
"""
|
||||
"""Support for Blink Home Camera System."""
|
||||
import logging
|
||||
from datetime import timedelta
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Blink Alarm Control Panel.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/alarm_control_panel.blink/
|
||||
"""
|
||||
"""Support for Blink Alarm Control Panel."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.alarm_control_panel import AlarmControlPanel
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Blink system camera control.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/binary_sensor.blink.
|
||||
"""
|
||||
"""Support for Blink system camera control."""
|
||||
from homeassistant.components.blink import BLINK_DATA, BINARY_SENSORS
|
||||
from homeassistant.components.binary_sensor import BinarySensorDevice
|
||||
from homeassistant.const import CONF_MONITORED_CONDITIONS
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Blink system camera.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/camera.blink/
|
||||
"""
|
||||
"""Support for Blink system camera."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.blink import BLINK_DATA, DEFAULT_BRAND
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Blink system camera sensors.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.blink/
|
||||
"""
|
||||
"""Support for Blink system camera sensors."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.blink import BLINK_DATA, SENSORS
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for BloomSky weather station.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/bloomsky/
|
||||
"""
|
||||
"""Support for BloomSky weather station."""
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support the binary sensors of a BloomSky weather station.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/binary_sensor.bloomsky/
|
||||
"""
|
||||
"""Support the binary sensors of a BloomSky weather station."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for a camera of a BloomSky weather station.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/camera.bloomsky/
|
||||
"""
|
||||
"""Support for a camera of a BloomSky weather station."""
|
||||
import logging
|
||||
|
||||
import requests
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support the sensor of a BloomSky weather station.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.bloomsky/
|
||||
"""
|
||||
"""Support the sensor of a BloomSky weather station."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Reads vehicle status from BMW connected drive portal.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/bmw_connected_drive/
|
||||
"""
|
||||
"""Reads vehicle status from BMW connected drive portal."""
|
||||
import datetime
|
||||
import logging
|
||||
|
||||
|
@ -87,8 +82,8 @@ def setup_account(account_config: dict, hass, name: str) \
|
|||
read_only = account_config[CONF_READ_ONLY]
|
||||
|
||||
_LOGGER.debug('Adding new account %s', name)
|
||||
cd_account = BMWConnectedDriveAccount(username, password, region, name,
|
||||
read_only)
|
||||
cd_account = BMWConnectedDriveAccount(
|
||||
username, password, region, name, read_only)
|
||||
|
||||
def execute_service(call):
|
||||
"""Execute a service for a vehicle.
|
||||
|
@ -99,7 +94,7 @@ def setup_account(account_config: dict, hass, name: str) \
|
|||
vin = call.data[ATTR_VIN]
|
||||
vehicle = cd_account.account.get_vehicle(vin)
|
||||
if not vehicle:
|
||||
_LOGGER.error('Could not find a vehicle for VIN "%s"!', vin)
|
||||
_LOGGER.error("Could not find a vehicle for VIN %s", vin)
|
||||
return
|
||||
function_name = _SERVICE_MAP[call.service]
|
||||
function_call = getattr(vehicle.remote_services, function_name)
|
||||
|
@ -108,9 +103,7 @@ def setup_account(account_config: dict, hass, name: str) \
|
|||
# register the remote services
|
||||
for service in _SERVICE_MAP:
|
||||
hass.services.register(
|
||||
DOMAIN, service,
|
||||
execute_service,
|
||||
schema=SERVICE_SCHEMA)
|
||||
DOMAIN, service, execute_service, schema=SERVICE_SCHEMA)
|
||||
|
||||
# update every UPDATE_INTERVAL minutes, starting now
|
||||
# this should even out the load on the servers
|
||||
|
@ -144,15 +137,15 @@ class BMWConnectedDriveAccount:
|
|||
|
||||
Notify all listeners about the update.
|
||||
"""
|
||||
_LOGGER.debug('Updating vehicle state for account %s, '
|
||||
'notifying %d listeners',
|
||||
_LOGGER.debug(
|
||||
"Updating vehicle state for account %s, notifying %d listeners",
|
||||
self.name, len(self._update_listeners))
|
||||
try:
|
||||
self.account.update_vehicle_states()
|
||||
for listener in self._update_listeners:
|
||||
listener()
|
||||
except IOError as exception:
|
||||
_LOGGER.error('Error updating the vehicle state.')
|
||||
_LOGGER.error("Error updating the vehicle state")
|
||||
_LOGGER.exception(exception)
|
||||
|
||||
def add_update_listener(self, listener):
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Reads vehicle status from BMW connected drive portal.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/binary_sensor.bmw_connected_drive/
|
||||
"""
|
||||
"""Reads vehicle status from BMW connected drive portal."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.binary_sensor import BinarySensorDevice
|
||||
|
@ -42,14 +37,14 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
if vehicle.has_hv_battery:
|
||||
_LOGGER.debug('BMW with a high voltage battery')
|
||||
for key, value in sorted(SENSOR_TYPES_ELEC.items()):
|
||||
device = BMWConnectedDriveSensor(account, vehicle, key,
|
||||
value[0], value[1])
|
||||
device = BMWConnectedDriveSensor(
|
||||
account, vehicle, key, value[0], value[1])
|
||||
devices.append(device)
|
||||
elif vehicle.has_internal_combustion_engine:
|
||||
_LOGGER.debug('BMW with an internal combustion engine')
|
||||
for key, value in sorted(SENSOR_TYPES.items()):
|
||||
device = BMWConnectedDriveSensor(account, vehicle, key,
|
||||
value[0], value[1])
|
||||
device = BMWConnectedDriveSensor(
|
||||
account, vehicle, key, value[0], value[1])
|
||||
devices.append(device)
|
||||
add_entities(devices, True)
|
||||
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
"""Device tracker for BMW Connected Drive vehicles.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/device_tracker.bmw_connected_drive/
|
||||
"""
|
||||
"""Device tracker for BMW Connected Drive vehicles."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.bmw_connected_drive import DOMAIN \
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for BMW cars with BMW ConnectedDrive.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/lock.bmw_connected_drive/
|
||||
"""
|
||||
"""Support for BMW car locks with BMW ConnectedDrive."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.bmw_connected_drive import DOMAIN as BMW_DOMAIN
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Reads vehicle status from BMW connected drive portal.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.bmw_connected_drive/
|
||||
"""
|
||||
"""Support for reading vehicle status from BMW connected drive portal."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.bmw_connected_drive import DOMAIN as BMW_DOMAIN
|
||||
|
@ -25,7 +20,7 @@ ATTR_TO_HA_METRIC = {
|
|||
'max_range_electric': ['mdi:ruler', LENGTH_KILOMETERS],
|
||||
'remaining_fuel': ['mdi:gas-station', VOLUME_LITERS],
|
||||
'charging_time_remaining': ['mdi:update', 'h'],
|
||||
'charging_status': ['mdi:battery-charging', None]
|
||||
'charging_status': ['mdi:battery-charging', None],
|
||||
}
|
||||
|
||||
ATTR_TO_HA_IMPERIAL = {
|
||||
|
@ -36,7 +31,7 @@ ATTR_TO_HA_IMPERIAL = {
|
|||
'max_range_electric': ['mdi:ruler', LENGTH_MILES],
|
||||
'remaining_fuel': ['mdi:gas-station', VOLUME_GALLONS],
|
||||
'charging_time_remaining': ['mdi:update', 'h'],
|
||||
'charging_status': ['mdi:battery-charging', None]
|
||||
'charging_status': ['mdi:battery-charging', None],
|
||||
}
|
||||
|
||||
|
||||
|
@ -54,12 +49,11 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
for account in accounts:
|
||||
for vehicle in account.account.vehicles:
|
||||
for attribute_name in vehicle.drive_train_attributes:
|
||||
device = BMWConnectedDriveSensor(account, vehicle,
|
||||
attribute_name,
|
||||
attribute_info)
|
||||
device = BMWConnectedDriveSensor(
|
||||
account, vehicle, attribute_name, attribute_info)
|
||||
devices.append(device)
|
||||
device = BMWConnectedDriveSensor(account, vehicle, 'mileage',
|
||||
attribute_info)
|
||||
device = BMWConnectedDriveSensor(
|
||||
account, vehicle, 'mileage', attribute_info)
|
||||
devices.append(device)
|
||||
add_entities(devices, True)
|
||||
|
||||
|
@ -140,13 +134,13 @@ class BMWConnectedDriveSensor(Entity):
|
|||
self._state = getattr(vehicle_state, self._attribute).value
|
||||
elif self.unit_of_measurement == VOLUME_GALLONS:
|
||||
value = getattr(vehicle_state, self._attribute)
|
||||
value_converted = self.hass.config.units.volume(value,
|
||||
VOLUME_LITERS)
|
||||
value_converted = self.hass.config.units.volume(
|
||||
value, VOLUME_LITERS)
|
||||
self._state = round(value_converted)
|
||||
elif self.unit_of_measurement == LENGTH_MILES:
|
||||
value = getattr(vehicle_state, self._attribute)
|
||||
value_converted = self.hass.config.units.length(value,
|
||||
LENGTH_KILOMETERS)
|
||||
value_converted = self.hass.config.units.length(
|
||||
value, LENGTH_KILOMETERS)
|
||||
self._state = round(value_converted)
|
||||
else:
|
||||
self._state = getattr(vehicle_state, self._attribute)
|
||||
|
|
|
@ -1,17 +1,13 @@
|
|||
"""
|
||||
Provides functionality to launch a web browser on the host machine.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/browser/
|
||||
"""
|
||||
"""Support for launching a web browser on the host machine."""
|
||||
import voluptuous as vol
|
||||
|
||||
DOMAIN = "browser"
|
||||
SERVICE_BROWSE_URL = "browse_url"
|
||||
|
||||
ATTR_URL = 'url'
|
||||
ATTR_URL_DEFAULT = 'https://www.google.com'
|
||||
|
||||
DOMAIN = 'browser'
|
||||
|
||||
SERVICE_BROWSE_URL = 'browse_url'
|
||||
|
||||
SERVICE_BROWSE_URL_SCHEMA = vol.Schema({
|
||||
# pylint: disable=no-value-for-parameter
|
||||
vol.Required(ATTR_URL, default=ATTR_URL_DEFAULT): vol.Url(),
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Google Calendar event device sensors.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/calendar/
|
||||
"""
|
||||
"""Support for Google Calendar event device sensors."""
|
||||
import logging
|
||||
from datetime import timedelta
|
||||
import re
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Support for Canary.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/canary/
|
||||
"""
|
||||
"""Support for Canary devices."""
|
||||
import logging
|
||||
from datetime import timedelta
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
from homeassistant import config_entries
|
||||
from homeassistant.helpers import config_entry_flow
|
||||
|
||||
REQUIREMENTS = ['pychromecast==2.5.0']
|
||||
|
||||
DOMAIN = 'cast'
|
||||
REQUIREMENTS = ['pychromecast==2.5.0']
|
||||
|
||||
|
||||
async def async_setup(hass, config):
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Provide functionality to interact with Cast devices on the network.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/media_player.cast/
|
||||
"""
|
||||
"""Provide functionality to interact with Cast devices on the network."""
|
||||
import asyncio
|
||||
import logging
|
||||
import threading
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
Component to integrate the Home Assistant cloud.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/cloud/
|
||||
"""
|
||||
"""Component to integrate the Home Assistant cloud."""
|
||||
from datetime import datetime, timedelta
|
||||
import json
|
||||
import logging
|
||||
|
|
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