Skip to content

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

Open
banter240 wants to merge 1 commit intoerwindouna:mainfrom
banter240:fix/zone-state-and-meter-readings
Open

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

Conversation

@banter240
Copy link
Copy Markdown

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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.

2 participants