mirror of
https://github.com/bahmcloud/HA-KNX-Bridge.git
synced 2026-04-06 16:51:14 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 44de824041 | |||
| 6ce60029a1 |
@@ -1,5 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## 0.0.16 - 2026-02-13
|
||||
- Normalize incoming event destinations and clamp percent payloads even without inversion.
|
||||
|
||||
## 0.0.15 - 2026-02-13
|
||||
- Remove unsupported `payload_length` field from KNX send calls.
|
||||
|
||||
## 0.0.14 - 2026-02-13
|
||||
- Improve KNX event decoding for cover commands and address the up/down mapping.
|
||||
|
||||
|
||||
@@ -67,6 +67,6 @@ Each group address has `invert incoming` and `invert outgoing` toggles to flip K
|
||||
- Advanced DPT mapping options and inversion settings.
|
||||
|
||||
## Versioning and Releases
|
||||
- Current version: 0.0.14
|
||||
- Current version: 0.0.16
|
||||
- `CHANGELOG.md` lists versions with the newest entries at the top.
|
||||
- Release creation is manual and only done when explicitly requested.
|
||||
|
||||
@@ -482,11 +482,7 @@ class BridgeManager:
|
||||
if direction is not None and not str(direction).lower().startswith("incoming"):
|
||||
return
|
||||
|
||||
destination = (
|
||||
event.data.get("destination")
|
||||
or event.data.get("destination_address")
|
||||
or event.data.get("address")
|
||||
)
|
||||
destination = _event_destination(event)
|
||||
if not destination:
|
||||
return
|
||||
|
||||
@@ -502,9 +498,8 @@ class BridgeManager:
|
||||
value = _extract_event_value(event)
|
||||
if value is None:
|
||||
return
|
||||
value = _invert_value(
|
||||
value, event.data.get("destination"), self._address_options, "incoming"
|
||||
)
|
||||
destination = _event_destination(event)
|
||||
value = _invert_value(value, destination, self._address_options, "incoming")
|
||||
|
||||
if action == "move_long":
|
||||
if value == 0:
|
||||
@@ -530,9 +525,8 @@ class BridgeManager:
|
||||
value = _extract_event_value(event)
|
||||
if value is None:
|
||||
return
|
||||
value = _invert_value(
|
||||
value, event.data.get("destination"), self._address_options, "incoming"
|
||||
)
|
||||
destination = _event_destination(event)
|
||||
value = _invert_value(value, destination, self._address_options, "incoming")
|
||||
if value == 0:
|
||||
await self._call_switch_service(port.entity_id, "turn_off")
|
||||
elif value == 1:
|
||||
@@ -564,7 +558,7 @@ class BridgeManager:
|
||||
await self.hass.services.async_call(
|
||||
KNX_DOMAIN,
|
||||
"send",
|
||||
{"address": address, "payload": payload, "payload_length": 0},
|
||||
{"address": address, "payload": payload},
|
||||
blocking=False,
|
||||
)
|
||||
|
||||
@@ -624,6 +618,8 @@ def _invert_value(
|
||||
options = address_options.get(address)
|
||||
if options is None:
|
||||
return value
|
||||
if options.value_type == "percent":
|
||||
value = _clamp_percent(value)
|
||||
if direction == "incoming":
|
||||
if not options.invert_incoming:
|
||||
return value
|
||||
@@ -631,7 +627,6 @@ def _invert_value(
|
||||
if not options.invert_outgoing:
|
||||
return value
|
||||
if options.value_type == "percent":
|
||||
value = _clamp_percent(value)
|
||||
return 100 - value
|
||||
if value not in (0, 1):
|
||||
return value
|
||||
@@ -680,6 +675,14 @@ def _map_scalar_value(value: Any) -> int | None:
|
||||
return None
|
||||
|
||||
|
||||
def _event_destination(event: Event) -> str | None:
|
||||
return (
|
||||
event.data.get("destination")
|
||||
or event.data.get("destination_address")
|
||||
or event.data.get("address")
|
||||
)
|
||||
|
||||
|
||||
def _iter_port_configs(entry: ConfigEntry) -> list[tuple[str, dict[str, Any]]]:
|
||||
ports: list[tuple[str, dict[str, Any]]] = []
|
||||
subentries = getattr(entry, "subentries", [])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"domain": "ha_knx_bridge",
|
||||
"name": "HA KNX Bridge",
|
||||
"version": "0.0.14",
|
||||
"version": "0.0.16",
|
||||
"config_flow": true,
|
||||
"documentation": "https://github.com/bahmcloud/HA-KNX-Bridge",
|
||||
"issue_tracker": "https://github.com/bahmcloud/HA-KNX-Bridge/issues",
|
||||
|
||||
Reference in New Issue
Block a user