Fix issue changing Insteon Hub configuration (#117204)

Add Hub version to config schema
pull/117608/head
Tom Harris 2024-05-16 21:45:03 -04:00 committed by GitHub
parent 0e3c0ccfd8
commit 9420e041ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -22,6 +22,7 @@ from .const import (
CONF_CAT, CONF_CAT,
CONF_DIM_STEPS, CONF_DIM_STEPS,
CONF_HOUSECODE, CONF_HOUSECODE,
CONF_HUB_VERSION,
CONF_SUBCAT, CONF_SUBCAT,
CONF_UNITCODE, CONF_UNITCODE,
HOUSECODES, HOUSECODES,
@ -143,6 +144,7 @@ def build_hub_schema(
schema = { schema = {
vol.Required(CONF_HOST, default=host): str, vol.Required(CONF_HOST, default=host): str,
vol.Required(CONF_PORT, default=port): int, vol.Required(CONF_PORT, default=port): int,
vol.Required(CONF_HUB_VERSION, default=hub_version): int,
} }
if hub_version == 2: if hub_version == 2:
schema[vol.Required(CONF_USERNAME, default=username)] = str schema[vol.Required(CONF_USERNAME, default=username)] = str