Fix imports (using isort)
This commit is contained in:
1 parent
233a2a2878
commit
e80309c03c
214 files changed
+644
-718
No files matched your search
@@ -8,6 +8,7 @@ For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/switch.arest/
|
||||
"""
|
||||
import logging
|
||||
|
||||
import requests
|
||||
|
||||
from homeassistant.components.switch import SwitchDevice
|
||||
|
||||
@@ -8,10 +8,10 @@ https://home-assistant.io/components/switch.edimax/
|
||||
"""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.switch import DOMAIN, SwitchDevice
|
||||
from homeassistant.const import (
|
||||
CONF_HOST, CONF_NAME, CONF_PASSWORD, CONF_USERNAME)
|
||||
from homeassistant.helpers import validate_config
|
||||
from homeassistant.components.switch import SwitchDevice, DOMAIN
|
||||
from homeassistant.const import CONF_HOST, CONF_USERNAME, CONF_PASSWORD,\
|
||||
CONF_NAME
|
||||
|
||||
# constants
|
||||
DEFAULT_USERNAME = 'admin'
|
||||
|
||||
@@ -8,9 +8,9 @@ https://home-assistant.io/components/switch.hikvision/
|
||||
"""
|
||||
import logging
|
||||
|
||||
from homeassistant.const import (
|
||||
CONF_HOST, CONF_PASSWORD, CONF_USERNAME, STATE_OFF, STATE_ON)
|
||||
from homeassistant.helpers.entity import ToggleEntity
|
||||
from homeassistant.const import (STATE_ON, STATE_OFF,
|
||||
CONF_HOST, CONF_USERNAME, CONF_PASSWORD)
|
||||
|
||||
_LOGGING = logging.getLogger(__name__)
|
||||
REQUIREMENTS = ['hikvision==0.4']
|
||||
|
||||
@@ -8,9 +8,11 @@ https://home-assistant.io/components/isy994/
|
||||
"""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.isy994 import (ISY, ISYDeviceABC, SENSOR_STRING,
|
||||
HIDDEN_STRING)
|
||||
from homeassistant.const import STATE_ON, STATE_OFF # STATE_OPEN, STATE_CLOSED
|
||||
from homeassistant.components.isy994 import (
|
||||
HIDDEN_STRING, ISY, SENSOR_STRING, ISYDeviceABC)
|
||||
from homeassistant.const import STATE_OFF, STATE_ON # STATE_OPEN, STATE_CLOSED
|
||||
|
||||
|
||||
# The frontend doesn't seem to fully support the open and closed states yet.
|
||||
# Once it does, the HA.doors programs should report open and closed instead of
|
||||
# off and on. It appears that on should be open and off should be closed.
|
||||
|
||||
@@ -9,7 +9,7 @@ https://home-assistant.io/components/switch.mfi/
|
||||
import logging
|
||||
|
||||
from homeassistant.components.switch import DOMAIN, SwitchDevice
|
||||
from homeassistant.const import CONF_USERNAME, CONF_PASSWORD
|
||||
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
|
||||
from homeassistant.helpers import validate_config
|
||||
|
||||
REQUIREMENTS = ['mficlient==0.2.2']
|
||||
|
||||
@@ -7,9 +7,10 @@ For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/switch.mqtt/
|
||||
"""
|
||||
import logging
|
||||
|
||||
import homeassistant.components.mqtt as mqtt
|
||||
from homeassistant.const import CONF_VALUE_TEMPLATE
|
||||
from homeassistant.components.switch import SwitchDevice
|
||||
from homeassistant.const import CONF_VALUE_TEMPLATE
|
||||
from homeassistant.util import template
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@@ -6,13 +6,9 @@ https://home-assistant.io/components/switch.mysensors/
|
||||
"""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.switch import SwitchDevice
|
||||
|
||||
from homeassistant.const import (
|
||||
ATTR_BATTERY_LEVEL,
|
||||
STATE_ON, STATE_OFF)
|
||||
|
||||
import homeassistant.components.mysensors as mysensors
|
||||
from homeassistant.components.switch import SwitchDevice
|
||||
from homeassistant.const import ATTR_BATTERY_LEVEL, STATE_OFF, STATE_ON
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
DEPENDENCIES = []
|
||||
|
||||
@@ -7,6 +7,7 @@ For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/switch.mystrom/
|
||||
"""
|
||||
import logging
|
||||
|
||||
import requests
|
||||
|
||||
from homeassistant.components.switch import SwitchDevice
|
||||
|
||||
@@ -7,6 +7,7 @@ For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/switch.rest/
|
||||
"""
|
||||
import logging
|
||||
|
||||
import requests
|
||||
|
||||
from homeassistant.components.switch import SwitchDevice
|
||||
|
||||
@@ -7,16 +7,13 @@ For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/switch.rfxtrx/
|
||||
"""
|
||||
import logging
|
||||
|
||||
import homeassistant.components.rfxtrx as rfxtrx
|
||||
|
||||
from homeassistant.components.switch import SwitchDevice
|
||||
from homeassistant.util import slugify
|
||||
|
||||
from homeassistant.const import ATTR_ENTITY_ID
|
||||
from homeassistant.components.rfxtrx import (
|
||||
ATTR_STATE, ATTR_FIREEVENT, ATTR_PACKETID,
|
||||
ATTR_NAME, EVENT_BUTTON_PRESSED)
|
||||
|
||||
ATTR_FIREEVENT, ATTR_NAME, ATTR_PACKETID, ATTR_STATE, EVENT_BUTTON_PRESSED)
|
||||
from homeassistant.components.switch import SwitchDevice
|
||||
from homeassistant.const import ATTR_ENTITY_ID
|
||||
from homeassistant.util import slugify
|
||||
|
||||
DEPENDENCIES = ['rfxtrx']
|
||||
SIGNAL_REPETITIONS = 1
|
||||
|
||||
@@ -8,9 +8,10 @@ https://home-assistant.io/components/switch.rpi_gpio/
|
||||
"""
|
||||
|
||||
import logging
|
||||
|
||||
import homeassistant.components.rpi_gpio as rpi_gpio
|
||||
from homeassistant.const import DEVICE_DEFAULT_NAME
|
||||
from homeassistant.helpers.entity import ToggleEntity
|
||||
from homeassistant.const import (DEVICE_DEFAULT_NAME)
|
||||
|
||||
DEFAULT_INVERT_LOGIC = False
|
||||
|
||||
|
||||
@@ -7,13 +7,11 @@ For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/switch.scsgate/
|
||||
"""
|
||||
import logging
|
||||
|
||||
import homeassistant.components.scsgate as scsgate
|
||||
|
||||
from homeassistant.components.switch import SwitchDevice
|
||||
|
||||
from homeassistant.const import ATTR_ENTITY_ID
|
||||
|
||||
|
||||
DEPENDENCIES = ['scsgate']
|
||||
|
||||
|
||||
|
||||
@@ -8,21 +8,14 @@ https://home-assistant.io/components/switch.template/
|
||||
"""
|
||||
import logging
|
||||
|
||||
from homeassistant.helpers.entity import generate_entity_id
|
||||
|
||||
from homeassistant.components.switch import SwitchDevice
|
||||
|
||||
from homeassistant.core import EVENT_STATE_CHANGED
|
||||
from homeassistant.components.switch import DOMAIN, SwitchDevice
|
||||
from homeassistant.const import (
|
||||
STATE_ON,
|
||||
STATE_OFF,
|
||||
ATTR_FRIENDLY_NAME,
|
||||
CONF_VALUE_TEMPLATE)
|
||||
|
||||
from homeassistant.helpers.service import call_from_config
|
||||
from homeassistant.util import template, slugify
|
||||
ATTR_FRIENDLY_NAME, CONF_VALUE_TEMPLATE, STATE_OFF, STATE_ON)
|
||||
from homeassistant.core import EVENT_STATE_CHANGED
|
||||
from homeassistant.exceptions import TemplateError
|
||||
from homeassistant.components.switch import DOMAIN
|
||||
from homeassistant.helpers.entity import generate_entity_id
|
||||
from homeassistant.helpers.service import call_from_config
|
||||
from homeassistant.util import slugify, template
|
||||
|
||||
ENTITY_ID_FORMAT = DOMAIN + '.{}'
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ https://home-assistant.io/components/switch.transmission/
|
||||
"""
|
||||
import logging
|
||||
|
||||
from homeassistant.const import (CONF_HOST, CONF_USERNAME, CONF_PASSWORD,
|
||||
STATE_ON, STATE_OFF)
|
||||
from homeassistant.const import (
|
||||
CONF_HOST, CONF_PASSWORD, CONF_USERNAME, STATE_OFF, STATE_ON)
|
||||
from homeassistant.helpers.entity import ToggleEntity
|
||||
|
||||
_LOGGING = logging.getLogger(__name__)
|
||||
|
||||
@@ -7,19 +7,14 @@ For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/switch.vera/
|
||||
"""
|
||||
import logging
|
||||
|
||||
from requests.exceptions import RequestException
|
||||
|
||||
import homeassistant.util.dt as dt_util
|
||||
|
||||
from homeassistant.components.switch import SwitchDevice
|
||||
|
||||
from homeassistant.const import (
|
||||
ATTR_BATTERY_LEVEL,
|
||||
ATTR_TRIPPED,
|
||||
ATTR_ARMED,
|
||||
ATTR_LAST_TRIP_TIME,
|
||||
EVENT_HOMEASSISTANT_STOP,
|
||||
STATE_ON,
|
||||
STATE_OFF)
|
||||
ATTR_ARMED, ATTR_BATTERY_LEVEL, ATTR_LAST_TRIP_TIME, ATTR_TRIPPED,
|
||||
EVENT_HOMEASSISTANT_STOP, STATE_OFF, STATE_ON)
|
||||
|
||||
REQUIREMENTS = ['pyvera==0.2.8']
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import logging
|
||||
|
||||
from homeassistant.components.switch import SwitchDevice
|
||||
from homeassistant.const import (
|
||||
STATE_ON, STATE_OFF, STATE_STANDBY, EVENT_HOMEASSISTANT_STOP)
|
||||
EVENT_HOMEASSISTANT_STOP, STATE_OFF, STATE_ON, STATE_STANDBY)
|
||||
|
||||
REQUIREMENTS = ['pywemo==0.3.12']
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@@ -10,7 +10,6 @@ from homeassistant.components.switch import SwitchDevice
|
||||
from homeassistant.components.zigbee import (
|
||||
ZigBeeDigitalOut, ZigBeeDigitalOutConfig)
|
||||
|
||||
|
||||
DEPENDENCIES = ["zigbee"]
|
||||
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Zwave platform that handles simple binary switches.
|
||||
"""
|
||||
# Because we do not compile openzwave on CI
|
||||
# pylint: disable=import-error
|
||||
from homeassistant.components.switch import SwitchDevice, DOMAIN
|
||||
from homeassistant.components.switch import DOMAIN, SwitchDevice
|
||||
from homeassistant.components.zwave import (
|
||||
COMMAND_CLASS_SWITCH_BINARY, TYPE_BOOL, GENRE_USER, NETWORK,
|
||||
ATTR_NODE_ID, ATTR_VALUE_ID, ZWaveDeviceEntity)
|
||||
ATTR_NODE_ID, ATTR_VALUE_ID, COMMAND_CLASS_SWITCH_BINARY, GENRE_USER,
|
||||
NETWORK, TYPE_BOOL, ZWaveDeviceEntity)
|
||||
|
||||
|
||||
# pylint: disable=unused-argument
|
||||
|
||||
Reference in new issue
Block a user