mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
Fix Meater (#71324)
This commit is contained in:
parent
a0474633fd
commit
e8f0d80fc9
@ -146,13 +146,13 @@ async def async_setup_entry(
|
|||||||
if not coordinator.last_update_success:
|
if not coordinator.last_update_success:
|
||||||
return
|
return
|
||||||
|
|
||||||
devices = coordinator.data
|
devices: dict[str, MeaterProbe] = coordinator.data
|
||||||
entities = []
|
entities = []
|
||||||
known_probes: set = hass.data[DOMAIN]["known_probes"]
|
known_probes: set = hass.data[DOMAIN]["known_probes"]
|
||||||
|
|
||||||
# Add entities for temperature probes which we've not yet seen
|
# Add entities for temperature probes which we've not yet seen
|
||||||
for dev in devices:
|
for dev in devices:
|
||||||
if dev.id in known_probes:
|
if dev in known_probes:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
entities.extend(
|
entities.extend(
|
||||||
@ -161,7 +161,7 @@ async def async_setup_entry(
|
|||||||
for sensor_description in SENSOR_TYPES
|
for sensor_description in SENSOR_TYPES
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
known_probes.add(dev.id)
|
known_probes.add(dev)
|
||||||
|
|
||||||
async_add_entities(entities)
|
async_add_entities(entities)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user