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/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.8.21.181525"
"knx-frontend==2025.8.24.205840"
],
"single_config_entry": true
}
25 changes: 13 additions & 12 deletions homeassistant/components/knx/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from homeassistant.helpers.typing import UNDEFINED
from homeassistant.util.ulid import ulid_now

from .const import DOMAIN, KNX_MODULE_KEY
from .const import DOMAIN, KNX_MODULE_KEY, SUPPORTED_PLATFORMS_UI
from .storage.config_store import ConfigStoreException
from .storage.const import CONF_DATA
from .storage.entity_store_schema import (
Expand All @@ -44,7 +44,7 @@

async def register_panel(hass: HomeAssistant) -> None:
"""Register the KNX Panel and Websocket API."""
websocket_api.async_register_command(hass, ws_info)
websocket_api.async_register_command(hass, ws_get_base_data)
websocket_api.async_register_command(hass, ws_project_file_process)
websocket_api.async_register_command(hass, ws_project_file_remove)
websocket_api.async_register_command(hass, ws_group_monitor_info)
Expand Down Expand Up @@ -156,12 +156,12 @@ def with_knx(
@websocket_api.require_admin
@websocket_api.websocket_command(
{
vol.Required("type"): "knx/info",
vol.Required("type"): "knx/get_base_data",
}
)
@provide_knx
@callback
def ws_info(
def ws_get_base_data(
hass: HomeAssistant,
knx: KNXModule,
connection: websocket_api.ActiveConnection,
Expand All @@ -176,14 +176,18 @@ def ws_info(
"tool_version": project_info["tool_version"],
"xknxproject_version": project_info["xknxproject_version"],
}
connection_info = {
"version": knx.xknx.version,
"connected": knx.xknx.connection_manager.connected.is_set(),
"current_address": str(knx.xknx.current_address),
}

connection.send_result(
msg["id"],
{
"version": knx.xknx.version,
"connected": knx.xknx.connection_manager.connected.is_set(),
"current_address": str(knx.xknx.current_address),
"project": _project_info,
"connection_info": connection_info,
"project_info": _project_info,
"supported_platforms": sorted(SUPPORTED_PLATFORMS_UI),
},
)

Expand All @@ -206,10 +210,7 @@ async def ws_get_knx_project(
knxproject = await knx.project.get_knxproject()
connection.send_result(
msg["id"],
{
"project_loaded": knx.project.loaded,
"knxproject": knxproject,
},
knxproject,
)


Expand Down
3 changes: 3 additions & 0 deletions homeassistant/components/lg_thinq/icons.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
},
"display_light": {
"default": "mdi:lightbulb-on-outline"
},
"air_clean_operation_mode": {
"default": "mdi:air-filter"
}
},
"binary_sensor": {
Expand Down
3 changes: 3 additions & 0 deletions homeassistant/components/lg_thinq/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@
},
"display_light": {
"name": "Lighting"
},
"air_clean_operation_mode": {
"name": "[%key:component::lg_thinq::entity::climate::climate_air_conditioner::state_attributes::preset_mode::state::air_clean%]"
}
},
"binary_sensor": {
Expand Down
47 changes: 46 additions & 1 deletion homeassistant/components/lg_thinq/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ class ThinQSwitchEntityDescription(SwitchEntityDescription):
off_key: str | None = None


DRYER_OPERATION_SWITCH_DESC = ThinQSwitchEntityDescription(
key=ThinQProperty.DRYER_OPERATION_MODE, translation_key="operation_power"
)

WASHER_OPERATION_SWITCH_DESC = ThinQSwitchEntityDescription(
key=ThinQProperty.WASHER_OPERATION_MODE, translation_key="operation_power"
)


DEVICE_TYPE_SWITCH_MAP: dict[DeviceType, tuple[ThinQSwitchEntityDescription, ...]] = {
DeviceType.AIR_CONDITIONER: (
ThinQSwitchEntityDescription(
Expand All @@ -52,6 +61,13 @@ class ThinQSwitchEntityDescription(SwitchEntityDescription):
off_key="false",
entity_category=EntityCategory.CONFIG,
),
ThinQSwitchEntityDescription(
key=ThinQProperty.AIR_CLEAN_OPERATION_MODE,
translation_key=ThinQProperty.AIR_CLEAN_OPERATION_MODE,
on_key="on",
off_key="off",
entity_category=EntityCategory.CONFIG,
),
),
DeviceType.AIR_PURIFIER_FAN: (
ThinQSwitchEntityDescription(
Expand Down Expand Up @@ -84,6 +100,13 @@ class ThinQSwitchEntityDescription(SwitchEntityDescription):
translation_key="operation_power",
),
),
DeviceType.DISH_WASHER: (
ThinQSwitchEntityDescription(
key=ThinQProperty.DISH_WASHER_OPERATION_MODE,
translation_key="operation_power",
),
),
DeviceType.DRYER: (DRYER_OPERATION_SWITCH_DESC,),
DeviceType.HUMIDIFIER: (
ThinQSwitchEntityDescription(
key=ThinQProperty.HUMIDIFIER_OPERATION_MODE,
Expand Down Expand Up @@ -155,6 +178,27 @@ class ThinQSwitchEntityDescription(SwitchEntityDescription):
entity_category=EntityCategory.CONFIG,
),
),
DeviceType.STYLER: (
ThinQSwitchEntityDescription(
key=ThinQProperty.STYLER_OPERATION_MODE, translation_key="operation_power"
),
),
DeviceType.VENTILATOR: (
ThinQSwitchEntityDescription(
key=ThinQProperty.VENTILATOR_OPERATION_MODE,
translation_key="operation_power",
entity_category=EntityCategory.CONFIG,
),
),
DeviceType.WASHCOMBO_MAIN: (WASHER_OPERATION_SWITCH_DESC,),
DeviceType.WASHCOMBO_MINI: (WASHER_OPERATION_SWITCH_DESC,),
DeviceType.WASHER: (WASHER_OPERATION_SWITCH_DESC,),
DeviceType.WASHTOWER: (
DRYER_OPERATION_SWITCH_DESC,
WASHER_OPERATION_SWITCH_DESC,
),
DeviceType.WASHTOWER_DRYER: (DRYER_OPERATION_SWITCH_DESC,),
DeviceType.WASHTOWER_WASHER: (WASHER_OPERATION_SWITCH_DESC,),
DeviceType.WINE_CELLAR: (
ThinQSwitchEntityDescription(
key=ThinQProperty.OPTIMAL_HUMIDITY,
Expand Down Expand Up @@ -186,7 +230,8 @@ async def async_setup_entry(
entities.extend(
ThinQSwitchEntity(coordinator, description, property_id)
for property_id in coordinator.api.get_active_idx(
description.key, ActiveMode.READ_WRITE
description.key,
ActiveMode.WRITABLE,
)
)

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/schedule/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def _get_suggested_id(self, info: dict) -> str:
async def _update_data(self, item: dict, update_data: dict) -> dict:
"""Return a new updated data object."""
self.SCHEMA(update_data)
return item | update_data
return {CONF_ID: item[CONF_ID]} | update_data

async def _async_load_data(self) -> SerializedStorageCollection | None:
"""Load the data."""
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/switchbot/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@
"iot_class": "local_push",
"loggers": ["switchbot"],
"quality_scale": "gold",
"requirements": ["PySwitchbot==0.68.4"]
"requirements": ["PySwitchbot==0.69.0"]
}
5 changes: 5 additions & 0 deletions homeassistant/components/template/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
)
from homeassistant.components.button import DOMAIN as DOMAIN_BUTTON
from homeassistant.components.cover import DOMAIN as DOMAIN_COVER
from homeassistant.components.event import DOMAIN as DOMAIN_EVENT
from homeassistant.components.fan import DOMAIN as DOMAIN_FAN
from homeassistant.components.image import DOMAIN as DOMAIN_IMAGE
from homeassistant.components.light import DOMAIN as DOMAIN_LIGHT
Expand Down Expand Up @@ -53,6 +54,7 @@
binary_sensor as binary_sensor_platform,
button as button_platform,
cover as cover_platform,
event as event_platform,
fan as fan_platform,
image as image_platform,
light as light_platform,
Expand Down Expand Up @@ -124,6 +126,9 @@ def _backward_compat_schema(value: Any | None) -> Any:
vol.Optional(DOMAIN_COVER): vol.All(
cv.ensure_list, [cover_platform.COVER_YAML_SCHEMA]
),
vol.Optional(DOMAIN_EVENT): vol.All(
cv.ensure_list, [event_platform.EVENT_YAML_SCHEMA]
),
vol.Optional(DOMAIN_FAN): vol.All(
cv.ensure_list, [fan_platform.FAN_YAML_SCHEMA]
),
Expand Down
32 changes: 32 additions & 0 deletions homeassistant/components/template/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
from homeassistant.components.button import ButtonDeviceClass
from homeassistant.components.cover import CoverDeviceClass
from homeassistant.components.event import EventDeviceClass
from homeassistant.components.sensor import (
CONF_STATE_CLASS,
DEVICE_CLASS_STATE_CLASSES,
Expand Down Expand Up @@ -72,6 +73,7 @@
STOP_ACTION,
async_create_preview_cover,
)
from .event import CONF_EVENT_TYPE, CONF_EVENT_TYPES, async_create_preview_event
from .fan import (
CONF_OFF_ACTION,
CONF_ON_ACTION,
Expand Down Expand Up @@ -203,6 +205,24 @@ def generate_schema(domain: str, flow_type: str) -> vol.Schema:
)
}

if domain == Platform.EVENT:
schema |= {
vol.Required(CONF_EVENT_TYPE): selector.TemplateSelector(),
vol.Required(CONF_EVENT_TYPES): selector.TemplateSelector(),
}

if flow_type == "config":
schema |= {
vol.Optional(CONF_DEVICE_CLASS): selector.SelectSelector(
selector.SelectSelectorConfig(
options=[cls.value for cls in EventDeviceClass],
mode=selector.SelectSelectorMode.DROPDOWN,
translation_key="event_device_class",
sort=True,
),
)
}

if domain == Platform.FAN:
schema |= _SCHEMA_STATE | {
vol.Required(CONF_ON_ACTION): selector.ActionSelector(),
Expand Down Expand Up @@ -441,6 +461,7 @@ async def _validate_user_input(
Platform.BINARY_SENSOR,
Platform.BUTTON,
Platform.COVER,
Platform.EVENT,
Platform.FAN,
Platform.IMAGE,
Platform.LIGHT,
Expand Down Expand Up @@ -473,6 +494,11 @@ async def _validate_user_input(
preview="template",
validate_user_input=validate_user_input(Platform.COVER),
),
Platform.EVENT: SchemaFlowFormStep(
config_schema(Platform.EVENT),
preview="template",
validate_user_input=validate_user_input(Platform.EVENT),
),
Platform.FAN: SchemaFlowFormStep(
config_schema(Platform.FAN),
preview="template",
Expand Down Expand Up @@ -542,6 +568,11 @@ async def _validate_user_input(
preview="template",
validate_user_input=validate_user_input(Platform.COVER),
),
Platform.EVENT: SchemaFlowFormStep(
options_schema(Platform.EVENT),
preview="template",
validate_user_input=validate_user_input(Platform.EVENT),
),
Platform.FAN: SchemaFlowFormStep(
options_schema(Platform.FAN),
preview="template",
Expand Down Expand Up @@ -596,6 +627,7 @@ async def _validate_user_input(
Platform.ALARM_CONTROL_PANEL: async_create_preview_alarm_control_panel,
Platform.BINARY_SENSOR: async_create_preview_binary_sensor,
Platform.COVER: async_create_preview_cover,
Platform.EVENT: async_create_preview_event,
Platform.FAN: async_create_preview_fan,
Platform.LIGHT: async_create_preview_light,
Platform.LOCK: async_create_preview_lock,
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/template/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
Platform.BINARY_SENSOR,
Platform.BUTTON,
Platform.COVER,
Platform.EVENT,
Platform.FAN,
Platform.IMAGE,
Platform.LIGHT,
Expand Down
Loading
Loading