Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/bluetooth/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"bluetooth-adapters==2.0.0",
"bluetooth-auto-recovery==1.5.2",
"bluetooth-data-tools==1.28.2",
"dbus-fast==2.43.0",
"dbus-fast==2.44.2",
"habluetooth==4.0.1"
]
}
10 changes: 5 additions & 5 deletions homeassistant/components/insteon/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
}
},
"hubv1": {
"title": "Insteon Hub Version 1",
"description": "Configure the Insteon Hub Version 1 (pre-2014).",
"title": "Insteon Hub version 1",
"description": "Configure the Insteon Hub version 1 (pre-2014).",
"data": {
"host": "[%key:common::config_flow::data::ip%]",
"port": "[%key:common::config_flow::data::port%]"
}
},
"hubv2": {
"title": "Insteon Hub Version 2",
"description": "Configure the Insteon Hub Version 2.",
"title": "Insteon Hub version 2",
"description": "Configure the Insteon Hub version 2.",
"data": {
"host": "[%key:common::config_flow::data::ip%]",
"port": "[%key:common::config_flow::data::port%]",
Expand Down Expand Up @@ -144,7 +144,7 @@
},
"reload": {
"name": "[%key:common::action::reload%]",
"description": "If enabled, all current records are cleared from memory (does not effect the device) and reloaded. Otherwise the existing records are left in place and only missing records are added."
"description": "If enabled, all current records are cleared from memory (does not affect the device) and reloaded. Otherwise the existing records are left in place and only missing records are added."
}
}
},
Expand Down
89 changes: 54 additions & 35 deletions homeassistant/components/knx/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from .knx_module import KNXModule
from .schema import LightSchema
from .storage.const import (
CONF_COLOR,
CONF_COLOR_TEMP_MAX,
CONF_COLOR_TEMP_MIN,
CONF_ENTITY,
Expand Down Expand Up @@ -223,7 +224,7 @@ def _create_ui_light(xknx: XKNX, knx_config: ConfigType, name: str) -> XknxLight
if _color_temp_dpt == ColorTempModes.ABSOLUTE_FLOAT.value:
color_temperature_type = ColorTemperatureType.FLOAT_2_BYTE

color_dpt = conf.get_dpt(CONF_GA_COLOR)
color_dpt = conf.get_dpt(CONF_COLOR, CONF_GA_COLOR)

return XknxLight(
xknx,
Expand All @@ -232,59 +233,77 @@ def _create_ui_light(xknx: XKNX, knx_config: ConfigType, name: str) -> XknxLight
group_address_switch_state=conf.get_state_and_passive(CONF_GA_SWITCH),
group_address_brightness=conf.get_write(CONF_GA_BRIGHTNESS),
group_address_brightness_state=conf.get_state_and_passive(CONF_GA_BRIGHTNESS),
group_address_color=conf.get_write(CONF_GA_COLOR)
if color_dpt == LightColorMode.RGB
else None,
group_address_color_state=conf.get_state_and_passive(CONF_GA_COLOR)
if color_dpt == LightColorMode.RGB
else None,
group_address_rgbw=conf.get_write(CONF_GA_COLOR)
if color_dpt == LightColorMode.RGBW
else None,
group_address_rgbw_state=conf.get_state_and_passive(CONF_GA_COLOR)
if color_dpt == LightColorMode.RGBW
else None,
group_address_hue=conf.get_write(CONF_GA_HUE),
group_address_hue_state=conf.get_state_and_passive(CONF_GA_HUE),
group_address_saturation=conf.get_write(CONF_GA_SATURATION),
group_address_saturation_state=conf.get_state_and_passive(CONF_GA_SATURATION),
group_address_xyy_color=conf.get_write(CONF_GA_COLOR)
if color_dpt == LightColorMode.XYY
else None,
group_address_xyy_color_state=conf.get_write(CONF_GA_COLOR)
if color_dpt == LightColorMode.XYY
else None,
group_address_color=(
conf.get_write(CONF_COLOR, CONF_GA_COLOR)
if color_dpt == LightColorMode.RGB
else None
),
group_address_color_state=(
conf.get_state_and_passive(CONF_COLOR, CONF_GA_COLOR)
if color_dpt == LightColorMode.RGB
else None
),
group_address_rgbw=(
conf.get_write(CONF_COLOR, CONF_GA_COLOR)
if color_dpt == LightColorMode.RGBW
else None
),
group_address_rgbw_state=(
conf.get_state_and_passive(CONF_COLOR, CONF_GA_COLOR)
if color_dpt == LightColorMode.RGBW
else None
),
group_address_hue=conf.get_write(CONF_COLOR, CONF_GA_HUE),
group_address_hue_state=conf.get_state_and_passive(CONF_COLOR, CONF_GA_HUE),
group_address_saturation=conf.get_write(CONF_COLOR, CONF_GA_SATURATION),
group_address_saturation_state=conf.get_state_and_passive(
CONF_COLOR, CONF_GA_SATURATION
),
group_address_xyy_color=(
conf.get_write(CONF_COLOR, CONF_GA_COLOR)
if color_dpt == LightColorMode.XYY
else None
),
group_address_xyy_color_state=(
conf.get_state_and_passive(CONF_COLOR, CONF_GA_COLOR)
if color_dpt == LightColorMode.XYY
else None
),
group_address_tunable_white=group_address_tunable_white,
group_address_tunable_white_state=group_address_tunable_white_state,
group_address_color_temperature=group_address_color_temp,
group_address_color_temperature_state=group_address_color_temp_state,
group_address_switch_red=conf.get_write(CONF_GA_RED_SWITCH),
group_address_switch_red_state=conf.get_state_and_passive(CONF_GA_RED_SWITCH),
group_address_brightness_red=conf.get_write(CONF_GA_RED_BRIGHTNESS),
group_address_switch_red=conf.get_write(CONF_COLOR, CONF_GA_RED_SWITCH),
group_address_switch_red_state=conf.get_state_and_passive(
CONF_COLOR, CONF_GA_RED_SWITCH
),
group_address_brightness_red=conf.get_write(CONF_COLOR, CONF_GA_RED_BRIGHTNESS),
group_address_brightness_red_state=conf.get_state_and_passive(
CONF_GA_RED_BRIGHTNESS
CONF_COLOR, CONF_GA_RED_BRIGHTNESS
),
group_address_switch_green=conf.get_write(CONF_GA_GREEN_SWITCH),
group_address_switch_green=conf.get_write(CONF_COLOR, CONF_GA_GREEN_SWITCH),
group_address_switch_green_state=conf.get_state_and_passive(
CONF_GA_GREEN_SWITCH
CONF_COLOR, CONF_GA_GREEN_SWITCH
),
group_address_brightness_green=conf.get_write(CONF_GA_GREEN_BRIGHTNESS),
group_address_brightness_green_state=conf.get_state_and_passive(
CONF_GA_GREEN_BRIGHTNESS
CONF_COLOR, CONF_GA_GREEN_BRIGHTNESS
),
group_address_switch_blue=conf.get_write(CONF_GA_BLUE_SWITCH),
group_address_switch_blue_state=conf.get_state_and_passive(CONF_GA_BLUE_SWITCH),
group_address_brightness_blue=conf.get_write(CONF_GA_BLUE_BRIGHTNESS),
group_address_brightness_blue_state=conf.get_state_and_passive(
CONF_GA_BLUE_BRIGHTNESS
CONF_COLOR, CONF_GA_BLUE_BRIGHTNESS
),
group_address_switch_white=conf.get_write(CONF_GA_WHITE_SWITCH),
group_address_switch_white=conf.get_write(CONF_COLOR, CONF_GA_WHITE_SWITCH),
group_address_switch_white_state=conf.get_state_and_passive(
CONF_GA_WHITE_SWITCH
CONF_COLOR, CONF_GA_WHITE_SWITCH
),
group_address_brightness_white=conf.get_write(
CONF_COLOR, CONF_GA_WHITE_BRIGHTNESS
),
group_address_brightness_white=conf.get_write(CONF_GA_WHITE_BRIGHTNESS),
group_address_brightness_white_state=conf.get_state_and_passive(
CONF_GA_WHITE_BRIGHTNESS
CONF_COLOR, CONF_GA_WHITE_BRIGHTNESS
),
color_temperature_type=color_temperature_type,
min_kelvin=knx_config[CONF_COLOR_TEMP_MIN],
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/knx/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"requirements": [
"xknx==3.8.0",
"xknxproject==3.8.2",
"knx-frontend==2025.4.1.91934"
"knx-frontend==2025.6.13.181749"
],
"single_config_entry": true
}
19 changes: 17 additions & 2 deletions homeassistant/components/knx/storage/config_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@

from ..const import DOMAIN
from .const import CONF_DATA
from .migration import migrate_1_to_2

_LOGGER = logging.getLogger(__name__)

STORAGE_VERSION: Final = 1
STORAGE_VERSION: Final = 2
STORAGE_KEY: Final = f"{DOMAIN}/config_store.json"

type KNXPlatformStoreModel = dict[str, dict[str, Any]] # unique_id: configuration
Expand Down Expand Up @@ -45,6 +46,20 @@ async def update_entity(
"""Update an existing entities configuration."""


class _KNXConfigStoreStorage(Store[KNXConfigStoreModel]):
"""Storage handler for KNXConfigStore."""

async def _async_migrate_func(
self, old_major_version: int, old_minor_version: int, old_data: dict[str, Any]
) -> dict[str, Any]:
"""Migrate to the new version."""
if old_major_version == 1:
# version 2 introduced in 2025.8
migrate_1_to_2(old_data)

return old_data


class KNXConfigStore:
"""Manage KNX config store data."""

Expand All @@ -56,7 +71,7 @@ def __init__(
"""Initialize config store."""
self.hass = hass
self.config_entry = config_entry
self._store = Store[KNXConfigStoreModel](hass, STORAGE_VERSION, STORAGE_KEY)
self._store = _KNXConfigStoreStorage(hass, STORAGE_VERSION, STORAGE_KEY)
self.data = KNXConfigStoreModel(entities={})
self._platform_controllers: dict[Platform, PlatformControllerBase] = {}

Expand Down
21 changes: 14 additions & 7 deletions homeassistant/components/knx/storage/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from typing import Final

# Common
CONF_DATA: Final = "data"
CONF_ENTITY: Final = "entity"
CONF_DEVICE_INFO: Final = "device_info"
Expand All @@ -12,10 +13,22 @@

CONF_GA_SENSOR: Final = "ga_sensor"
CONF_GA_SWITCH: Final = "ga_switch"
CONF_GA_COLOR_TEMP: Final = "ga_color_temp"

# Cover
CONF_GA_UP_DOWN: Final = "ga_up_down"
CONF_GA_STOP: Final = "ga_stop"
CONF_GA_STEP: Final = "ga_step"
CONF_GA_POSITION_SET: Final = "ga_position_set"
CONF_GA_POSITION_STATE: Final = "ga_position_state"
CONF_GA_ANGLE: Final = "ga_angle"

# Light
CONF_COLOR_TEMP_MIN: Final = "color_temp_min"
CONF_COLOR_TEMP_MAX: Final = "color_temp_max"
CONF_GA_BRIGHTNESS: Final = "ga_brightness"
CONF_GA_COLOR_TEMP: Final = "ga_color_temp"
# Light/color
CONF_COLOR: Final = "color"
CONF_GA_COLOR: Final = "ga_color"
CONF_GA_RED_BRIGHTNESS: Final = "ga_red_brightness"
CONF_GA_RED_SWITCH: Final = "ga_red_switch"
Expand All @@ -27,9 +40,3 @@
CONF_GA_WHITE_SWITCH: Final = "ga_white_switch"
CONF_GA_HUE: Final = "ga_hue"
CONF_GA_SATURATION: Final = "ga_saturation"
CONF_GA_UP_DOWN: Final = "ga_up_down"
CONF_GA_STOP: Final = "ga_stop"
CONF_GA_STEP: Final = "ga_step"
CONF_GA_POSITION_SET: Final = "ga_position_set"
CONF_GA_POSITION_STATE: Final = "ga_position_state"
CONF_GA_ANGLE: Final = "ga_angle"
Loading
Loading