Skip to content

Commit 889fc4c

Browse files
committed
Fix _product is None
1 parent 4148afe commit 889fc4c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

custom_components/plugwise/config_flow.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ async def validate_input(hass: HomeAssistant, data: dict[str, Any]) -> Smile:
120120
host=data[CONF_HOST],
121121
password=data[CONF_PASSWORD],
122122
port=data[CONF_PORT],
123-
username=data[CONF_USERNAME],
123+
username=data[CONF_USERNAME],ne
124124
timeout=data[CONF_TIMEOUT],
125125
websession=websession,
126126
)
@@ -169,7 +169,7 @@ async def async_step_zeroconf(
169169

170170
if DEFAULT_USERNAME not in unique_id:
171171
self._username = STRETCH_USERNAME
172-
_product = _properties.get(PRODUCT, None)
172+
_product = _properties.get(PRODUCT, "Unknown Smile")
173173
_version = _properties.get(VERSION, "n/a")
174174
_name = f"{ZEROCONF_MAP.get(_product, _product)} v{_version}"
175175

@@ -257,7 +257,6 @@ async def async_step_user(
257257
api.smile_hostname or api.gateway_id, raise_on_progress=False
258258
)
259259
self._abort_if_unique_id_configured()
260-
261260
return self.async_create_entry(title=api.smile_name, data=user_input)
262261

263262
@staticmethod

0 commit comments

Comments
 (0)