Bumped (minor) version of xknx within knx-component. This fixes a bug with inverted percentage within sensors. (#12929)
This commit is contained in:
parent
05204a982e
commit
13cb9cb07b
3 changed files with 11 additions and 9 deletions
|
@ -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"
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue