mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 01:08:12 +00:00
parent
3a386e627e
commit
161c368c9d
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for Hydrawise cloud.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/hydrawise/
|
||||
"""
|
||||
"""Support for Hydrawise cloud."""
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for Hydrawise sprinkler.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/binary_sensor.hydrawise/
|
||||
"""
|
||||
"""Support for Hydrawise sprinkler binary sensors."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for Hydrawise sprinkler.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.hydrawise/
|
||||
"""
|
||||
"""Support for Hydrawise sprinkler sensors."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for Hydrawise cloud.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/switch.hydrawise/
|
||||
"""
|
||||
"""Support for Hydrawise cloud switches."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
@ -36,12 +31,10 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
|
||||
sensors = []
|
||||
for sensor_type in config.get(CONF_MONITORED_CONDITIONS):
|
||||
# create a switch for each zone
|
||||
# Create a switch for each zone
|
||||
for zone in hydrawise.relays:
|
||||
sensors.append(
|
||||
HydrawiseSwitch(default_watering_timer,
|
||||
zone,
|
||||
sensor_type))
|
||||
HydrawiseSwitch(default_watering_timer, zone, sensor_type))
|
||||
|
||||
add_entities(sensors, True)
|
||||
|
||||
|
@ -1,8 +1,4 @@
|
||||
"""Component for interfacing RFK101 proximity card readers.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/idteck_prox/
|
||||
"""
|
||||
"""Component for interfacing RFK101 proximity card readers."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support to trigger Maker IFTTT recipes.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/ifttt/
|
||||
"""
|
||||
"""Support to trigger Maker IFTTT recipes."""
|
||||
import json
|
||||
import logging
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Interfaces with alarm control panels that have to be controlled through IFTTT.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/alarm_control_panel.ifttt/
|
||||
"""
|
||||
"""Support for alarm control panels that can be controlled through IFTTT."""
|
||||
import logging
|
||||
import re
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
A component which allows you to send data to an Influx database.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/influxdb/
|
||||
"""
|
||||
"""Support for sending data to an Influx database."""
|
||||
import logging
|
||||
import re
|
||||
import queue
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Component to keep track of user controlled booleans for within automation.
|
||||
|
||||
For more details about this component, please refer to the documentation
|
||||
at https://home-assistant.io/components/input_boolean/
|
||||
"""
|
||||
"""Support to keep track of user controlled booleans for within automation."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Component to offer a way to select a date and / or a time.
|
||||
|
||||
For more details about this component, please refer to the documentation
|
||||
at https://home-assistant.io/components/input_datetime/
|
||||
"""
|
||||
"""Support to select a date and/or a time."""
|
||||
import logging
|
||||
import datetime
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Component to offer a way to set a numeric value from a slider or text box.
|
||||
|
||||
For more details about this component, please refer to the documentation
|
||||
at https://home-assistant.io/components/input_number/
|
||||
"""
|
||||
"""Support to set a numeric value from a slider or text box."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Component to offer a way to select an option from a list.
|
||||
|
||||
For more details about this component, please refer to the documentation
|
||||
at https://home-assistant.io/components/input_select/
|
||||
"""
|
||||
"""Support to select an option from a list."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Component to offer a way to enter a value into a text box.
|
||||
|
||||
For more details about this component, please refer to the documentation
|
||||
at https://home-assistant.io/components/input_text/
|
||||
"""
|
||||
"""Support to enter a value into a text box."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Local support for Insteon.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/insteon_local/
|
||||
"""
|
||||
"""Local support for Insteon."""
|
||||
import logging
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for INSTEON PowerLinc Modem.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/insteon_plm/
|
||||
"""
|
||||
"""Support for INSTEON PowerLinc Modem."""
|
||||
import logging
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Component that will help guide the user taking its first steps.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/introduction/
|
||||
"""
|
||||
"""Component that will help guide the user taking its first steps."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for IOTA wallets.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/iota/
|
||||
"""
|
||||
"""Support for IOTA wallets."""
|
||||
import logging
|
||||
from datetime import timedelta
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for IOTA wallets.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/iota
|
||||
"""
|
||||
"""Support for IOTA wallet sensors."""
|
||||
import logging
|
||||
from datetime import timedelta
|
||||
|
||||
@ -26,12 +21,10 @@ SCAN_INTERVAL = timedelta(minutes=3)
|
||||
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""Set up the IOTA sensor."""
|
||||
# Add sensors for wallet balance
|
||||
iota_config = discovery_info
|
||||
sensors = [IotaBalanceSensor(wallet, iota_config)
|
||||
for wallet in iota_config[CONF_WALLETS]]
|
||||
|
||||
# Add sensor for node information
|
||||
sensors.append(IotaNodeSensor(iota_config=iota_config))
|
||||
|
||||
add_entities(sensors)
|
||||
|
@ -1,5 +1 @@
|
||||
"""The itach component.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/itach/
|
||||
"""
|
||||
"""Support for itach devices."""
|
||||
|
@ -1,10 +1,4 @@
|
||||
"""
|
||||
Support for iTach IR Devices.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/remote.itach/
|
||||
"""
|
||||
|
||||
"""Support for iTach IR devices."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
@ -38,7 +32,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||
vol.Required(CONF_CONNADDR): vol.Coerce(int),
|
||||
vol.Required(CONF_COMMANDS): vol.All(cv.ensure_list, [{
|
||||
vol.Required(CONF_NAME): cv.string,
|
||||
vol.Required(CONF_DATA): cv.string
|
||||
vol.Required(CONF_DATA): cv.string,
|
||||
}])
|
||||
}])
|
||||
})
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Component for Joaoapps Join services.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/join/
|
||||
"""
|
||||
"""Support for Joaoapps Join services."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
@ -16,6 +11,7 @@ REQUIREMENTS = ['python-join-api==0.0.2']
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DOMAIN = 'joaoapps_join'
|
||||
|
||||
CONF_DEVICE_ID = 'device_id'
|
||||
CONF_DEVICE_IDS = 'device_ids'
|
||||
CONF_DEVICE_NAMES = 'device_names'
|
||||
@ -26,7 +22,7 @@ CONFIG_SCHEMA = vol.Schema({
|
||||
vol.Optional(CONF_DEVICE_ID): cv.string,
|
||||
vol.Optional(CONF_DEVICE_IDS): cv.string,
|
||||
vol.Optional(CONF_DEVICE_NAMES): cv.string,
|
||||
vol.Optional(CONF_NAME): cv.string
|
||||
vol.Optional(CONF_NAME): cv.string,
|
||||
}])
|
||||
}, extra=vol.ALLOW_EXTRA)
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Join platform for notify component.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/notify.join/
|
||||
"""
|
||||
"""Support for Join notifications."""
|
||||
import logging
|
||||
import voluptuous as vol
|
||||
from homeassistant.components.notify import (
|
||||
|
@ -1,10 +1,4 @@
|
||||
"""
|
||||
Support for Juicenet cloud.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/juicenet
|
||||
"""
|
||||
|
||||
"""Support for Juicenet cloud."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
@ -22,7 +16,7 @@ DOMAIN = 'juicenet'
|
||||
|
||||
CONFIG_SCHEMA = vol.Schema({
|
||||
DOMAIN: vol.Schema({
|
||||
vol.Required(CONF_ACCESS_TOKEN): cv.string
|
||||
vol.Required(CONF_ACCESS_TOKEN): cv.string,
|
||||
})
|
||||
}, extra=vol.ALLOW_EXTRA)
|
||||
|
||||
|
@ -1,19 +1,14 @@
|
||||
"""
|
||||
Support for monitoring juicenet/juicepoint/juicebox based EVSE sensors.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
at https://home-assistant.io/components/sensor.juicenet/
|
||||
"""
|
||||
|
||||
"""Support for monitoring juicenet/juicepoint/juicebox based EVSE sensors."""
|
||||
import logging
|
||||
|
||||
from homeassistant.const import TEMP_CELSIUS
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.components.juicenet import JuicenetDevice, DOMAIN
|
||||
|
||||
DEPENDENCIES = ['juicenet']
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DEPENDENCIES = ['juicenet']
|
||||
|
||||
SENSOR_TYPES = {
|
||||
'status': ['Charging Status', None],
|
||||
'temperature': ['Temperature', TEMP_CELSIUS],
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Provides functionality to emulate keyboard presses on host machine.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/keyboard/
|
||||
"""
|
||||
"""Support to emulate keyboard presses on host machine."""
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.const import (
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Receive signals from a keyboard and use it as a remote control.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/keyboard_remote/
|
||||
"""
|
||||
"""Receive signals from a keyboard and use it as a remote control."""
|
||||
# pylint: disable=import-error
|
||||
import threading
|
||||
import logging
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
KIRA interface to receive UDP packets from an IR-IP bridge.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/kira/
|
||||
"""
|
||||
"""KIRA interface to receive UDP packets from an IR-IP bridge."""
|
||||
import logging
|
||||
import os
|
||||
|
||||
@ -13,7 +8,7 @@ import yaml
|
||||
|
||||
from homeassistant.const import (
|
||||
CONF_DEVICE, CONF_HOST, CONF_NAME, CONF_PORT, CONF_SENSORS, CONF_TYPE,
|
||||
EVENT_HOMEASSISTANT_STOP, STATE_UNKNOWN)
|
||||
EVENT_HOMEASSISTANT_STOP, STATE_UNKNOWN, CONF_CODE)
|
||||
from homeassistant.helpers import discovery
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
@ -26,7 +21,6 @@ _LOGGER = logging.getLogger(__name__)
|
||||
DEFAULT_HOST = "0.0.0.0"
|
||||
DEFAULT_PORT = 65432
|
||||
|
||||
CONF_CODE = "code"
|
||||
CONF_REPEAT = "repeat"
|
||||
CONF_REMOTES = "remotes"
|
||||
CONF_SENSOR = "sensor"
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for Keene Electronics IR-IP devices.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/remote.kira/
|
||||
"""
|
||||
"""Support for Keene Electronics IR-IP devices."""
|
||||
import functools as ft
|
||||
import logging
|
||||
|
||||
@ -15,7 +10,7 @@ DOMAIN = 'kira'
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_REMOTE = "remote"
|
||||
CONF_REMOTE = 'remote'
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
KIRA interface to receive UDP packets from an IR-IP bridge.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.kira/
|
||||
"""
|
||||
"""KIRA interface to receive UDP packets from an IR-IP bridge."""
|
||||
import logging
|
||||
|
||||
from homeassistant.const import CONF_DEVICE, CONF_NAME, STATE_UNKNOWN
|
||||
|
@ -1,10 +1,4 @@
|
||||
"""
|
||||
Connects to KNX platform.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/knx/
|
||||
"""
|
||||
|
||||
"""Support KNX devices."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
@ -19,6 +13,8 @@ from homeassistant.helpers.script import Script
|
||||
|
||||
REQUIREMENTS = ['xknx==0.9.4']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DOMAIN = "knx"
|
||||
DATA_KNX = "data_knx"
|
||||
CONF_KNX_CONFIG = "config_file"
|
||||
@ -39,8 +35,6 @@ SERVICE_KNX_ATTR_PAYLOAD = "payload"
|
||||
|
||||
ATTR_DISCOVER_DEVICES = 'devices'
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
TUNNELING_SCHEMA = vol.Schema({
|
||||
vol.Required(CONF_HOST): cv.string,
|
||||
vol.Required(CONF_KNX_LOCAL_IP): cv.string,
|
||||
|
@ -1,10 +1,4 @@
|
||||
"""
|
||||
Support for KNX/IP binary sensors.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/binary_sensor.knx/
|
||||
"""
|
||||
|
||||
"""Support for KNX/IP binary sensors."""
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
@ -35,7 +29,7 @@ DEPENDENCIES = ['knx']
|
||||
AUTOMATION_SCHEMA = vol.Schema({
|
||||
vol.Optional(CONF_HOOK, default=CONF_DEFAULT_HOOK): cv.string,
|
||||
vol.Optional(CONF_COUNTER, default=CONF_DEFAULT_COUNTER): cv.port,
|
||||
vol.Required(CONF_ACTION): cv.SCRIPT_SCHEMA
|
||||
vol.Required(CONF_ACTION): cv.SCRIPT_SCHEMA,
|
||||
})
|
||||
|
||||
AUTOMATIONS_SCHEMA = vol.All(
|
||||
|
@ -1,10 +1,4 @@
|
||||
"""
|
||||
Support for KNX/IP climate devices.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/climate.knx/
|
||||
"""
|
||||
|
||||
"""Support for KNX/IP climate devices."""
|
||||
import voluptuous as vol
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.components.climate import (
|
||||
|
@ -1,10 +1,4 @@
|
||||
"""
|
||||
Support for KNX/IP covers.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/cover.knx/
|
||||
"""
|
||||
|
||||
"""Support for KNX/IP covers."""
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.cover import (
|
||||
@ -49,8 +43,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 cover(s) for KNX platform."""
|
||||
if discovery_info is not None:
|
||||
async_add_entities_discovery(hass, discovery_info, async_add_entities)
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for KNX/IP lights.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/light.knx/
|
||||
"""
|
||||
"""Support for KNX/IP lights."""
|
||||
from enum import Enum
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -1,10 +1,4 @@
|
||||
"""
|
||||
KNX/IP notification service.
|
||||
|
||||
For more details about this platform, please refer to the documentation
|
||||
https://home-assistant.io/components/notify.knx/
|
||||
"""
|
||||
|
||||
"""Support for KNX/IP notification services."""
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.knx import DATA_KNX, ATTR_DISCOVER_DEVICES
|
||||
@ -16,6 +10,7 @@ import homeassistant.helpers.config_validation as cv
|
||||
|
||||
CONF_ADDRESS = 'address'
|
||||
DEFAULT_NAME = 'KNX Notify'
|
||||
|
||||
DEPENDENCIES = ['knx']
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for KNX scenes.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/scene.knx/
|
||||
"""
|
||||
"""Support for KNX scenes."""
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.knx import ATTR_DISCOVER_DEVICES, DATA_KNX
|
||||
@ -26,8 +21,8 @@ PLATFORM_SCHEMA = vol.Schema({
|
||||
})
|
||||
|
||||
|
||||
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 scenes for KNX platform."""
|
||||
if discovery_info is not None:
|
||||
async_add_entities_discovery(hass, discovery_info, async_add_entities)
|
||||
|
@ -1,10 +1,4 @@
|
||||
"""
|
||||
Support for KNX/IP sensors.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.knx/
|
||||
"""
|
||||
|
||||
"""Support for KNX/IP sensors."""
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.knx import ATTR_DISCOVER_DEVICES, DATA_KNX
|
||||
|
@ -1,10 +1,4 @@
|
||||
"""
|
||||
Support for KNX/IP switches.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/switch.knx/
|
||||
"""
|
||||
|
||||
"""Support for KNX/IP switches."""
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.knx import ATTR_DISCOVER_DEVICES, DATA_KNX
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for Konnected devices.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/konnected/
|
||||
"""
|
||||
"""Support for Konnected devices."""
|
||||
import asyncio
|
||||
import hmac
|
||||
import json
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for wired binary sensors attached to a Konnected device.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/binary_sensor.konnected/
|
||||
"""
|
||||
"""Support for wired binary sensors attached to a Konnected device."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.binary_sensor import BinarySensorDevice
|
||||
@ -20,8 +15,8 @@ _LOGGER = logging.getLogger(__name__)
|
||||
DEPENDENCIES = ['konnected']
|
||||
|
||||
|
||||
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 binary sensors attached to a Konnected device."""
|
||||
if discovery_info is None:
|
||||
return
|
||||
@ -38,7 +33,7 @@ class KonnectedBinarySensor(BinarySensorDevice):
|
||||
"""Representation of a Konnected binary sensor."""
|
||||
|
||||
def __init__(self, device_id, pin_num, data):
|
||||
"""Initialize the binary sensor."""
|
||||
"""Initialize the Konnected binary sensor."""
|
||||
self._data = data
|
||||
self._device_id = device_id
|
||||
self._pin_num = pin_num
|
||||
@ -46,7 +41,7 @@ class KonnectedBinarySensor(BinarySensorDevice):
|
||||
self._device_class = self._data.get(CONF_TYPE)
|
||||
self._name = self._data.get(CONF_NAME, 'Konnected {} Zone {}'.format(
|
||||
device_id, PIN_TO_ZONE[pin_num]))
|
||||
_LOGGER.debug('Created new Konnected sensor: %s', self._name)
|
||||
_LOGGER.debug("Created new Konnected sensor: %s", self._name)
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
|
@ -1,10 +1,4 @@
|
||||
"""
|
||||
Support for wired switches attached to a Konnected device.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/switch.konnected/
|
||||
"""
|
||||
|
||||
"""Support for wired switches attached to a Konnected device."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.konnected import (
|
||||
@ -19,8 +13,8 @@ _LOGGER = logging.getLogger(__name__)
|
||||
DEPENDENCIES = ['konnected']
|
||||
|
||||
|
||||
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 switches attached to a Konnected device."""
|
||||
if discovery_info is None:
|
||||
return
|
||||
@ -37,7 +31,7 @@ class KonnectedSwitch(ToggleEntity):
|
||||
"""Representation of a Konnected switch."""
|
||||
|
||||
def __init__(self, device_id, pin_num, data):
|
||||
"""Initialize the switch."""
|
||||
"""Initialize the Konnected switch."""
|
||||
self._data = data
|
||||
self._device_id = device_id
|
||||
self._pin_num = pin_num
|
||||
@ -49,7 +43,7 @@ class KonnectedSwitch(ToggleEntity):
|
||||
self._name = self._data.get(
|
||||
'name', 'Konnected {} Actuator {}'.format(
|
||||
device_id, PIN_TO_ZONE[pin_num]))
|
||||
_LOGGER.debug('Created new switch: %s', self._name)
|
||||
_LOGGER.debug("Created new switch: %s", self._name)
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
|
@ -1,12 +1,4 @@
|
||||
"""
|
||||
Support for LaMetric time.
|
||||
|
||||
This is the base platform to support LaMetric components:
|
||||
Notify, Light, Mediaplayer
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/lametric/
|
||||
"""
|
||||
"""Support for LaMetric time."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Notifier for LaMetric time.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/notify.lametric/
|
||||
"""
|
||||
"""Support for LaMetric notifications."""
|
||||
import logging
|
||||
|
||||
from requests.exceptions import ConnectionError as RequestsConnectionError
|
||||
@ -17,33 +12,32 @@ import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.components.lametric import DOMAIN as LAMETRIC_DOMAIN
|
||||
|
||||
REQUIREMENTS = ['lmnotify==0.0.4']
|
||||
DEPENDENCIES = ['lametric']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_LIFETIME = "lifetime"
|
||||
CONF_CYCLES = "cycles"
|
||||
CONF_PRIORITY = "priority"
|
||||
AVAILABLE_PRIORITIES = ['info', 'warning', 'critical']
|
||||
|
||||
AVAILABLE_PRIORITIES = ["info", "warning", "critical"]
|
||||
CONF_CYCLES = 'cycles'
|
||||
CONF_LIFETIME = 'lifetime'
|
||||
CONF_PRIORITY = 'priority'
|
||||
|
||||
DEPENDENCIES = ['lametric']
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||
vol.Optional(CONF_ICON, default="i555"): cv.string,
|
||||
vol.Optional(CONF_ICON, default='i555'): cv.string,
|
||||
vol.Optional(CONF_LIFETIME, default=10): cv.positive_int,
|
||||
vol.Optional(CONF_CYCLES, default=1): cv.positive_int,
|
||||
vol.Optional(CONF_PRIORITY, default="warning"):
|
||||
vol.In(AVAILABLE_PRIORITIES)
|
||||
vol.Optional(CONF_PRIORITY, default='warning'):
|
||||
vol.In(AVAILABLE_PRIORITIES),
|
||||
})
|
||||
|
||||
|
||||
def get_service(hass, config, discovery_info=None):
|
||||
"""Get the LaMetric notification service."""
|
||||
hlmn = hass.data.get(LAMETRIC_DOMAIN)
|
||||
return LaMetricNotificationService(hlmn,
|
||||
config[CONF_ICON],
|
||||
config[CONF_LIFETIME] * 1000,
|
||||
config[CONF_CYCLES],
|
||||
config[CONF_PRIORITY])
|
||||
return LaMetricNotificationService(
|
||||
hlmn, config[CONF_ICON], config[CONF_LIFETIME] * 1000,
|
||||
config[CONF_CYCLES], config[CONF_PRIORITY])
|
||||
|
||||
|
||||
class LaMetricNotificationService(BaseNotificationService):
|
||||
|
@ -1,10 +1,4 @@
|
||||
"""
|
||||
Connects to LCN platform.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/lcn/
|
||||
"""
|
||||
|
||||
"""Support for LCN devices."""
|
||||
import logging
|
||||
import re
|
||||
|
||||
|
@ -1,10 +1,4 @@
|
||||
"""
|
||||
Support for LCN lights.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/light.lcn/
|
||||
"""
|
||||
|
||||
"""Support for LCN lights."""
|
||||
from homeassistant.components.lcn import (
|
||||
CONF_CONNECTIONS, CONF_DIMMABLE, CONF_OUTPUT, CONF_TRANSITION, DATA_LCN,
|
||||
OUTPUT_PORTS, LcnDevice, get_connection)
|
||||
@ -16,8 +10,8 @@ from homeassistant.const import CONF_ADDRESS
|
||||
DEPENDENCIES = ['lcn']
|
||||
|
||||
|
||||
async def async_setup_platform(hass, hass_config, async_add_entities,
|
||||
discovery_info=None):
|
||||
async def async_setup_platform(
|
||||
hass, hass_config, async_add_entities, discovery_info=None):
|
||||
"""Set up the LCN light platform."""
|
||||
if discovery_info is None:
|
||||
return
|
||||
|
@ -1,10 +1,4 @@
|
||||
"""
|
||||
Support for LCN switches.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/switch.lcn/
|
||||
"""
|
||||
|
||||
"""Support for LCN switches."""
|
||||
from homeassistant.components.lcn import (
|
||||
CONF_CONNECTIONS, CONF_OUTPUT, DATA_LCN, OUTPUT_PORTS, LcnDevice,
|
||||
get_connection)
|
||||
|
@ -1,4 +1,4 @@
|
||||
"""Component to embed LIFX."""
|
||||
"""Support for LIFX."""
|
||||
import voluptuous as vol
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
@ -7,7 +7,6 @@ from homeassistant.const import CONF_PORT
|
||||
from homeassistant.helpers import config_entry_flow
|
||||
from homeassistant.components.light import DOMAIN as LIGHT_DOMAIN
|
||||
|
||||
|
||||
DOMAIN = 'lifx'
|
||||
REQUIREMENTS = ['aiolifx==0.6.7']
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for the LIFX platform that implements lights.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/light.lifx/
|
||||
"""
|
||||
"""Support for LIFX lights."""
|
||||
import asyncio
|
||||
from datetime import timedelta
|
||||
from functools import partial
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for device connected via Lightwave WiFi-link hub.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/lightwave/
|
||||
"""
|
||||
"""Support for device connected via Lightwave WiFi-link hub."""
|
||||
import voluptuous as vol
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.const import (CONF_HOST, CONF_LIGHTS, CONF_NAME,
|
||||
@ -11,7 +6,9 @@ from homeassistant.const import (CONF_HOST, CONF_LIGHTS, CONF_NAME,
|
||||
from homeassistant.helpers.discovery import async_load_platform
|
||||
|
||||
REQUIREMENTS = ['lightwave==0.15']
|
||||
|
||||
LIGHTWAVE_LINK = 'lightwave_link'
|
||||
|
||||
DOMAIN = 'lightwave'
|
||||
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Implements LightwaveRF lights.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/light.lightwave/
|
||||
"""
|
||||
"""Support for LightwaveRF lights."""
|
||||
from homeassistant.components.light import (
|
||||
ATTR_BRIGHTNESS, SUPPORT_BRIGHTNESS, Light)
|
||||
from homeassistant.components.lightwave import LIGHTWAVE_LINK
|
||||
@ -14,8 +9,8 @@ DEPENDENCIES = ['lightwave']
|
||||
MAX_BRIGHTNESS = 255
|
||||
|
||||
|
||||
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):
|
||||
"""Find and return LightWave lights."""
|
||||
if not discovery_info:
|
||||
return
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Implements LightwaveRF switches.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/switch.lightwave/
|
||||
"""
|
||||
"""Support for LightwaveRF switches."""
|
||||
from homeassistant.components.lightwave import LIGHTWAVE_LINK
|
||||
from homeassistant.components.switch import SwitchDevice
|
||||
from homeassistant.const import CONF_NAME
|
||||
@ -11,8 +6,8 @@ from homeassistant.const import CONF_NAME
|
||||
DEPENDENCIES = ['lightwave']
|
||||
|
||||
|
||||
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):
|
||||
"""Find and return LightWave switches."""
|
||||
if not discovery_info:
|
||||
return
|
||||
|
@ -1,17 +1,12 @@
|
||||
"""
|
||||
Support for Linode.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/linode/
|
||||
"""
|
||||
import logging
|
||||
"""Support for Linode."""
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.const import CONF_ACCESS_TOKEN
|
||||
from homeassistant.util import Throttle
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.util import Throttle
|
||||
|
||||
REQUIREMENTS = ['linode-api==4.1.9b1']
|
||||
|
||||
|
@ -1,20 +1,15 @@
|
||||
"""
|
||||
Support for monitoring the state of Linode Nodes.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/binary_sensor.linode/
|
||||
"""
|
||||
"""Support for monitoring the state of Linode Nodes."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.components.binary_sensor import (
|
||||
BinarySensorDevice, PLATFORM_SCHEMA)
|
||||
PLATFORM_SCHEMA, BinarySensorDevice)
|
||||
from homeassistant.components.linode import (
|
||||
CONF_NODES, ATTR_CREATED, ATTR_NODE_ID, ATTR_NODE_NAME,
|
||||
ATTR_IPV4_ADDRESS, ATTR_IPV6_ADDRESS, ATTR_MEMORY,
|
||||
ATTR_REGION, ATTR_VCPUS, DATA_LINODE)
|
||||
ATTR_CREATED, ATTR_IPV4_ADDRESS, ATTR_IPV6_ADDRESS, ATTR_MEMORY,
|
||||
ATTR_NODE_ID, ATTR_NODE_NAME, ATTR_REGION, ATTR_VCPUS, CONF_NODES,
|
||||
DATA_LINODE)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -1,19 +1,14 @@
|
||||
"""
|
||||
Support for interacting with Linode nodes.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/switch.linode/
|
||||
"""
|
||||
"""Support for interacting with Linode nodes."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.components.switch import (SwitchDevice, PLATFORM_SCHEMA)
|
||||
from homeassistant.components.linode import (
|
||||
CONF_NODES, ATTR_CREATED, ATTR_NODE_ID, ATTR_NODE_NAME,
|
||||
ATTR_IPV4_ADDRESS, ATTR_IPV6_ADDRESS, ATTR_MEMORY,
|
||||
ATTR_REGION, ATTR_VCPUS, DATA_LINODE)
|
||||
ATTR_CREATED, ATTR_IPV4_ADDRESS, ATTR_IPV6_ADDRESS, ATTR_MEMORY,
|
||||
ATTR_NODE_ID, ATTR_NODE_NAME, ATTR_REGION, ATTR_VCPUS, CONF_NODES,
|
||||
DATA_LINODE)
|
||||
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchDevice
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
LIRC interface to receive signals from an infrared remote control.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/lirc/
|
||||
"""
|
||||
"""Support for LIRC devices."""
|
||||
# pylint: disable=no-member, import-error
|
||||
import threading
|
||||
import time
|
||||
|
@ -1,8 +1,4 @@
|
||||
"""Allows the LiteJet lighting system to be controlled by Home Assistant.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/litejet/
|
||||
"""
|
||||
"""Support for the LiteJet lighting system."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
@ -24,7 +20,7 @@ CONFIG_SCHEMA = vol.Schema({
|
||||
DOMAIN: vol.Schema({
|
||||
vol.Required(CONF_PORT): cv.string,
|
||||
vol.Optional(CONF_EXCLUDE_NAMES): vol.All(cv.ensure_list, [cv.string]),
|
||||
vol.Optional(CONF_INCLUDE_SWITCHES, default=False): cv.boolean
|
||||
vol.Optional(CONF_INCLUDE_SWITCHES, default=False): cv.boolean,
|
||||
})
|
||||
}, extra=vol.ALLOW_EXTRA)
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for Locative.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/locative/
|
||||
"""
|
||||
"""Support for Locative."""
|
||||
import logging
|
||||
from typing import Dict
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Event parser and human readable log generator.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/logbook/
|
||||
"""
|
||||
"""Event parser and human readable log generator."""
|
||||
from datetime import timedelta
|
||||
from itertools import groupby
|
||||
import logging
|
||||
@ -47,12 +42,12 @@ CONFIG_SCHEMA = vol.Schema({
|
||||
CONF_EXCLUDE: vol.Schema({
|
||||
vol.Optional(CONF_ENTITIES, default=[]): cv.entity_ids,
|
||||
vol.Optional(CONF_DOMAINS, default=[]):
|
||||
vol.All(cv.ensure_list, [cv.string])
|
||||
vol.All(cv.ensure_list, [cv.string]),
|
||||
}),
|
||||
CONF_INCLUDE: vol.Schema({
|
||||
vol.Optional(CONF_ENTITIES, default=[]): cv.entity_ids,
|
||||
vol.Optional(CONF_DOMAINS, default=[]):
|
||||
vol.All(cv.ensure_list, [cv.string])
|
||||
vol.All(cv.ensure_list, [cv.string]),
|
||||
})
|
||||
}),
|
||||
}, extra=vol.ALLOW_EXTRA)
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for sending data to Logentries webhook endpoint.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/logentries/
|
||||
"""
|
||||
"""Support for sending data to Logentries webhook endpoint."""
|
||||
import json
|
||||
import logging
|
||||
import requests
|
||||
@ -42,19 +37,17 @@ def setup(hass, config):
|
||||
_state = state_helper.state_as_number(state)
|
||||
except ValueError:
|
||||
_state = state.state
|
||||
json_body = [
|
||||
{
|
||||
'domain': state.domain,
|
||||
'entity_id': state.object_id,
|
||||
'attributes': dict(state.attributes),
|
||||
'time': str(event.time_fired),
|
||||
'value': _state,
|
||||
}
|
||||
]
|
||||
json_body = [{
|
||||
'domain': state.domain,
|
||||
'entity_id': state.object_id,
|
||||
'attributes': dict(state.attributes),
|
||||
'time': str(event.time_fired),
|
||||
'value': _state,
|
||||
}]
|
||||
try:
|
||||
payload = {
|
||||
"host": le_wh,
|
||||
"event": json_body
|
||||
'host': le_wh,
|
||||
'event': json_body
|
||||
}
|
||||
requests.post(le_wh, data=json.dumps(payload), timeout=10)
|
||||
except requests.exceptions.RequestException as error:
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Component that will help set the level of logging for components.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/logger/
|
||||
"""
|
||||
"""Support for settting the level of logging for components."""
|
||||
import logging
|
||||
from collections import OrderedDict
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for Logi Circle cameras.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/logi_circle/
|
||||
"""
|
||||
"""Support for Logi Circle devices."""
|
||||
import logging
|
||||
import asyncio
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
This component provides support to the Logi Circle camera.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/camera.logi_circle/
|
||||
"""
|
||||
"""Support to the Logi Circle cameras."""
|
||||
import logging
|
||||
import asyncio
|
||||
from datetime import timedelta
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
This component provides HA sensor support for Logi Circle cameras.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.logi_circle/
|
||||
"""
|
||||
"""Support for Logi Circle sensors."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
@ -26,26 +21,13 @@ _LOGGER = logging.getLogger(__name__)
|
||||
|
||||
# Sensor types: Name, unit of measure, icon per sensor key.
|
||||
SENSOR_TYPES = {
|
||||
'battery_level': [
|
||||
'Battery', '%', 'battery-50'],
|
||||
|
||||
'last_activity_time': [
|
||||
'Last Activity', None, 'history'],
|
||||
|
||||
'privacy_mode': [
|
||||
'Privacy Mode', None, 'eye'],
|
||||
|
||||
'signal_strength_category': [
|
||||
'WiFi Signal Category', None, 'wifi'],
|
||||
|
||||
'signal_strength_percentage': [
|
||||
'WiFi Signal Strength', '%', 'wifi'],
|
||||
|
||||
'speaker_volume': [
|
||||
'Volume', '%', 'volume-high'],
|
||||
|
||||
'streaming_mode': [
|
||||
'Streaming Mode', None, 'camera'],
|
||||
'battery_level': ['Battery', '%', 'battery-50'],
|
||||
'last_activity_time': ['Last Activity', None, 'history'],
|
||||
'privacy_mode': ['Privacy Mode', None, 'eye'],
|
||||
'signal_strength_category': ['WiFi Signal Category', None, 'wifi'],
|
||||
'signal_strength_percentage': ['WiFi Signal Strength', '%', 'wifi'],
|
||||
'speaker_volume': ['Volume', '%', 'volume-high'],
|
||||
'streaming_mode': ['Streaming Mode', None, 'camera'],
|
||||
}
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for the Lovelace UI.
|
||||
|
||||
For more details about this component, please refer to the documentation
|
||||
at https://www.home-assistant.io/lovelace/
|
||||
"""
|
||||
"""Support for the Lovelace UI."""
|
||||
from functools import wraps
|
||||
import logging
|
||||
import os
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for Luftdaten stations.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/luftdaten/
|
||||
"""
|
||||
"""Support for Luftdaten stations."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for Luftdaten sensors.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.luftdaten/
|
||||
"""
|
||||
"""Support for Luftdaten sensors."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.luftdaten import (
|
||||
|
@ -1,10 +1,4 @@
|
||||
"""
|
||||
This component provides basic support for Lupusec Home Security system.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/lupusec
|
||||
"""
|
||||
|
||||
"""Support for Lupusec Home Security system."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
@ -14,6 +8,7 @@ from homeassistant.helpers import discovery
|
||||
from homeassistant.const import (CONF_USERNAME, CONF_PASSWORD,
|
||||
CONF_NAME, CONF_IP_ADDRESS)
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
REQUIREMENTS = ['lupupy==0.0.17']
|
||||
@ -28,7 +23,7 @@ CONFIG_SCHEMA = vol.Schema({
|
||||
vol.Required(CONF_USERNAME): cv.string,
|
||||
vol.Required(CONF_PASSWORD): cv.string,
|
||||
vol.Required(CONF_IP_ADDRESS): cv.string,
|
||||
vol.Optional(CONF_NAME): cv.string
|
||||
vol.Optional(CONF_NAME): cv.string,
|
||||
}),
|
||||
}, extra=vol.ALLOW_EXTRA)
|
||||
|
||||
|
@ -1,10 +1,4 @@
|
||||
"""
|
||||
This component provides HA alarm_control_panel support for Lupusec System.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/alarm_control_panel.lupusec/
|
||||
"""
|
||||
|
||||
"""Support for Lupusec System alarm control panels."""
|
||||
from datetime import timedelta
|
||||
|
||||
from homeassistant.components.alarm_control_panel import AlarmControlPanel
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
This component provides HA binary_sensor support for Lupusec Security System.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/binary_sensor.lupusec/
|
||||
"""
|
||||
"""Support for Lupusec Security System binary sensors."""
|
||||
import logging
|
||||
from datetime import timedelta
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
This component provides HA switch support for Lupusec Security System.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/switch.lupusec/
|
||||
"""
|
||||
"""Support for Lupusec Security System switches."""
|
||||
import logging
|
||||
from datetime import timedelta
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Component for interacting with a Lutron RadioRA 2 system.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/lutron/
|
||||
"""
|
||||
"""Component for interacting with a Lutron RadioRA 2 system."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for Lutron shades.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/cover.lutron/
|
||||
"""
|
||||
"""Support for Lutron shades."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.cover import (
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for Lutron lights.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/light.lutron/
|
||||
"""
|
||||
"""Support for Lutron lights."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.light import (
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for Lutron scenes.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/scene.lutron/
|
||||
"""
|
||||
"""Support for Lutron scenes."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.lutron import (
|
||||
@ -30,12 +25,9 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
class LutronScene(LutronDevice, Scene):
|
||||
"""Representation of a Lutron Scene."""
|
||||
|
||||
def __init__(self,
|
||||
area_name,
|
||||
keypad_name,
|
||||
lutron_device,
|
||||
lutron_led,
|
||||
controller):
|
||||
def __init__(
|
||||
self, area_name, keypad_name, lutron_device, lutron_led,
|
||||
controller):
|
||||
"""Initialize the scene/button."""
|
||||
super().__init__(area_name, lutron_device, controller)
|
||||
self._keypad_name = keypad_name
|
||||
@ -48,6 +40,5 @@ class LutronScene(LutronDevice, Scene):
|
||||
@property
|
||||
def name(self):
|
||||
"""Return the name of the device."""
|
||||
return "{} {}: {}".format(self._area_name,
|
||||
self._keypad_name,
|
||||
self._lutron_device.name)
|
||||
return "{} {}: {}".format(
|
||||
self._area_name, self._keypad_name, self._lutron_device.name)
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for Lutron switches.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/switch.lutron/
|
||||
"""
|
||||
"""Support for Lutron switches."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.switch import SwitchDevice
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Component for interacting with a Lutron Caseta system.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/lutron_caseta/
|
||||
"""
|
||||
"""Component for interacting with a Lutron Caseta system."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
@ -30,7 +25,7 @@ CONFIG_SCHEMA = vol.Schema({
|
||||
vol.Required(CONF_HOST): cv.string,
|
||||
vol.Required(CONF_KEYFILE): cv.string,
|
||||
vol.Required(CONF_CERTFILE): cv.string,
|
||||
vol.Required(CONF_CA_CERTS): cv.string
|
||||
vol.Required(CONF_CA_CERTS): cv.string,
|
||||
})
|
||||
}, extra=vol.ALLOW_EXTRA)
|
||||
|
||||
@ -47,15 +42,14 @@ async def async_setup(hass, base_config):
|
||||
keyfile = hass.config.path(config[CONF_KEYFILE])
|
||||
certfile = hass.config.path(config[CONF_CERTFILE])
|
||||
ca_certs = hass.config.path(config[CONF_CA_CERTS])
|
||||
bridge = Smartbridge.create_tls(hostname=config[CONF_HOST],
|
||||
keyfile=keyfile,
|
||||
certfile=certfile,
|
||||
ca_certs=ca_certs)
|
||||
bridge = Smartbridge.create_tls(
|
||||
hostname=config[CONF_HOST], keyfile=keyfile, certfile=certfile,
|
||||
ca_certs=ca_certs)
|
||||
hass.data[LUTRON_CASETA_SMARTBRIDGE] = bridge
|
||||
await bridge.connect()
|
||||
if not hass.data[LUTRON_CASETA_SMARTBRIDGE].is_connected():
|
||||
_LOGGER.error("Unable to connect to Lutron smartbridge at %s",
|
||||
config[CONF_HOST])
|
||||
_LOGGER.error(
|
||||
"Unable to connect to Lutron smartbridge at %s", config[CONF_HOST])
|
||||
return False
|
||||
|
||||
_LOGGER.info("Connected to Lutron smartbridge at %s", config[CONF_HOST])
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for Lutron Caseta shades.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/cover.lutron_caseta/
|
||||
"""
|
||||
"""Support for Lutron Caseta shades."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.cover import (
|
||||
@ -17,8 +12,8 @@ _LOGGER = logging.getLogger(__name__)
|
||||
DEPENDENCIES = ['lutron_caseta']
|
||||
|
||||
|
||||
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 Lutron Caseta shades as a cover device."""
|
||||
devs = []
|
||||
bridge = hass.data[LUTRON_CASETA_SMARTBRIDGE]
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for Lutron Caseta lights.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/light.lutron_caseta/
|
||||
"""
|
||||
"""Support for Lutron Caseta lights."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.light import (
|
||||
@ -18,8 +13,8 @@ _LOGGER = logging.getLogger(__name__)
|
||||
DEPENDENCIES = ['lutron_caseta']
|
||||
|
||||
|
||||
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 Lutron Caseta lights."""
|
||||
devs = []
|
||||
bridge = hass.data[LUTRON_CASETA_SMARTBRIDGE]
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for Lutron Caseta scenes.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/scene.lutron_caseta/
|
||||
"""
|
||||
"""Support for Lutron Caseta scenes."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.lutron_caseta import LUTRON_CASETA_SMARTBRIDGE
|
||||
@ -14,8 +9,8 @@ _LOGGER = logging.getLogger(__name__)
|
||||
DEPENDENCIES = ['lutron_caseta']
|
||||
|
||||
|
||||
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 Lutron Caseta lights."""
|
||||
devs = []
|
||||
bridge = hass.data[LUTRON_CASETA_SMARTBRIDGE]
|
||||
@ -32,8 +27,8 @@ class LutronCasetaScene(Scene):
|
||||
|
||||
def __init__(self, scene, bridge):
|
||||
"""Initialize the Lutron Caseta scene."""
|
||||
self._scene_name = scene["name"]
|
||||
self._scene_id = scene["scene_id"]
|
||||
self._scene_name = scene['name']
|
||||
self._scene_id = scene['scene_id']
|
||||
self._bridge = bridge
|
||||
|
||||
@property
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for Lutron Caseta switches.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sitch.lutron_caseta/
|
||||
"""
|
||||
"""Support for Lutron Caseta switches."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.lutron_caseta import (
|
||||
@ -15,8 +10,8 @@ _LOGGER = logging.getLogger(__name__)
|
||||
DEPENDENCIES = ['lutron_caseta']
|
||||
|
||||
|
||||
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 Lutron switch."""
|
||||
devs = []
|
||||
bridge = hass.data[LUTRON_CASETA_SMARTBRIDGE]
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Provides functionality for mailboxes.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/mailbox/
|
||||
"""
|
||||
"""Support for Voice mailboxes."""
|
||||
import asyncio
|
||||
from contextlib import suppress
|
||||
from datetime import timedelta
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Asterisk CDR interface.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/mailbox.asterisk_cdr/
|
||||
"""
|
||||
"""Support for the Asterisk CDR interface."""
|
||||
import logging
|
||||
import hashlib
|
||||
import datetime
|
||||
@ -14,9 +9,11 @@ from homeassistant.components.asterisk_mbox import DOMAIN as ASTERISK_DOMAIN
|
||||
from homeassistant.components.mailbox import Mailbox
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
|
||||
DEPENDENCIES = ['asterisk_mbox']
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
MAILBOX_NAME = "asterisk_cdr"
|
||||
|
||||
DEPENDENCIES = ['asterisk_mbox']
|
||||
|
||||
MAILBOX_NAME = 'asterisk_cdr'
|
||||
|
||||
|
||||
async def async_get_handler(hass, config, discovery_info=None):
|
||||
|
@ -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 a demo mailbox."""
|
||||
from hashlib import sha1
|
||||
import logging
|
||||
import os
|
||||
@ -14,7 +9,7 @@ from homeassistant.util import dt
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
MAILBOX_NAME = "DemoMailbox"
|
||||
MAILBOX_NAME = 'DemoMailbox'
|
||||
|
||||
|
||||
async def async_get_handler(hass, config, discovery_info=None):
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for Mailgun.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/mailgun/
|
||||
"""
|
||||
"""Support for Mailgun."""
|
||||
import hashlib
|
||||
import hmac
|
||||
import json
|
||||
@ -15,12 +10,15 @@ import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.const import CONF_API_KEY, CONF_DOMAIN, CONF_WEBHOOK_ID
|
||||
from homeassistant.helpers import config_entry_flow
|
||||
|
||||
DOMAIN = 'mailgun'
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
DEPENDENCIES = ['webhook']
|
||||
MESSAGE_RECEIVED = '{}_message_received'.format(DOMAIN)
|
||||
|
||||
CONF_SANDBOX = 'sandbox'
|
||||
|
||||
DEFAULT_SANDBOX = False
|
||||
DEPENDENCIES = ['webhook']
|
||||
DOMAIN = 'mailgun'
|
||||
|
||||
MESSAGE_RECEIVED = '{}_message_received'.format(DOMAIN)
|
||||
|
||||
CONFIG_SCHEMA = vol.Schema({
|
||||
vol.Optional(DOMAIN): vol.Schema({
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for the Mailgun mail notification service.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/notify.mailgun/
|
||||
"""
|
||||
"""Support for the Mailgun mail notifications."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
@ -16,10 +11,11 @@ from homeassistant.components.notify import (
|
||||
from homeassistant.const import (
|
||||
CONF_API_KEY, CONF_DOMAIN, CONF_RECIPIENT, CONF_SENDER)
|
||||
|
||||
REQUIREMENTS = ['pymailgunner==1.4']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DEPENDENCIES = ['mailgun']
|
||||
REQUIREMENTS = ['pymailgunner==1.4']
|
||||
|
||||
# Images to attach to notification
|
||||
ATTR_IMAGES = 'images'
|
||||
@ -30,7 +26,7 @@ DEFAULT_SANDBOX = False
|
||||
# pylint: disable=no-value-for-parameter
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||
vol.Required(CONF_RECIPIENT): vol.Email(),
|
||||
vol.Optional(CONF_SENDER): vol.Email()
|
||||
vol.Optional(CONF_SENDER): vol.Email(),
|
||||
})
|
||||
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Provides a map panel for showing device locations.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/map/
|
||||
"""
|
||||
"""Support for showing device locations."""
|
||||
DOMAIN = 'map'
|
||||
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
The matrix bot component.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/matrix/
|
||||
"""
|
||||
"""The matrix bot component."""
|
||||
import logging
|
||||
import os
|
||||
from functools import partial
|
||||
@ -41,8 +36,8 @@ COMMAND_SCHEMA = vol.All(
|
||||
vol.Exclusive(CONF_WORD, 'trigger'): cv.string,
|
||||
vol.Exclusive(CONF_EXPRESSION, 'trigger'): cv.is_regex,
|
||||
vol.Required(CONF_NAME): cv.string,
|
||||
vol.Optional(CONF_ROOMS, default=[]): vol.All(cv.ensure_list,
|
||||
[cv.string]),
|
||||
vol.Optional(CONF_ROOMS, default=[]):
|
||||
vol.All(cv.ensure_list, [cv.string]),
|
||||
}),
|
||||
# Make sure it's either a word or an expression command
|
||||
cv.has_at_least_one_key(CONF_WORD, CONF_EXPRESSION)
|
||||
@ -54,8 +49,8 @@ CONFIG_SCHEMA = vol.Schema({
|
||||
vol.Optional(CONF_VERIFY_SSL, default=True): cv.boolean,
|
||||
vol.Required(CONF_USERNAME): cv.matches_regex("@[^:]*:.*"),
|
||||
vol.Required(CONF_PASSWORD): cv.string,
|
||||
vol.Optional(CONF_ROOMS, default=[]): vol.All(cv.ensure_list,
|
||||
[cv.string]),
|
||||
vol.Optional(CONF_ROOMS, default=[]):
|
||||
vol.All(cv.ensure_list, [cv.string]),
|
||||
vol.Optional(CONF_COMMANDS, default=[]): [COMMAND_SCHEMA]
|
||||
})
|
||||
}, extra=vol.ALLOW_EXTRA)
|
||||
@ -76,13 +71,9 @@ def setup(hass, config):
|
||||
|
||||
try:
|
||||
bot = MatrixBot(
|
||||
hass,
|
||||
os.path.join(hass.config.path(), SESSION_FILE),
|
||||
config[CONF_HOMESERVER],
|
||||
config[CONF_VERIFY_SSL],
|
||||
config[CONF_USERNAME],
|
||||
config[CONF_PASSWORD],
|
||||
config[CONF_ROOMS],
|
||||
hass, os.path.join(hass.config.path(), SESSION_FILE),
|
||||
config[CONF_HOMESERVER], config[CONF_VERIFY_SSL],
|
||||
config[CONF_USERNAME], config[CONF_PASSWORD], config[CONF_ROOMS],
|
||||
config[CONF_COMMANDS])
|
||||
hass.data[DOMAIN] = bot
|
||||
except MatrixRequestError as exception:
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Matrix notification service.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/notify.matrix/
|
||||
"""
|
||||
"""Support for Matrix notifications."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Platform for the MAX! Cube LAN Gateway.
|
||||
|
||||
For more details about this component, please refer to the documentation
|
||||
https://home-assistant.io/components/maxcube/
|
||||
"""
|
||||
"""Support for the MAX! Cube LAN Gateway."""
|
||||
import logging
|
||||
import time
|
||||
from socket import timeout
|
||||
@ -38,7 +33,7 @@ CONFIG_GATEWAY = vol.Schema({
|
||||
CONFIG_SCHEMA = vol.Schema({
|
||||
DOMAIN: vol.Schema({
|
||||
vol.Required(CONF_GATEWAYS, default={}):
|
||||
vol.All(cv.ensure_list, [CONFIG_GATEWAY])
|
||||
vol.All(cv.ensure_list, [CONFIG_GATEWAY]),
|
||||
}),
|
||||
}, extra=vol.ALLOW_EXTRA)
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for MAX! Window Shutter via MAX! Cube.
|
||||
|
||||
For more details about this platform, please refer to the documentation
|
||||
https://home-assistant.io/components/maxcube/
|
||||
"""
|
||||
"""Support for MAX! binary sensors via MAX! Cube."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.binary_sensor import BinarySensorDevice
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for MAX! Thermostats via MAX! Cube.
|
||||
|
||||
For more details about this platform, please refer to the documentation
|
||||
https://home-assistant.io/components/maxcube/
|
||||
"""
|
||||
"""Support for MAX! Thermostats via MAX! Cube."""
|
||||
import socket
|
||||
import logging
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Decorator service for the media_player.play_media service.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/media_extractor/
|
||||
"""
|
||||
"""Decorator service for the media_player.play_media service."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for Melissa climate.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/melissa/
|
||||
"""
|
||||
"""Support for Melissa climate."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
@ -16,7 +11,7 @@ REQUIREMENTS = ["py-melissa-climate==2.0.0"]
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DOMAIN = "melissa"
|
||||
DOMAIN = 'melissa'
|
||||
DATA_MELISSA = 'MELISSA'
|
||||
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for Microsoft face recognition.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/microsoft_face/
|
||||
"""
|
||||
"""Support for Microsoft face recognition."""
|
||||
import asyncio
|
||||
import json
|
||||
import logging
|
||||
@ -45,7 +40,7 @@ SERVICE_TRAIN_GROUP = 'train_group'
|
||||
CONFIG_SCHEMA = vol.Schema({
|
||||
DOMAIN: vol.Schema({
|
||||
vol.Required(CONF_API_KEY): cv.string,
|
||||
vol.Optional(CONF_AZURE_REGION, default="westus"): cv.string,
|
||||
vol.Optional(CONF_AZURE_REGION, default='westus'): cv.string,
|
||||
vol.Optional(CONF_TIMEOUT, default=DEFAULT_TIMEOUT): cv.positive_int,
|
||||
}),
|
||||
}, extra=vol.ALLOW_EXTRA)
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for CM15A/CM19A X10 Controller using mochad daemon.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/mochad/
|
||||
"""
|
||||
"""Support for CM15A/CM19A X10 Controller using mochad daemon."""
|
||||
import logging
|
||||
import threading
|
||||
|
||||
|
@ -1,10 +1,4 @@
|
||||
"""
|
||||
Contains functionality to use a X10 dimmer over Mochad.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home.assistant.io/components/light.mochad/
|
||||
"""
|
||||
|
||||
"""Support for X10 dimmer over Mochad."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
@ -16,11 +10,11 @@ from homeassistant.const import (
|
||||
CONF_NAME, CONF_PLATFORM, CONF_DEVICES, CONF_ADDRESS)
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
|
||||
DEPENDENCIES = ['mochad']
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_BRIGHTNESS_LEVELS = 'brightness_levels'
|
||||
DEPENDENCIES = ['mochad']
|
||||
|
||||
CONF_BRIGHTNESS_LEVELS = 'brightness_levels'
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||
vol.Required(CONF_PLATFORM): mochad.DOMAIN,
|
||||
@ -51,11 +45,11 @@ class MochadLight(Light):
|
||||
|
||||
self._controller = ctrl
|
||||
self._address = dev[CONF_ADDRESS]
|
||||
self._name = dev.get(CONF_NAME,
|
||||
'x10_light_dev_{}'.format(self._address))
|
||||
self._name = dev.get(
|
||||
CONF_NAME, 'x10_light_dev_{}'.format(self._address))
|
||||
self._comm_type = dev.get(mochad.CONF_COMM_TYPE, 'pl')
|
||||
self.light = device.Device(ctrl, self._address,
|
||||
comm_type=self._comm_type)
|
||||
self.light = device.Device(
|
||||
ctrl, self._address, comm_type=self._comm_type)
|
||||
self._brightness = 0
|
||||
self._state = self._get_device_status()
|
||||
self._brightness_levels = dev.get(CONF_BRIGHTNESS_LEVELS) - 1
|
||||
|
@ -1,10 +1,4 @@
|
||||
"""
|
||||
Contains functionality to use a X10 switch over Mochad.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home.assistant.io/components/switch.mochad
|
||||
"""
|
||||
|
||||
"""Support for X10 switch over Mochad."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
@ -15,9 +9,10 @@ from homeassistant.const import (CONF_NAME, CONF_DEVICES,
|
||||
CONF_PLATFORM, CONF_ADDRESS)
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
|
||||
DEPENDENCIES = ['mochad']
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DEPENDENCIES = ['mochad']
|
||||
|
||||
|
||||
PLATFORM_SCHEMA = vol.Schema({
|
||||
vol.Required(CONF_PLATFORM): mochad.DOMAIN,
|
||||
@ -48,8 +43,8 @@ class MochadSwitch(SwitchDevice):
|
||||
self._address = dev[CONF_ADDRESS]
|
||||
self._name = dev.get(CONF_NAME, 'x10_switch_dev_%s' % self._address)
|
||||
self._comm_type = dev.get(mochad.CONF_COMM_TYPE, 'pl')
|
||||
self.switch = device.Device(ctrl, self._address,
|
||||
comm_type=self._comm_type)
|
||||
self.switch = device.Device(
|
||||
ctrl, self._address, comm_type=self._comm_type)
|
||||
# Init with false to avoid locking HA for long on CM19A (goes from rf
|
||||
# to pl via TM751, but not other way around)
|
||||
if self._comm_type == 'pl':
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for Modbus.
|
||||
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/modbus/
|
||||
"""
|
||||
"""Support for Modbus."""
|
||||
import logging
|
||||
import threading
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
"""
|
||||
Support for Modbus Coil sensors.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/binary_sensor.modbus/
|
||||
"""
|
||||
"""Support for Modbus Coil sensors."""
|
||||
import logging
|
||||
import voluptuous as vol
|
||||
|
||||
@ -25,7 +20,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||
vol.Optional(CONF_HUB, default=DEFAULT_HUB): cv.string,
|
||||
vol.Required(CONF_COIL): cv.positive_int,
|
||||
vol.Required(CONF_NAME): cv.string,
|
||||
vol.Optional(CONF_SLAVE): cv.positive_int
|
||||
vol.Optional(CONF_SLAVE): cv.positive_int,
|
||||
}]
|
||||
})
|
||||
|
||||
@ -36,9 +31,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
for coil in config.get(CONF_COILS):
|
||||
hub = hass.data[MODBUS_DOMAIN][coil.get(CONF_HUB)]
|
||||
sensors.append(ModbusCoilSensor(
|
||||
hub,
|
||||
coil.get(CONF_NAME),
|
||||
coil.get(CONF_SLAVE),
|
||||
hub, coil.get(CONF_NAME), coil.get(CONF_SLAVE),
|
||||
coil.get(CONF_COIL)))
|
||||
add_entities(sensors)
|
||||
|
||||
@ -70,5 +63,5 @@ class ModbusCoilSensor(BinarySensorDevice):
|
||||
try:
|
||||
self._value = result.bits[0]
|
||||
except AttributeError:
|
||||
_LOGGER.error('No response from hub %s, slave %s, coil %s',
|
||||
_LOGGER.error("No response from hub %s, slave %s, coil %s",
|
||||
self._hub.name, self._slave, self._coil)
|
||||
|
@ -1,13 +1,4 @@
|
||||
"""
|
||||
Platform for a Generic Modbus Thermostat.
|
||||
|
||||
This uses a setpoint and process
|
||||
value within the controller, so both the current temperature register and the
|
||||
target temperature register need to be configured.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/climate.modbus/
|
||||
"""
|
||||
"""Support for Generic Modbus Thermostats."""
|
||||
import logging
|
||||
import struct
|
||||
|
||||
@ -21,6 +12,8 @@ from homeassistant.components.modbus import (
|
||||
CONF_HUB, DEFAULT_HUB, DOMAIN as MODBUS_DOMAIN)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DEPENDENCIES = ['modbus']
|
||||
|
||||
# Parameters not defined by homeassistant.const
|
||||
@ -46,8 +39,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||
vol.Optional(CONF_PRECISION, default=1): cv.positive_int
|
||||
})
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
SUPPORT_FLAGS = SUPPORT_TARGET_TEMPERATURE
|
||||
|
||||
|
||||
@ -63,9 +54,9 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
hub_name = config.get(CONF_HUB)
|
||||
hub = hass.data[MODBUS_DOMAIN][hub_name]
|
||||
|
||||
add_entities([ModbusThermostat(hub, name, modbus_slave,
|
||||
target_temp_register, current_temp_register,
|
||||
data_type, count, precision)], True)
|
||||
add_entities([ModbusThermostat(
|
||||
hub, name, modbus_slave, target_temp_register, current_temp_register,
|
||||
data_type, count, precision)], True)
|
||||
|
||||
|
||||
class ModbusThermostat(ClimateDevice):
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user