Use dataclass properties in bond discovery (#60590)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
d537ec1d6f
commit
fb94ed4e6b
1 changed files with 2 additions and 2 deletions
|
@ -94,8 +94,8 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||||
self, discovery_info: zeroconf.ZeroconfServiceInfo
|
self, discovery_info: zeroconf.ZeroconfServiceInfo
|
||||||
) -> FlowResult:
|
) -> FlowResult:
|
||||||
"""Handle a flow initialized by zeroconf discovery."""
|
"""Handle a flow initialized by zeroconf discovery."""
|
||||||
name: str = discovery_info[zeroconf.ATTR_NAME]
|
name: str = discovery_info.name
|
||||||
host: str = discovery_info[zeroconf.ATTR_HOST]
|
host: str = discovery_info.host
|
||||||
bond_id = name.partition(".")[0]
|
bond_id = name.partition(".")[0]
|
||||||
await self.async_set_unique_id(bond_id)
|
await self.async_set_unique_id(bond_id)
|
||||||
for entry in self._async_current_entries():
|
for entry in self._async_current_entries():
|
||||||
|
|
Loading…
Add table
Reference in a new issue