v0.7.12-hotfix
This commit is contained in:
@@ -136,12 +136,23 @@ class GreeControllerCoordinator(DataUpdateCoordinator[dict[str, dict]]):
|
||||
self.async_set_updated_data(dict(self.data or {}))
|
||||
|
||||
try:
|
||||
await self.client.zone_control(zone_id, payload)
|
||||
zone = await self.client.zone_control(zone_id, payload)
|
||||
except GreeControllerApiError:
|
||||
self._pending_zone_controls.pop(zone_id, None)
|
||||
await self.async_request_refresh()
|
||||
raise
|
||||
|
||||
# The backend owns hand-back timing. Keep the exact accepted deadline returned
|
||||
# by the zone API in the optimistic overlay so an overlapping/stale plan poll
|
||||
# cannot temporarily resurrect the previous countdown in Home Assistant.
|
||||
for key in (
|
||||
"local_thermostat_power",
|
||||
"local_thermostat_resume_at",
|
||||
"device_manual_override",
|
||||
"device_manual_override_until",
|
||||
):
|
||||
if key in zone:
|
||||
expected[key] = zone[key]
|
||||
self._pending_zone_controls[zone_id] = (loop.time() + 3.0, expected)
|
||||
await self.async_request_refresh()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user