Skip to content

Plugin: add fallback source for device-provided defaults - #36548

Draft
premultiply wants to merge 4 commits into
masterfrom
plugin-fallback
Draft

premultiply wants to merge 4 commits into
masterfrom
plugin-fallback

Conversation

@premultiply

Copy link
Copy Markdown
Member

pairs with #36279, #36469

Templates often need values the device can report itself, like battery power limits or nameplate ratings. Today they either make the param required with a service: prefill, which breaks existing configs without the value, or read the device at runtime via go helpers and cached sources. The new fallback source covers this generically.

- source: fallback
  value: {{ .maxchargepower }}  # used if set and non-zero
  fallback:                     # read once otherwise, failures retry
    source: modbus
    ...
  scale: -1                     # optional
  set:                          # optional, writes the resolved value
    source: modbus
    ...
  • Getter (int, float): configured value, or the first successful fallback reading
  • Setter (int, float): writes that value to set, ignoring the value passed in. Replaces go helpers that copy a read value into a register
  • Works for meter battery limits and maxacpower, which already accept plugins
  • Params can stay optional with a service: suggestion instead of becoming required

TODO

🤖 Generated with Claude Code

@github-actions github-actions Bot added enhancement New feature or request infrastructure Basic functionality labels Nov 23, 2026
sourcery-ai[bot]

This comment was marked as resolved.

This comment was marked as resolved.

@premultiply
premultiply requested a review from andig November 23, 2026 17:38
@andig

andig commented Nov 28, 2026

Copy link
Copy Markdown
Member

I don‘t think we should add this. Configuration must be explicit and transparent to the user. BC changes are documented.

@andig
andig marked this pull request as draft November 28, 2026 07:54
@andig

andig commented Nov 28, 2026

Copy link
Copy Markdown
Member

If we want to add this we can still do so a) at a later time and b) for any device that might be helpful with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request infrastructure Basic functionality needs documentation Triggers issue creation in evcc-io/docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants