mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Update xknx to version 0.18.5 (#51644)
* xknx 0.18.5 * fix integer DPTs trying to cast str state with `int()` * Delint Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
d3a4e21cb5
commit
6e20edc30c
@ -5,6 +5,8 @@ from typing import Callable
|
||||
|
||||
from xknx import XKNX
|
||||
from xknx.devices import DateTime, ExposeSensor
|
||||
from xknx.dpt import DPTNumeric
|
||||
from xknx.remote_value import RemoteValueSensor
|
||||
|
||||
from homeassistant.const import (
|
||||
CONF_ENTITY_ID,
|
||||
@ -122,9 +124,15 @@ class KNXExposeSensor:
|
||||
)
|
||||
if self.type == "binary":
|
||||
if value in (1, STATE_ON, "True"):
|
||||
value = True
|
||||
elif value in (0, STATE_OFF, "False"):
|
||||
value = False
|
||||
return True
|
||||
if value in (0, STATE_OFF, "False"):
|
||||
return False
|
||||
if (
|
||||
value is not None
|
||||
and isinstance(self.device.sensor_value, RemoteValueSensor)
|
||||
and issubclass(self.device.sensor_value.dpt_class, DPTNumeric)
|
||||
):
|
||||
return float(value)
|
||||
return value
|
||||
|
||||
async def _async_entity_changed(self, event: Event) -> None:
|
||||
|
@ -2,7 +2,7 @@
|
||||
"domain": "knx",
|
||||
"name": "KNX",
|
||||
"documentation": "https://www.home-assistant.io/integrations/knx",
|
||||
"requirements": ["xknx==0.18.4"],
|
||||
"requirements": ["xknx==0.18.5"],
|
||||
"codeowners": ["@Julius2342", "@farmio", "@marvin-w"],
|
||||
"quality_scale": "silver",
|
||||
"iot_class": "local_push"
|
||||
|
@ -2377,7 +2377,7 @@ xbox-webapi==2.0.11
|
||||
xboxapi==2.0.1
|
||||
|
||||
# homeassistant.components.knx
|
||||
xknx==0.18.4
|
||||
xknx==0.18.5
|
||||
|
||||
# homeassistant.components.bluesound
|
||||
# homeassistant.components.rest
|
||||
|
@ -1286,7 +1286,7 @@ wolf_smartset==0.1.8
|
||||
xbox-webapi==2.0.11
|
||||
|
||||
# homeassistant.components.knx
|
||||
xknx==0.18.4
|
||||
xknx==0.18.5
|
||||
|
||||
# homeassistant.components.bluesound
|
||||
# homeassistant.components.rest
|
||||
|
Loading…
x
Reference in New Issue
Block a user