Skip to content

Fix VacationHold.enabled reading the wrong JSON key#170

Open
clutch2sft wants to merge 1 commit into
timmo001:masterfrom
clutch2sft:fix-vacation-hold-key
Open

Fix VacationHold.enabled reading the wrong JSON key#170
clutch2sft wants to merge 1 commit into
timmo001:masterfrom
clutch2sft:fix-vacation-hold-key

Conversation

@clutch2sft

Copy link
Copy Markdown

Because the property silently defaulted to False on the missing key, an active
vacation hold would always report as off — no error, no exception, just wrong data.
Same failure mode as the other field-name mismatches already fixed in this library
(#165).

Changes

  • aiolyric/objects/device.py: VacationHold.enabled now reads Enabled.
  • tests/__init__.py, tests/objects/test_device.py, tests/objects/test_location.py:
    fixtures and assertions updated to match.

pytest tests/objects/ passes (3/3).

Context

Found via a Copilot review comment on a companion home-assistant/core PR
(Ocala Thermostat room-sensor work), then confirmed against a debug log already
captured from a live account rather than guessed.

Resideo's device response returns vacationHold.Enabled (capital E),
not vacationHold.enabled. Confirmed against a live captured payload
from a T9-T10 account: {'vacationHold': {'Enabled': False}}.

Because the property silently defaulted to False on the missing key,
an active vacation hold would always report as off with no error -
same failure mode as the other field-name mismatches already fixed
in this library.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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