Fix Meater (#71324)

pull/71325/head
Erik Montnemery 2022-05-05 08:52:20 +02:00 committed by GitHub
parent a0474633fd
commit e8f0d80fc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -146,13 +146,13 @@ async def async_setup_entry(
if not coordinator.last_update_success:
return
devices = coordinator.data
devices: dict[str, MeaterProbe] = coordinator.data
entities = []
known_probes: set = hass.data[DOMAIN]["known_probes"]
# Add entities for temperature probes which we've not yet seen
for dev in devices:
if dev.id in known_probes:
if dev in known_probes:
continue
entities.extend(
@ -161,7 +161,7 @@ async def async_setup_entry(
for sensor_description in SENSOR_TYPES
]
)
known_probes.add(dev.id)
known_probes.add(dev)
async_add_entities(entities)