mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Use dataclass properties in enphase_envoy discovery (#60627)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
cd351cf22b
commit
6f22ffbedd
@ -104,9 +104,9 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
self, discovery_info: zeroconf.ZeroconfServiceInfo
|
||||
) -> FlowResult:
|
||||
"""Handle a flow initialized by zeroconf discovery."""
|
||||
self.serial = discovery_info[zeroconf.ATTR_PROPERTIES]["serialnum"]
|
||||
self.serial = discovery_info.properties["serialnum"]
|
||||
await self.async_set_unique_id(self.serial)
|
||||
self.ip_address = discovery_info[zeroconf.ATTR_HOST]
|
||||
self.ip_address = discovery_info.host
|
||||
self._abort_if_unique_id_configured({CONF_HOST: self.ip_address})
|
||||
for entry in self._async_current_entries(include_ignore=False):
|
||||
if (
|
||||
|
Loading…
x
Reference in New Issue
Block a user