[field-notes] Live-pin the actual success codes per write endpoint (200/201/204) #198

Open
opened 2026-10-27 14:04:01 +00:00 by mat · 0 comments
Owner

Follow-up to #180 (PR #197): the client now accepts the whole 2xx range and maps blank bodies to {}, but which status each write endpoint actually answers on success is mostly unobserved.

During the next live session, capture the success status (and whether a body comes back) for each write path:

  • set_device_mode (PUT /devices/{id}/mode)
  • set_alert_config (PUT /alertconfigs/v2/{id})
  • switch_capacity · set_pilot_wire · set_thermal_mode · set_thermostat_set_point (PUT /capacities/{id}/...)
  • put_device (PUT /devices/{id})
  • update_planning (PUT /plannings/{id})
  • create_typical_day · update_typical_day (POST/PUT /typicaldays)
  • set_thermal_control (PUT /thermalcontrol/{id}) — whole success path unverified (no thermal-control config on the probe account)

Once pinned, record the observed codes in the method docstrings (the _json_or_empty behavior already tolerates all shapes). Note which writes were exercised on hardware you actually own vs. the nonexistent-id oracle.

Follow-up to #180 (PR #197): the client now accepts the whole 2xx range and maps blank bodies to `{}`, but which status each write endpoint actually answers on success is mostly unobserved. During the next live session, capture the success status (and whether a body comes back) for each write path: - `set_device_mode` (`PUT /devices/{id}/mode`) - `set_alert_config` (`PUT /alertconfigs/v2/{id}`) - `switch_capacity` · `set_pilot_wire` · `set_thermal_mode` · `set_thermostat_set_point` (`PUT /capacities/{id}/...`) - `put_device` (`PUT /devices/{id}`) - `update_planning` (`PUT /plannings/{id}`) - `create_typical_day` · `update_typical_day` (`POST/PUT /typicaldays`) - `set_thermal_control` (`PUT /thermalcontrol/{id}`) — whole success path unverified (no thermal-control config on the probe account) Once pinned, record the observed codes in the method docstrings (the `_json_or_empty` behavior already tolerates all shapes). Note which writes were exercised on hardware you actually own vs. the nonexistent-id oracle.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mat/python-comwatt-client#198
No description provided.