update xknx to 0.15.4 (#43536)

This commit is contained in:
Matthias Alphart 2020-11-24 22:58:17 +01:00 committed by GitHub
parent 48d9f1a61b
commit 7f9a7791bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 2 deletions

View File

@ -5,6 +5,7 @@ from homeassistant.components.cover import (
ATTR_POSITION,
ATTR_TILT_POSITION,
DEVICE_CLASS_BLIND,
DEVICE_CLASSES,
SUPPORT_CLOSE,
SUPPORT_OPEN,
SUPPORT_SET_POSITION,
@ -47,6 +48,8 @@ class KNXCover(KnxEntity, CoverEntity):
@property
def device_class(self):
"""Return the class of this device, from component DEVICE_CLASSES."""
if self._device.device_class in DEVICE_CLASSES:
return self._device.device_class
if self._device.supports_angle:
return DEVICE_CLASS_BLIND
return None

View File

@ -82,6 +82,7 @@ def _create_cover(knx_module: XKNX, config: ConfigType) -> XknxCover:
travel_time_up=config[CoverSchema.CONF_TRAVELLING_TIME_UP],
invert_position=config[CoverSchema.CONF_INVERT_POSITION],
invert_angle=config[CoverSchema.CONF_INVERT_ANGLE],
device_class=config.get(CONF_DEVICE_CLASS),
)

View File

@ -2,7 +2,7 @@
"domain": "knx",
"name": "KNX",
"documentation": "https://www.home-assistant.io/integrations/knx",
"requirements": ["xknx==0.15.3"],
"requirements": ["xknx==0.15.4"],
"codeowners": ["@Julius2342", "@farmio", "@marvin-w"],
"quality_scale": "silver"
}

View File

@ -77,6 +77,7 @@ class CoverSchema:
): cv.positive_int,
vol.Optional(CONF_INVERT_POSITION, default=False): cv.boolean,
vol.Optional(CONF_INVERT_ANGLE, default=False): cv.boolean,
vol.Optional(CONF_DEVICE_CLASS): cv.string,
}
)

View File

@ -2307,7 +2307,7 @@ xboxapi==2.0.1
xfinity-gateway==0.0.4
# homeassistant.components.knx
xknx==0.15.3
xknx==0.15.4
# homeassistant.components.bluesound
# homeassistant.components.rest