1
0
Fork
You've already forked esphome-components
0

fix(scd4x_stats): publish VPD with decimal precision #18

Merged
stackdrift merged 1 commit from fix/scd4x-vpd-metadata into main 2026年06月14日 22:06:27 +02:00

Summary

  • Gives the reusable scd4x_stats.vpd sensor default Home Assistant/ESPHome metadata for kPa, two decimal places, and measurement state class.
  • Keeps the change component-only; no real device configs from the old stacked PRs are included.

Fixes #15.

Test Plan

  • git diff --check origin/main..HEAD
  • python3 - <<'PY' ... ast.parse(Path('scd4x_stats/__init__.py').read_text()) ... PY
  • ./docker/esphome compile configs/test-atoms3u-sensors.yaml
  • Verified generated AtomS3U source includes VPD state_class=measurement, accuracy_decimals=2, and uom:kPa.

Notes

  • The VPD calculation and publish path are unchanged.
  • The temporary local configs/secrets.yaml copy used for compile validation was removed before pushing.
## Summary - Gives the reusable `scd4x_stats.vpd` sensor default Home Assistant/ESPHome metadata for `kPa`, two decimal places, and measurement state class. - Keeps the change component-only; no real device configs from the old stacked PRs are included. Fixes #15. ## Test Plan - `git diff --check origin/main..HEAD` - `python3 - <<'PY' ... ast.parse(Path('scd4x_stats/__init__.py').read_text()) ... PY` - `./docker/esphome compile configs/test-atoms3u-sensors.yaml` - Verified generated AtomS3U source includes VPD `state_class=measurement`, `accuracy_decimals=2`, and `uom:kPa`. ## Notes - The VPD calculation and publish path are unchanged. - The temporary local `configs/secrets.yaml` copy used for compile validation was removed before pushing.
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
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
stackdrift/esphome-components!18
Reference in a new issue
stackdrift/esphome-components
No description provided.
Delete branch "fix/scd4x-vpd-metadata"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?