diff --git a/custom_components/hunterdouglas_powerview_ble/config_flow.py b/custom_components/hunterdouglas_powerview_ble/config_flow.py index cac7dc8..6c88d50 100644 --- a/custom_components/hunterdouglas_powerview_ble/config_flow.py +++ b/custom_components/hunterdouglas_powerview_ble/config_flow.py @@ -144,18 +144,18 @@ _HOMEKEY_SCHEMA = vol.Schema( vol.Required("key_method", default="hub"): SelectSelector( SelectSelectorConfig( options=[ - { - "value": "hub", - "label": "Fetch automatically from PowerView hub", - }, - { - "value": "manual", - "label": "Enter key manually (32 hex characters)", - }, - { - "value": "skip", - "label": "Skip (no key — controls disabled for encrypted shades)", - }, + SelectOptionDict( + value="hub", + label="Fetch automatically from PowerView hub", + ), + SelectOptionDict( + value="manual", + label="Enter key manually (32 hex characters)", + ), + SelectOptionDict( + value="skip", + label="Skip (no key — controls disabled for encrypted shades)", + ), ] ) ), @@ -333,7 +333,10 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): step_id="homekey_bluetooth", data_schema=_HOMEKEY_SCHEMA, errors=errors, - description_placeholders={"name": self._device_name}, + description_placeholders={ + "name": self._device_name, + "hub_url_example": "http://powerview-g3.local", + }, ) def _existing_entry_value(self, key: str) -> str: @@ -557,4 +560,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): step_id="homekey", data_schema=_HOMEKEY_SCHEMA, errors=errors, + description_placeholders={ + "hub_url_example": "http://powerview-g3.local", + }, ) diff --git a/custom_components/hunterdouglas_powerview_ble/strings.json b/custom_components/hunterdouglas_powerview_ble/strings.json index b638f96..5e3e3e7 100644 --- a/custom_components/hunterdouglas_powerview_ble/strings.json +++ b/custom_components/hunterdouglas_powerview_ble/strings.json @@ -25,7 +25,7 @@ "home_key": "HomeKey (32 hex characters or \\xNN format)" }, "data_description": { - "hub_url": "Base URL of your PowerView G3 hub, e.g. http://powerview-g3.local", + "hub_url": "Base URL of your PowerView G3 hub, e.g. {hub_url_example}", "home_key": "32-character hex string (e.g. 0102030405060708090a0b0c0d0e0f10) or \\x escaped format (e.g. \\x01\\x02...)" } }, @@ -38,7 +38,7 @@ "home_key": "HomeKey (32 hex characters or \\xNN format)" }, "data_description": { - "hub_url": "Base URL of your PowerView G3 hub, e.g. http://powerview-g3.local", + "hub_url": "Base URL of your PowerView G3 hub, e.g. {hub_url_example}", "home_key": "32-character hex string (e.g. 0102030405060708090a0b0c0d0e0f10) or \\x escaped format (e.g. \\x01\\x02...)" } }, diff --git a/custom_components/hunterdouglas_powerview_ble/translations/en.json b/custom_components/hunterdouglas_powerview_ble/translations/en.json index 5164bc8..7830431 100644 --- a/custom_components/hunterdouglas_powerview_ble/translations/en.json +++ b/custom_components/hunterdouglas_powerview_ble/translations/en.json @@ -25,7 +25,7 @@ "home_key": "HomeKey (32 hex characters or \\xNN format)" }, "data_description": { - "hub_url": "Base URL of your PowerView G3 hub, e.g. http://powerview-g3.local", + "hub_url": "Base URL of your PowerView G3 hub, e.g. {hub_url_example}", "home_key": "32-character hex string (e.g. 0102030405060708090a0b0c0d0e0f10) or \\x escaped format (e.g. \\x01\\x02...)" } }, @@ -38,7 +38,7 @@ "home_key": "HomeKey (32 hex characters or \\xNN format)" }, "data_description": { - "hub_url": "Base URL of your PowerView G3 hub, e.g. http://powerview-g3.local", + "hub_url": "Base URL of your PowerView G3 hub, e.g. {hub_url_example}", "home_key": "32-character hex string (e.g. 0102030405060708090a0b0c0d0e0f10) or \\x escaped format (e.g. \\x01\\x02...)" } },