mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Handle ghost zones gracefully (#31008)
This commit is contained in:
parent
662c12715e
commit
8f37c843f5
@ -97,16 +97,25 @@ async def async_setup_platform(
|
||||
|
||||
zones = []
|
||||
for zone in broker.tcs.zones.values():
|
||||
_LOGGER.debug(
|
||||
"Found a %s (%s), id=%s, name=%s",
|
||||
zone.zoneType,
|
||||
zone.modelType,
|
||||
zone.zoneId,
|
||||
zone.name,
|
||||
)
|
||||
new_entity = EvoZone(broker, zone)
|
||||
if zone.zoneType == "Unknown":
|
||||
_LOGGER.warning(
|
||||
"Ignoring: %s (%s), id=%s, name=%s: invalid zone type",
|
||||
zone.zoneType,
|
||||
zone.modelType,
|
||||
zone.zoneId,
|
||||
zone.name,
|
||||
)
|
||||
else:
|
||||
_LOGGER.debug(
|
||||
"Adding: %s (%s), id=%s, name=%s",
|
||||
zone.zoneType,
|
||||
zone.modelType,
|
||||
zone.zoneId,
|
||||
zone.name,
|
||||
)
|
||||
|
||||
zones.append(new_entity)
|
||||
new_entity = EvoZone(broker, zone)
|
||||
zones.append(new_entity)
|
||||
|
||||
async_add_entities([controller] + zones, update_before_add=True)
|
||||
|
||||
|
@ -34,7 +34,7 @@ async def async_setup_platform(
|
||||
broker = hass.data[DOMAIN]["broker"]
|
||||
|
||||
_LOGGER.debug(
|
||||
"Found the DHW Controller (%s), id: %s",
|
||||
"Adding: DhwController (%s), id=%s",
|
||||
broker.tcs.hotwater.zone_type,
|
||||
broker.tcs.hotwater.zoneId,
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user