Skip to content

Only hold commanded values for VRF sub-units - #525

Merged
RobHofmann merged 1 commit into
masterfrom
fix/hold-sub-units-only
Sep 23, 2026
Merged

RobHofmann merged 1 commit into
masterfrom
fix/hold-sub-units-only

Conversation

@RobHofmann

Copy link
Copy Markdown
Owner

Problem

#508 (4.0.7) holds commanded values over the read-back for up to 8 s, so a VRF gateway's stale cache does not revert the UI. It does that for every unit, also for standalone units, which have no gateway cache.

That has a cost there, raised by @p-monteiro. When a standalone unit gets a value it cannot take, for example a swing mode it does not support, it corrects itself and reports a valid value. With the hold, the UI kept showing the refused value for up to 8 s. Before #508 it showed the corrected value at once.

Change

The hold and the 2 s follow-up read now only apply when the device is a VRF sub-unit, that is when the sub MAC differs from the gateway MAC. Standalone units behave as they did before #508: no hold, no extra poll per command.

The same change is in the 5.0 port, #522.

Testing

My fake-device harness drives the real climate.py. 39/39 checks passed:

  • VRF sub-unit behind a stale gateway: unchanged. The UI keeps the commanded value, the 2 s refresh confirms it, a rejected command falls back after the TTL, and the refresh is cancelled on removal.
  • Standalone unit: the command is confirmed on the first read, no refresh is scheduled, and a value the unit refuses shows the unit's own value on the next read.

#508 re-applies the commanded values over the read-back for up to 8 s, so a
VRF gateway's stale cache does not revert the UI. It did that for every
unit. A standalone unit is read directly, and when it corrects a value it
cannot take (for example an unsupported swing mode), it reports its own
value. The hold then kept the refused value on screen for up to 8 s,
where before the UI showed the corrected value at once.

The hold and the 2 s follow-up read now only apply when the device is a
sub-unit (sub MAC differs from the gateway MAC). Standalone units behave
as before #508. The same change went into the 5.0 port (#522).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant