mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 22:57:17 +00:00
switch evohome to use a whitelist for valid zonetype (#31047)
This commit is contained in:
parent
19d30f0a1b
commit
e00388eea0
@ -663,7 +663,8 @@ class EvoChild(EvoDevice):
|
|||||||
except IndexError:
|
except IndexError:
|
||||||
self._setpoints = {}
|
self._setpoints = {}
|
||||||
_LOGGER.warning(
|
_LOGGER.warning(
|
||||||
"Failed to get setpoints - please report as an issue", exc_info=True
|
"Failed to get setpoints, report as an issue if this error persists",
|
||||||
|
exc_info=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
return self._setpoints
|
return self._setpoints
|
||||||
|
@ -97,15 +97,7 @@ async def async_setup_platform(
|
|||||||
|
|
||||||
zones = []
|
zones = []
|
||||||
for zone in broker.tcs.zones.values():
|
for zone in broker.tcs.zones.values():
|
||||||
if zone.zoneType == "Unknown":
|
if zone.modelType == "HeatingZone" or zone.zoneType == "Thermostat":
|
||||||
_LOGGER.warning(
|
|
||||||
"Ignoring: %s (%s), id=%s, name=%s: invalid zone type",
|
|
||||||
zone.zoneType,
|
|
||||||
zone.modelType,
|
|
||||||
zone.zoneId,
|
|
||||||
zone.name,
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
_LOGGER.debug(
|
_LOGGER.debug(
|
||||||
"Adding: %s (%s), id=%s, name=%s",
|
"Adding: %s (%s), id=%s, name=%s",
|
||||||
zone.zoneType,
|
zone.zoneType,
|
||||||
@ -117,6 +109,16 @@ async def async_setup_platform(
|
|||||||
new_entity = EvoZone(broker, zone)
|
new_entity = EvoZone(broker, zone)
|
||||||
zones.append(new_entity)
|
zones.append(new_entity)
|
||||||
|
|
||||||
|
else:
|
||||||
|
_LOGGER.warning(
|
||||||
|
"Ignoring: %s (%s), id=%s, name=%s: unknown/invalid zone type, "
|
||||||
|
"report as an issue if you feel this zone type should be supported",
|
||||||
|
zone.zoneType,
|
||||||
|
zone.modelType,
|
||||||
|
zone.zoneId,
|
||||||
|
zone.name,
|
||||||
|
)
|
||||||
|
|
||||||
async_add_entities([controller] + zones, update_before_add=True)
|
async_add_entities([controller] + zones, update_before_add=True)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user