fix: linting and hass validation issues
This commit is contained in:
@@ -144,18 +144,18 @@ _HOMEKEY_SCHEMA = vol.Schema(
|
|||||||
vol.Required("key_method", default="hub"): SelectSelector(
|
vol.Required("key_method", default="hub"): SelectSelector(
|
||||||
SelectSelectorConfig(
|
SelectSelectorConfig(
|
||||||
options=[
|
options=[
|
||||||
{
|
SelectOptionDict(
|
||||||
"value": "hub",
|
value="hub",
|
||||||
"label": "Fetch automatically from PowerView hub",
|
label="Fetch automatically from PowerView hub",
|
||||||
},
|
),
|
||||||
{
|
SelectOptionDict(
|
||||||
"value": "manual",
|
value="manual",
|
||||||
"label": "Enter key manually (32 hex characters)",
|
label="Enter key manually (32 hex characters)",
|
||||||
},
|
),
|
||||||
{
|
SelectOptionDict(
|
||||||
"value": "skip",
|
value="skip",
|
||||||
"label": "Skip (no key — controls disabled for encrypted shades)",
|
label="Skip (no key — controls disabled for encrypted shades)",
|
||||||
},
|
),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@@ -333,7 +333,10 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
step_id="homekey_bluetooth",
|
step_id="homekey_bluetooth",
|
||||||
data_schema=_HOMEKEY_SCHEMA,
|
data_schema=_HOMEKEY_SCHEMA,
|
||||||
errors=errors,
|
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:
|
def _existing_entry_value(self, key: str) -> str:
|
||||||
@@ -557,4 +560,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
step_id="homekey",
|
step_id="homekey",
|
||||||
data_schema=_HOMEKEY_SCHEMA,
|
data_schema=_HOMEKEY_SCHEMA,
|
||||||
errors=errors,
|
errors=errors,
|
||||||
|
description_placeholders={
|
||||||
|
"hub_url_example": "http://powerview-g3.local",
|
||||||
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
"home_key": "HomeKey (32 hex characters or \\xNN format)"
|
"home_key": "HomeKey (32 hex characters or \\xNN format)"
|
||||||
},
|
},
|
||||||
"data_description": {
|
"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...)"
|
"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)"
|
"home_key": "HomeKey (32 hex characters or \\xNN format)"
|
||||||
},
|
},
|
||||||
"data_description": {
|
"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...)"
|
"home_key": "32-character hex string (e.g. 0102030405060708090a0b0c0d0e0f10) or \\x escaped format (e.g. \\x01\\x02...)"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
"home_key": "HomeKey (32 hex characters or \\xNN format)"
|
"home_key": "HomeKey (32 hex characters or \\xNN format)"
|
||||||
},
|
},
|
||||||
"data_description": {
|
"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...)"
|
"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)"
|
"home_key": "HomeKey (32 hex characters or \\xNN format)"
|
||||||
},
|
},
|
||||||
"data_description": {
|
"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...)"
|
"home_key": "32-character hex string (e.g. 0102030405060708090a0b0c0d0e0f10) or \\x escaped format (e.g. \\x01\\x02...)"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user