1
mirror of https://github.com/home-assistant/core synced 2024-08-02 23:40:32 +02:00

Use dataclass properties in tado discovery (#60641)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2021-11-30 16:44:11 +01:00 committed by GitHub
parent 0a1f73e3f7
commit 071385e8d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,8 +88,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle HomeKit discovery."""
self._async_abort_entries_match()
properties = {
key.lower(): value
for (key, value) in discovery_info[zeroconf.ATTR_PROPERTIES].items()
key.lower(): value for (key, value) in discovery_info.properties.items()
}
await self.async_set_unique_id(properties[zeroconf.ATTR_PROPERTIES_ID])
self._abort_if_unique_id_configured()