feat(engine,power_meter): regulator opening sensor + always-poll refactor - #162
Closed
XavierBerger wants to merge 3 commits into
Closed
feat(engine,power_meter): regulator opening sensor + always-poll refactor#162XavierBerger wants to merge 3 commits into
XavierBerger wants to merge 3 commits into
Conversation
Adds a shared "Regulator Opening Sensor" template sensor to `engine_common.yaml` so every engine variant surfaces the current regulator opening (%) in Home Assistant graphs. The sensor mirrors `id(regulator_opening)` on a 5 s update cadence. To make the sensor actually update on the 1-switch variant, this commit also declares the `regulator_opening` template number in `engine_1switch.yaml` and drives it from the `router_level` on_value handler — same pattern engine_1dimmer.yaml already uses at :48-50. On this variant the router is either fully open (100 %) or fully closed (0 %), so the number uses `mode: box` with `step: 100`; a slider would only be reachable at its endpoints. Without this wiring the sensor would read 0 forever on the 1-switch variant, which was the case in the original feature commit. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Converts every power_meter_*.yaml from the YAML-merge include syntax (`<<: !include`) to the modern `packages:` include, and removes the `if id(power_meter_activated) != 0` guard around each meter's `power_meter_source` script so the meter reports live data to Home Assistant even while the Solar Router's `activate` switch is off. The engine still only acts on real_power when `activate` is on. The uniform refactor covers all six meter variants — fronius, shelly_em, shelly_em3, proxy_client, jsy-mk-194t, home_assistant. Meter-specific notes: - power_meter_home_assistant.yaml: because both this file and power_meter_common.yaml would now define `real_power`/`consumption` under `packages:`, the HA-imported sensors are renamed to `real_power_reader` / `consumption_reader` (marked `internal: True` to hide the duplicates from HA) and forward their values into the common template sensors via an `on_value` lambda. A `min_version: 2025.5.0` is pinned since the new include syntax requires it. - power_meter_shelly_em3.yaml: drops the previously required re- declarations of `real_power` / `consumption` (the `<<:` merge only kept the first `sensor:` key so the common template sensors were never instantiated). The obsolete comment about that limitation is removed. Substitutions are trimmed to the shelly-specific overrides, since `packages:` correctly propagates the defaults from common. - power_meter_proxy_client.yaml: `min_version` bumped from 2024.11.1 to 2025.5.0 to match the include syntax requirement. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Aligns temperature_limiter_DS18B20.yaml and temperature_limiter_home_assistant.yaml with the same include-syntax change already applied to every power_meter_*.yaml: replaces `<<: !include temperature_limiter_common.yaml` with a `packages:` block, and pins `esphome.min_version: 2025.5.0` since the merge-map form of `!include` was retired in newer ESPHome releases. Also fixes a typo in the header comment (temperaturewer → temperature). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.