Harden evohome against failures to retrieve high-precision temps (#102989)
fix hass-logger-period
This commit is contained in:
parent
2616794e1d
commit
8a87ea5506
1 changed files with 13 additions and 1 deletions
|
@ -487,6 +487,18 @@ class EvoBroker:
|
|||
)
|
||||
self.temps = None # these are now stale, will fall back to v2 temps
|
||||
|
||||
except KeyError as err:
|
||||
_LOGGER.warning(
|
||||
(
|
||||
"Unable to obtain high-precision temperatures. "
|
||||
"It appears the JSON schema is not as expected, "
|
||||
"so the high-precision feature will be disabled until next restart."
|
||||
"Message is: %s"
|
||||
),
|
||||
err,
|
||||
)
|
||||
self.client_v1 = self.temps = None
|
||||
|
||||
else:
|
||||
if (
|
||||
str(self.client_v1.location_id)
|
||||
|
@ -495,7 +507,7 @@ class EvoBroker:
|
|||
_LOGGER.warning(
|
||||
"The v2 API's configured location doesn't match "
|
||||
"the v1 API's default location (there is more than one location), "
|
||||
"so the high-precision feature will be disabled"
|
||||
"so the high-precision feature will be disabled until next restart"
|
||||
)
|
||||
self.client_v1 = self.temps = None
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue