diff --git a/homeassistant/components/lcn/binary_sensor.py b/homeassistant/components/lcn/binary_sensor.py index 415668f5924..56a5ea6e646 100644 --- a/homeassistant/components/lcn/binary_sensor.py +++ b/homeassistant/components/lcn/binary_sensor.py @@ -2,10 +2,10 @@ import pypck from homeassistant.components.binary_sensor import BinarySensorEntity -from homeassistant.const import CONF_ADDRESS +from homeassistant.const import CONF_ADDRESS, CONF_SOURCE from . import LcnEntity -from .const import BINSENSOR_PORTS, CONF_CONNECTIONS, CONF_SOURCE, DATA_LCN, SETPOINTS +from .const import BINSENSOR_PORTS, CONF_CONNECTIONS, DATA_LCN, SETPOINTS from .helpers import get_connection diff --git a/homeassistant/components/lcn/climate.py b/homeassistant/components/lcn/climate.py index ece3994f651..e3269a51cd6 100644 --- a/homeassistant/components/lcn/climate.py +++ b/homeassistant/components/lcn/climate.py @@ -3,7 +3,12 @@ import pypck from homeassistant.components.climate import ClimateEntity, const -from homeassistant.const import ATTR_TEMPERATURE, CONF_ADDRESS, CONF_UNIT_OF_MEASUREMENT +from homeassistant.const import ( + ATTR_TEMPERATURE, + CONF_ADDRESS, + CONF_SOURCE, + CONF_UNIT_OF_MEASUREMENT, +) from . import LcnEntity from .const import ( @@ -12,7 +17,6 @@ from .const import ( CONF_MAX_TEMP, CONF_MIN_TEMP, CONF_SETPOINT, - CONF_SOURCE, DATA_LCN, ) from .helpers import get_connection diff --git a/homeassistant/components/lcn/const.py b/homeassistant/components/lcn/const.py index 821a7102154..3dcac6fb55f 100644 --- a/homeassistant/components/lcn/const.py +++ b/homeassistant/components/lcn/const.py @@ -25,7 +25,6 @@ CONF_LOCKABLE = "lockable" CONF_VARIABLE = "variable" CONF_VALUE = "value" CONF_RELVARREF = "value_reference" -CONF_SOURCE = "source" CONF_SETPOINT = "setpoint" CONF_LED = "led" CONF_KEYS = "keys" @@ -40,7 +39,6 @@ CONF_MAX_TEMP = "max_temp" CONF_MIN_TEMP = "min_temp" CONF_SCENES = "scenes" CONF_REGISTER = "register" -CONF_SCENE = "scene" CONF_OUTPUTS = "outputs" CONF_REVERSE_TIME = "reverse_time" diff --git a/homeassistant/components/lcn/light.py b/homeassistant/components/lcn/light.py index 5242ed1cc59..8a76056ff46 100644 --- a/homeassistant/components/lcn/light.py +++ b/homeassistant/components/lcn/light.py @@ -166,7 +166,6 @@ class LcnRelayLight(LcnEntity, LightEntity): async def async_turn_on(self, **kwargs): """Turn the entity on.""" - states = [pypck.lcn_defs.RelayStateModifier.NOCHANGE] * 8 states[self.output.value] = pypck.lcn_defs.RelayStateModifier.ON if not await self.device_connection.control_relays(states): @@ -176,7 +175,6 @@ class LcnRelayLight(LcnEntity, LightEntity): async def async_turn_off(self, **kwargs): """Turn the entity off.""" - states = [pypck.lcn_defs.RelayStateModifier.NOCHANGE] * 8 states[self.output.value] = pypck.lcn_defs.RelayStateModifier.OFF if not await self.device_connection.control_relays(states): diff --git a/homeassistant/components/lcn/scene.py b/homeassistant/components/lcn/scene.py index ed211473e29..1c359607fb2 100644 --- a/homeassistant/components/lcn/scene.py +++ b/homeassistant/components/lcn/scene.py @@ -4,14 +4,13 @@ from typing import Any import pypck from homeassistant.components.scene import Scene -from homeassistant.const import CONF_ADDRESS +from homeassistant.const import CONF_ADDRESS, CONF_SCENE from . import LcnEntity from .const import ( CONF_CONNECTIONS, CONF_OUTPUTS, CONF_REGISTER, - CONF_SCENE, CONF_TRANSITION, DATA_LCN, OUTPUT_PORTS, diff --git a/homeassistant/components/lcn/schemas.py b/homeassistant/components/lcn/schemas.py index 1cc51f400da..5244bac3b6b 100644 --- a/homeassistant/components/lcn/schemas.py +++ b/homeassistant/components/lcn/schemas.py @@ -11,7 +11,9 @@ from homeassistant.const import ( CONF_NAME, CONF_PASSWORD, CONF_PORT, + CONF_SCENE, CONF_SENSORS, + CONF_SOURCE, CONF_SWITCHES, CONF_UNIT_OF_MEASUREMENT, CONF_USERNAME, @@ -32,11 +34,9 @@ from .const import ( CONF_OUTPUTS, CONF_REGISTER, CONF_REVERSE_TIME, - CONF_SCENE, CONF_SCENES, CONF_SETPOINT, CONF_SK_NUM_TRIES, - CONF_SOURCE, CONF_TRANSITION, DIM_MODES, DOMAIN, diff --git a/homeassistant/components/lcn/sensor.py b/homeassistant/components/lcn/sensor.py index 4d4be5e1259..11932dccea8 100644 --- a/homeassistant/components/lcn/sensor.py +++ b/homeassistant/components/lcn/sensor.py @@ -1,12 +1,11 @@ """Support for LCN sensors.""" import pypck -from homeassistant.const import CONF_ADDRESS, CONF_UNIT_OF_MEASUREMENT +from homeassistant.const import CONF_ADDRESS, CONF_SOURCE, CONF_UNIT_OF_MEASUREMENT from . import LcnEntity from .const import ( CONF_CONNECTIONS, - CONF_SOURCE, DATA_LCN, LED_PORTS, S0_INPUTS, diff --git a/homeassistant/components/lcn/switch.py b/homeassistant/components/lcn/switch.py index 6f9cc25db99..5fe624b04bf 100644 --- a/homeassistant/components/lcn/switch.py +++ b/homeassistant/components/lcn/switch.py @@ -117,7 +117,6 @@ class LcnRelaySwitch(LcnEntity, SwitchEntity): async def async_turn_off(self, **kwargs): """Turn the entity off.""" - states = [pypck.lcn_defs.RelayStateModifier.NOCHANGE] * 8 states[self.output.value] = pypck.lcn_defs.RelayStateModifier.OFF if not await self.device_connection.control_relays(states):