mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Fix evohome high_precision temps not retreived consistently (#107366)
* initial commit * doctweak * remove hint * doctweak
This commit is contained in:
parent
75d591593d
commit
2a8444b245
@ -497,7 +497,6 @@ class EvoBroker:
|
|||||||
|
|
||||||
session_id = get_session_id(self.client_v1)
|
session_id = get_session_id(self.client_v1)
|
||||||
|
|
||||||
self.temps = {} # these are now stale, will fall back to v2 temps
|
|
||||||
try:
|
try:
|
||||||
temps = await self.client_v1.get_temperatures()
|
temps = await self.client_v1.get_temperatures()
|
||||||
|
|
||||||
@ -523,6 +522,11 @@ class EvoBroker:
|
|||||||
),
|
),
|
||||||
err,
|
err,
|
||||||
)
|
)
|
||||||
|
self.temps = {} # high-precision temps now considered stale
|
||||||
|
|
||||||
|
except Exception:
|
||||||
|
self.temps = {} # high-precision temps now considered stale
|
||||||
|
raise
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if str(self.client_v1.location_id) != self._location.locationId:
|
if str(self.client_v1.location_id) != self._location.locationId:
|
||||||
@ -654,6 +658,7 @@ class EvoChild(EvoDevice):
|
|||||||
assert isinstance(self._evo_device, evo.HotWater | evo.Zone) # mypy check
|
assert isinstance(self._evo_device, evo.HotWater | evo.Zone) # mypy check
|
||||||
|
|
||||||
if self._evo_broker.temps.get(self._evo_id) is not None:
|
if self._evo_broker.temps.get(self._evo_id) is not None:
|
||||||
|
# use high-precision temps if available
|
||||||
return self._evo_broker.temps[self._evo_id]
|
return self._evo_broker.temps[self._evo_id]
|
||||||
return self._evo_device.temperature
|
return self._evo_device.temperature
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user