Skip to content

plugin: add state source to read published values in-process#31309

Closed
iseeberg79 wants to merge 1 commit into
evcc-io:masterfrom
iseeberg79:feat/plugin-state
Closed

plugin: add state source to read published values in-process#31309
iseeberg79 wants to merge 1 commit into
evcc-io:masterfrom
iseeberg79:feat/plugin-state

Conversation

@iseeberg79

Copy link
Copy Markdown
Contributor

Adds a state plugin source that reads a value from the process-wide value cache (the store backing /api/state), navigates it with a jq filter and forwards it to a nested setter. This lets templates write a site-computed value to a device register in-process, without an HTTP round-trip to the local API.

  • util: expose the ParamCache process-wide via SetDefaultParamCache / DefaultParamCacheValue
  • cmd: register the cache at startup
  • plugin/state: FloatGetter (key + jq + scale) plus nested Int/FloatSetter

Adds a `state` plugin source that reads a value from the process-wide
value cache (the store backing /api/state), navigates it with a jq filter
and forwards it to a nested setter. This lets templates write a
site-computed value to a device register in-process, without an HTTP
round-trip to the local API.

- util: expose the ParamCache process-wide via SetDefaultParamCache /
  DefaultParamCacheValue
- cmd: register the cache at startup
- plugin/state: FloatGetter (key + jq + scale) plus nested Int/FloatSetter

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@andig

andig commented Jun 29, 2026

Copy link
Copy Markdown
Member

Nice idea. Right now we‘re lacking a compelling use case. Lets keep this but not implement atm.

@andig andig closed this Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants