Conversation
* The configuration has been restructed to allow using minimal set of entities (`main.yaml`) on stock hardware, as well as optional components for custom hardware modifications (`full.yaml` now includes what has been known before as `main.yaml`). Minimal configuration now includes sprinkler schedule controls, which could still be removed if not needed. Users of modified hardware will need to update their configuration to reference `full.yaml` instead of `main.yaml`. The change includes moving custom inputs (rain and water tank sensors) and buzzer to dedicated files, accompanied by preprocessor macros to conditionally include related code only when those components are present. * Substitutions have been moved to a dedicated file to follow the structure * `publish_initial_state` for `binary_sensor` components has been renamed to `trigger_on_initial_state` in ESPHome 2025.7.0, the configuration has been updated accordingly.
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the ESPHome sprinkler controller configuration to support optional components through conditional compilation, updates to ESPHome 2025.7.0+ API changes, and reorganizes the configuration structure for better modularity.
- Introduces a new
full.yamlconfiguration that includes all optional components (inputs, buzzer, display, indicators, RTC) - Migrates from ESPHome's deprecated
publish_initial_statetotrigger_on_initial_stateAPI - Adds conditional compilation support using preprocessor macros (
HAS_CUSTOM_INPUTS,HAS_DISPLAY,HAS_BUZZER,USE_WIFI) to allow code to work with and without optional components - Updates ESPHome version requirement from 2024.11.0 to 2025.7.0 and dependency from 2025.9.1 to 2025.10.3
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/rp2040w.yaml | Updates test configuration to use new full.yaml instead of main.yaml |
| substitutions.yaml | Extracts substitutions from main.yaml into a separate file for reusability |
| script_refill_tank.yaml | Adds conditional compilation for water tank empty sensor check |
| script_rain_water_tank_sensors_action.yaml | Wraps rain/water tank sensor logic in HAS_CUSTOM_INPUTS conditional blocks and changes from id() to pointer syntax |
| schedule.yaml | Replaces binary_sensor.is_off with lambda-based conditional check supporting optional inputs |
| requirements.txt | Updates ESPHome dependency to version 2025.10.3 |
| outputs.yaml | Removes buzzer-related configuration (moved to buzzer.yaml) |
| main.yaml | Removes substitutions and optional package includes, now references substitutions.yaml and focuses on core components |
| inputs.yaml | Adds HAS_CUSTOM_INPUTS build flag and migrates to trigger_on_initial_state |
| indicators.yaml | Adds conditional compilation for rain sensor state check |
| full.yaml | New file that combines main.yaml with all optional components |
| display.yaml | Adds HAS_CUSTOM_INPUTS and USE_WIFI conditional compilation, assigns ID to SPI bus, splits sensor display formatting |
| buzzer.yaml | New file extracted from outputs.yaml with HAS_BUZZER build flag |
| README.md | Updates documentation to explain minimal vs full configurations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
🎉 This pull request has been included in version 2.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The configuration has been restructed to allow using minimal set of entities (
main.yaml) on stock hardware, as well as optional components for custom hardware modifications (full.yamlnow includes what has been known before asmain.yaml). Minimal configuration now includes sprinkler schedule controls, which could still be removed if not needed.Users of modified hardware will need to update their configuration to reference
full.yamlinstead ofmain.yaml.The change includes moving custom inputs (rain and water tank sensors) and buzzer to dedicated files, accompanied by preprocessor macros to conditionally include related code only when those components are present.
Substitutions have been moved to a dedicated file to follow the structure
publish_initial_stateforbinary_sensorcomponents has been renamed totrigger_on_initial_statein ESPHome 2025.7.0, the configuration has been updated accordingly.