Plugwise: remove user-config of port (#137584)

This commit is contained in:
Bouwe Westerdijk 2025-02-06 19:12:57 +01:00 committed by GitHub
parent 9a9822140e
commit b6d9e4f1b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -59,8 +59,7 @@ def smile_user_schema(discovery_info: ZeroconfServiceInfo | None) -> vol.Schema:
schema = schema.extend(
{
vol.Required(CONF_HOST): str,
# Port under investigation for removal (hence not added in #132878)
vol.Optional(CONF_PORT, default=DEFAULT_PORT): int,
vol.Required(CONF_PASSWORD): str,
vol.Required(CONF_USERNAME, default=SMILE): vol.In(
{SMILE: FLOW_SMILE, STRETCH: FLOW_STRETCH}
),
@ -197,6 +196,7 @@ class PlugwiseConfigFlow(ConfigFlow, domain=DOMAIN):
errors: dict[str, str] = {}
if user_input is not None:
user_input[CONF_PORT] = DEFAULT_PORT
if self.discovery_info:
user_input[CONF_HOST] = self.discovery_info.host
user_input[CONF_PORT] = self.discovery_info.port