Skip to content

Record chamber temperature and humidity with each weigh-in - #14

Merged
ttiot merged 2 commits into
mainfrom
feature/weigh-in-climate
Oct 21, 2026
Merged

ttiot merged 2 commits into
mainfrom
feature/weigh-in-climate

Conversation

@ttiot

@ttiot ttiot commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • WeightSample gains optional temperature (°C) and humidity (% RH): a chamber without sensors can log the conditions read off a thermo-hygrometer at every weigh-in. Defaults to None, so existing stores and export_batch / import_batch payloads load unchanged.
  • record_weight action and weigh_in websocket command accept both fields (humidity range-checked 0–100).
  • A weigh-in taken now with the fields omitted snapshots the current filtered sensor readings, so the drying curve keeps its context after the recorder has purged history. Backdated weigh-ins are never filled from live sensors. These values never feed the regulation.
  • Panel: two inputs in the weigh-in form, T°/RH columns in the history table and in the CSV export.
  • CHANGELOG (Unreleased) and README updated.

Test plan

  • pytest (176 passed), ruff check, ruff format --check, mypy, node --check on the panel
  • New tests: model round-trip and backward-compatible load, service with explicit and snapshotted values, websocket manual / snapshot / backdated / out-of-range
  • CI (validate, hassfest, hacs) green

Michaux Julien added 2 commits October 21, 2026 10:33
- WeightSample gains optional `temperature` (°C) and `humidity` (% RH)
  fields, so a chamber with no sensor can log the conditions read off a
  thermo-hygrometer at every weigh-in. Default None: existing stores and
  export/import payloads load unchanged.
- record_weight action and weigh_in websocket command accept the two
  fields; humidity is range-checked 0–100.
- When a weigh-in is taken now and the fields are omitted, the coordinator
  snapshots the current filtered sensor readings, so the drying curve keeps
  its context after the recorder purges history. Backdated weigh-ins are
  never filled from live sensors. The values never feed the regulation.
- Panel: two inputs in the weigh-in form, T°/RH columns in the history
  table and in the CSV export.
- Tests for the round-trip, the service, the websocket (manual, snapshot,
  backdated, out-of-range) and backward-compatible loading.
- CHANGELOG and README updated.
- Bump manifest.json and pyproject.toml to 0.8.0.
- Move the Unreleased changelog entry under 0.8.0 and update the compare links.
@ttiot
ttiot merged commit ad4b74d into main Oct 21, 2026
3 checks passed
@ttiot
ttiot deleted the feature/weigh-in-climate branch October 21, 2026 09:02
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