diff --git a/homeassistant/components/binary_sensor/isy994.py b/homeassistant/components/binary_sensor/isy994.py index d845f4de9f7..8f4cb1637b4 100644 --- a/homeassistant/components/binary_sensor/isy994.py +++ b/homeassistant/components/binary_sensor/isy994.py @@ -59,7 +59,7 @@ class ISYBinarySensorDevice(isy.ISYDevice, BinarySensorDevice): @property def is_on(self) -> bool: """Get whether the ISY994 binary sensor device is on.""" - return bool(self.state) + return bool(self.value) class ISYBinarySensorProgram(ISYBinarySensorDevice): @@ -69,8 +69,3 @@ class ISYBinarySensorProgram(ISYBinarySensorDevice): """Initialize the ISY994 binary sensor program.""" ISYBinarySensorDevice.__init__(self, node) self._name = name - - @property - def is_on(self): - """Get whether the ISY994 binary sensor program is on.""" - return bool(self.value) diff --git a/homeassistant/components/cover/isy994.py b/homeassistant/components/cover/isy994.py index def3ef009c7..27619de738d 100644 --- a/homeassistant/components/cover/isy994.py +++ b/homeassistant/components/cover/isy994.py @@ -21,7 +21,7 @@ VALUE_TO_STATE = { } UOM = ['97'] -STATES = [STATE_OPEN, STATE_CLOSED, 'closing', 'opening'] +STATES = [STATE_OPEN, STATE_CLOSED, 'closing', 'opening', 'stopped'] # pylint: disable=unused-argument diff --git a/homeassistant/components/light/isy994.py b/homeassistant/components/light/isy994.py index fe7abbc26e8..1387110a91a 100644 --- a/homeassistant/components/light/isy994.py +++ b/homeassistant/components/light/isy994.py @@ -7,7 +7,7 @@ https://home-assistant.io/components/light.isy994/ import logging from typing import Callable -from homeassistant.components.light import Light +from homeassistant.components.light import Light, SUPPORT_BRIGHTNESS import homeassistant.components.isy994 as isy from homeassistant.const import STATE_ON, STATE_OFF, STATE_UNKNOWN from homeassistant.helpers.typing import ConfigType @@ -19,8 +19,8 @@ VALUE_TO_STATE = { True: STATE_ON, } -UOM = ['2', '78'] -STATES = [STATE_OFF, STATE_ON, 'true', 'false'] +UOM = ['2', '51', '78'] +STATES = [STATE_OFF, STATE_ON, 'true', 'false', '%'] # pylint: disable=unused-argument @@ -35,7 +35,7 @@ def setup_platform(hass, config: ConfigType, for node in isy.filter_nodes(isy.NODES, units=UOM, states=STATES): - if node.dimmable: + if node.dimmable or node.uom == '51': devices.append(ISYLightDevice(node)) add_devices(devices) @@ -60,10 +60,15 @@ class ISYLightDevice(isy.ISYDevice, Light): def turn_off(self, **kwargs) -> None: """Send the turn off command to the ISY994 light device.""" - if not self._node.fastOff(): + if not self._node.fastoff(): _LOGGER.debug('Unable to turn on light.') def turn_on(self, brightness=100, **kwargs) -> None: """Send the turn on command to the ISY994 light device.""" if not self._node.on(val=brightness): _LOGGER.debug('Unable to turn on light.') + + @property + def supported_features(self): + """Flag supported features.""" + return SUPPORT_BRIGHTNESS