mirror of
https://github.com/bahmcloud/HA-KNX-Bridge.git
synced 2026-04-06 16:51:14 +00:00
Fix light color temperature decoding
This commit is contained in:
3
.idea/PROJECT_STATE.md
generated
3
.idea/PROJECT_STATE.md
generated
@@ -41,7 +41,8 @@ Completed:
|
|||||||
- Light port support added with full KNX color/temperature mappings and individual color channels.
|
- Light port support added with full KNX color/temperature mappings and individual color channels.
|
||||||
- Light port keys renamed to avoid conflicts; outgoing updates now only target light state addresses.
|
- Light port keys renamed to avoid conflicts; outgoing updates now only target light state addresses.
|
||||||
- Light port optional relative dimming address (DPT 3.007) added.
|
- Light port optional relative dimming address (DPT 3.007) added.
|
||||||
- Project version set to 0.0.23 and `CHANGELOG.md` maintained.
|
- Light color temperature event type mapping and relative dimming decoding fixed.
|
||||||
|
- Project version set to 0.0.24 and `CHANGELOG.md` maintained.
|
||||||
|
|
||||||
Files created:
|
Files created:
|
||||||
- `custom_components/ha_knx_bridge/__init__.py`
|
- `custom_components/ha_knx_bridge/__init__.py`
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.0.24 - 2026-02-15
|
||||||
|
- Fix light color temperature event type mapping and improve relative dimming decoding.
|
||||||
|
|
||||||
## 0.0.23 - 2026-02-15
|
## 0.0.23 - 2026-02-15
|
||||||
- Add optional light relative dimming address (DPT 3.007).
|
- Add optional light relative dimming address (DPT 3.007).
|
||||||
|
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ Only state addresses expose an `invert outgoing` toggle to flip KNX payloads.
|
|||||||
Notes:
|
Notes:
|
||||||
- For XY color, the bridge sends the brightness as the Y (luminance) component.
|
- For XY color, the bridge sends the brightness as the Y (luminance) component.
|
||||||
- Relative dimming (DPT 3.007) maps KNX step values to `brightness_step_pct` in Home Assistant.
|
- Relative dimming (DPT 3.007) maps KNX step values to `brightness_step_pct` in Home Assistant.
|
||||||
|
- Color temperature mode must match the KNX telegram DPT: `relative` for 5.001, `absolute` for 7.600, `absolute_float` for DPT 9.
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
- For DPT 1.008 (Up/Down), the bridge treats `0 = Up/Open` and `1 = Down/Close`.
|
- For DPT 1.008 (Up/Down), the bridge treats `0 = Up/Open` and `1 = Down/Close`.
|
||||||
@@ -107,5 +108,5 @@ Notes:
|
|||||||
- Advanced DPT mapping options and inversion settings.
|
- Advanced DPT mapping options and inversion settings.
|
||||||
|
|
||||||
## Versioning and Releases
|
## Versioning and Releases
|
||||||
- Current version: 0.0.23
|
- Current version: 0.0.24
|
||||||
- `CHANGELOG.md` lists versions with the newest entries at the top.
|
- `CHANGELOG.md` lists versions with the newest entries at the top.
|
||||||
|
|||||||
@@ -1612,9 +1612,9 @@ def _light_color_temperature_event_type(mode: str) -> str | None:
|
|||||||
if mode == "relative":
|
if mode == "relative":
|
||||||
return "percent"
|
return "percent"
|
||||||
if mode == "absolute":
|
if mode == "absolute":
|
||||||
return "7.600"
|
return "2byte_unsigned"
|
||||||
if mode == "absolute_float":
|
if mode == "absolute_float":
|
||||||
return "9"
|
return "2byte_float"
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
@@ -1668,8 +1668,7 @@ def _light_uses_white_channel(port: LightPort) -> bool:
|
|||||||
|
|
||||||
|
|
||||||
def _relative_dimming_step(value: int) -> tuple[str, int] | None:
|
def _relative_dimming_step(value: int) -> tuple[str, int] | None:
|
||||||
if value < 0 or value > 15:
|
value = value & 0x0F
|
||||||
return None
|
|
||||||
if value == 0 or value == 8:
|
if value == 0 or value == 8:
|
||||||
return None
|
return None
|
||||||
if value <= 7:
|
if value <= 7:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"domain": "ha_knx_bridge",
|
"domain": "ha_knx_bridge",
|
||||||
"name": "HA KNX Bridge",
|
"name": "HA KNX Bridge",
|
||||||
"version": "0.0.23",
|
"version": "0.0.24",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://github.com/bahmcloud/HA-KNX-Bridge",
|
"documentation": "https://github.com/bahmcloud/HA-KNX-Bridge",
|
||||||
"issue_tracker": "https://github.com/bahmcloud/HA-KNX-Bridge/issues",
|
"issue_tracker": "https://github.com/bahmcloud/HA-KNX-Bridge/issues",
|
||||||
|
|||||||
Reference in New Issue
Block a user