Compare commits

...

1 Commits

Author SHA1 Message Date
jbouwh
8e5a0cdacd Move translabale URL out of strings.json for knx integration 2025-10-27 07:53:09 +00:00
2 changed files with 10 additions and 3 deletions

View File

@@ -39,6 +39,10 @@ if TYPE_CHECKING:
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
_DESCRIPTION_PLACEHOLDERS = {
"sensor_value_types_url": "https://www.home-assistant.io/integrations/knx/#value-types"
}
@callback @callback
def async_setup_services(hass: HomeAssistant) -> None: def async_setup_services(hass: HomeAssistant) -> None:
@@ -48,6 +52,7 @@ def async_setup_services(hass: HomeAssistant) -> None:
SERVICE_KNX_SEND, SERVICE_KNX_SEND,
service_send_to_knx_bus, service_send_to_knx_bus,
schema=SERVICE_KNX_SEND_SCHEMA, schema=SERVICE_KNX_SEND_SCHEMA,
description_placeholders=_DESCRIPTION_PLACEHOLDERS,
) )
hass.services.async_register( hass.services.async_register(
@@ -63,6 +68,7 @@ def async_setup_services(hass: HomeAssistant) -> None:
SERVICE_KNX_EVENT_REGISTER, SERVICE_KNX_EVENT_REGISTER,
service_event_register_modify, service_event_register_modify,
schema=SERVICE_KNX_EVENT_REGISTER_SCHEMA, schema=SERVICE_KNX_EVENT_REGISTER_SCHEMA,
description_placeholders=_DESCRIPTION_PLACEHOLDERS,
) )
async_register_admin_service( async_register_admin_service(
@@ -71,6 +77,7 @@ def async_setup_services(hass: HomeAssistant) -> None:
SERVICE_KNX_EXPOSURE_REGISTER, SERVICE_KNX_EXPOSURE_REGISTER,
service_exposure_register_modify, service_exposure_register_modify,
schema=SERVICE_KNX_EXPOSURE_REGISTER_SCHEMA, schema=SERVICE_KNX_EXPOSURE_REGISTER_SCHEMA,
description_placeholders=_DESCRIPTION_PLACEHOLDERS,
) )
async_register_admin_service( async_register_admin_service(

View File

@@ -269,7 +269,7 @@
}, },
"type": { "type": {
"name": "Value type", "name": "Value type",
"description": "If set, the payload will not be sent as raw bytes, but encoded as given DPT. KNX sensor types are valid values (see https://www.home-assistant.io/integrations/knx/#value-types)." "description": "If set, the payload will not be sent as raw bytes, but encoded as given DPT. KNX sensor types are valid values (see {sensor_value_types_url})."
}, },
"response": { "response": {
"name": "Send as Response", "name": "Send as Response",
@@ -297,7 +297,7 @@
}, },
"type": { "type": {
"name": "Value type", "name": "Value type",
"description": "If set, the payload will be decoded as given DPT in the event data `value` key. KNX sensor types are valid values (see https://www.home-assistant.io/integrations/knx/#value-types)." "description": "If set, the payload will be decoded as given DPT in the event data `value` key. KNX sensor types are valid values (see {sensor_value_types_url})."
}, },
"remove": { "remove": {
"name": "Remove event registration", "name": "Remove event registration",
@@ -315,7 +315,7 @@
}, },
"type": { "type": {
"name": "Value type", "name": "Value type",
"description": "Telegrams will be encoded as given DPT. 'binary' and all KNX sensor types are valid values (see https://www.home-assistant.io/integrations/knx/#value-types)." "description": "Telegrams will be encoded as given DPT. 'binary' and all KNX sensor types are valid values (see {sensor_value_types_url})."
}, },
"entity_id": { "entity_id": {
"name": "Entity", "name": "Entity",