Skip to content

fix: add HotWaterInUse model, null nextTimeBlock guard, and meter readings URI#159

Merged
wmalgadey merged 1 commit intoerwindouna:mainfrom
banter240:fix/zone-state-and-meter-readings
Apr 20, 2026
Merged

fix: add HotWaterInUse model, null nextTimeBlock guard, and meter readings URI#159
wmalgadey merged 1 commit intoerwindouna:mainfrom
banter240:fix/zone-state-and-meter-readings

Conversation

@banter240
Copy link
Copy Markdown
Contributor

Proposed Changes

  • Add HotWaterInUse dataclass to models_v3.py and expose it as hot_water_in_use field on ActivityDataPoints (API returns hotWaterInUse for hot water zones, which was silently dropped during deserialization)
  • Guard against null nextTimeBlock in ZoneState.pre_deserialize to prevent deserialization errors when API returns null instead of an object
  • Fix set_meter_readings to include the required URI path (homes/{home_id}/meterReadings was missing, causing requests to hit the wrong endpoint)

@wmalgadey wmalgadey self-assigned this Mar 31, 2026
@wmalgadey wmalgadey added the bugfix Inconsistencies or issues which will cause a problem for users or implementers label Mar 31, 2026
@wmalgadey
Copy link
Copy Markdown
Collaborator

@banter240 please fix the linting issues.

FYI: we have a devcontainer for executing the preCommit hooks, if you like. It would fix those errors right away

…dings URI

- Add HotWaterInUse dataclass to models_v3.py and expose it as
  hot_water_in_use field on ActivityDataPoints (API returns hotWaterInUse
  for hot water zones, which was silently dropped during deserialization)
- Guard against null nextTimeBlock in ZoneState.__pre_deserialize__ to
  prevent deserialization errors when API returns null instead of an object
- Fix set_meter_readings to include the required URI path
  (homes/{home_id}/meterReadings was missing, causing requests to hit the
  wrong endpoint)
@banter240 banter240 force-pushed the fix/zone-state-and-meter-readings branch from d92f587 to 80fee09 Compare April 1, 2026 10:35
@wmalgadey
Copy link
Copy Markdown
Collaborator

@erwindouna do you have any remarks on this?

@erwindouna
Copy link
Copy Markdown
Owner

erwindouna commented Apr 16, 2026

Looks good to me. :)

@wmalgadey wmalgadey merged commit 8d587b8 into erwindouna:main Apr 20, 2026
11 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bugfix Inconsistencies or issues which will cause a problem for users or implementers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants