diff --git a/homeassistant/components/knx.py b/homeassistant/components/knx.py index d7630fee7a5..f6f41619ca8 100644 --- a/homeassistant/components/knx.py +++ b/homeassistant/components/knx.py @@ -17,7 +17,7 @@ import homeassistant.helpers.config_validation as cv from homeassistant.helpers.event import async_track_state_change from homeassistant.helpers.script import Script -REQUIREMENTS = ['xknx==0.8.3'] +REQUIREMENTS = ['xknx==0.8.4'] DOMAIN = "knx" DATA_KNX = "data_knx" diff --git a/homeassistant/components/light/knx.py b/homeassistant/components/light/knx.py index 1b14ff75ecc..83083e34bad 100644 --- a/homeassistant/components/light/knx.py +++ b/homeassistant/components/light/knx.py @@ -109,8 +109,8 @@ class KNXLight(Light): @property def brightness(self): """Return the brightness of this light between 0..255.""" - return self.device.brightness \ - if self.device.supports_dimming else \ + return self.device.current_brightness \ + if self.device.supports_brightness else \ None @property @@ -122,7 +122,7 @@ class KNXLight(Light): def rgb_color(self): """Return the RBG color value.""" if self.device.supports_color: - return self.device.current_color() + return self.device.current_color return None @property @@ -154,7 +154,7 @@ class KNXLight(Light): def supported_features(self): """Flag supported features.""" flags = 0 - if self.device.supports_dimming: + if self.device.supports_brightness: flags |= SUPPORT_BRIGHTNESS if self.device.supports_color: flags |= SUPPORT_RGB_COLOR @@ -162,10 +162,12 @@ class KNXLight(Light): async def async_turn_on(self, **kwargs): """Turn the light on.""" - if ATTR_BRIGHTNESS in kwargs and self.device.supports_dimming: - await self.device.set_brightness(int(kwargs[ATTR_BRIGHTNESS])) + if ATTR_BRIGHTNESS in kwargs: + if self.device.supports_brightness: + await self.device.set_brightness(int(kwargs[ATTR_BRIGHTNESS])) elif ATTR_RGB_COLOR in kwargs: - await self.device.set_color(kwargs[ATTR_RGB_COLOR]) + if self.device.supports_color: + await self.device.set_color(kwargs[ATTR_RGB_COLOR]) else: await self.device.set_on() diff --git a/requirements_all.txt b/requirements_all.txt index e8bf58a61a9..09ada578e5e 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1268,7 +1268,7 @@ xbee-helper==0.0.7 xboxapi==0.1.1 # homeassistant.components.knx -xknx==0.8.3 +xknx==0.8.4 # homeassistant.components.media_player.bluesound # homeassistant.components.sensor.startca