ESPHome packages-based composition for multiple ESP32 boards and environmental sensors.
Structure:
- core/ Shared device logic (wifi/api/ota/logger/time/diagnostics). No pins or sensors.
- boards/ Manufacturer-scoped board profiles (board type, pins, buses).
- features/ Manufacturer-scoped sensor/expander packages with explicit ids and names.
- builds/ Per-device folders with a build YAML and local secrets.
Workflow:
- Create or update a board profile in boards/.
- Create or update features in features/.
- Create a build folder in builds/ with build.yaml and secrets.
- Copy secrets: builds//secrets.example.yaml -> builds//secrets.yaml
- Compile: esphome compile builds//build.yaml
- Upload: esphome upload builds//build.yaml
- Export single YAML (ESPHome Builder): scripts/export_build.sh builds/
Notes:
- Keep entity names stable; avoid changing
nameoridunless required. - Keep configuration declarative; do not use runtime detection.