Update KNX component to xknx 0.11 (#24738)
* update component for xknx 0.11.0 - expose sensor state is not casted to float anymore - climate mode operation list has no more None values - light supports white_value (rgbw) - sensor expects `group_address_state` now instead of `group_address` - sensor forwards device_class if available * update manifest to use xknx 0.11.0 * update requirements_all for xknx 0.11.0 * update for xknx 0.11.1 - require xknx 0.11.1 - use 'state_address' instead of 'address' in sensor and binary_sensor configuration - optional 'sync_state' for sensors and binary_sensors * remove questionable `del kwargs`
This commit is contained in:
1 parent
78a5dc71ac
commit
e299d7b3d6
11 files changed
+108
-66
No files matched your search
@@ -36,12 +36,12 @@ ATTR_DISCOVER_DEVICES = 'devices'
|
||||
|
||||
TUNNELING_SCHEMA = vol.Schema({
|
||||
vol.Required(CONF_HOST): cv.string,
|
||||
vol.Required(CONF_KNX_LOCAL_IP): cv.string,
|
||||
vol.Optional(CONF_KNX_LOCAL_IP): cv.string,
|
||||
vol.Optional(CONF_PORT): cv.port,
|
||||
})
|
||||
|
||||
ROUTING_SCHEMA = vol.Schema({
|
||||
vol.Required(CONF_KNX_LOCAL_IP): cv.string,
|
||||
vol.Optional(CONF_KNX_LOCAL_IP): cv.string,
|
||||
})
|
||||
|
||||
EXPOSE_SCHEMA = vol.Schema({
|
||||
@@ -333,4 +333,13 @@ class KNXExposeSensor:
|
||||
"""Handle entity change."""
|
||||
if new_state is None:
|
||||
return
|
||||
await self.device.set(float(new_state.state))
|
||||
if new_state.state == "unknown":
|
||||
return
|
||||
|
||||
if self.type == 'binary':
|
||||
if new_state.state == "on":
|
||||
await self.device.set(True)
|
||||
elif new_state.state == "off":
|
||||
await self.device.set(False)
|
||||
else:
|
||||
await self.device.set(new_state.state)
|
||||
Reference in new issue
Block a user