Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support defining soc-max and soc-min as sensors #989

Open
Flix6x opened this issue Feb 27, 2024 · 0 comments
Open

Support defining soc-max and soc-min as sensors #989

Flix6x opened this issue Feb 27, 2024 · 0 comments

Comments

@Flix6x
Copy link
Contributor

Flix6x commented Feb 27, 2024

Update the soc-max and soc-min fields in the flex-model to use the QuantityOrSensor schema. For backwards compatibility, it should remain possible to specify a numeric value, in which the case the unit should be taken from the soc-unit field.

Rationale for supporting dynamic values for soc-max and soc-min:

  • model battery degradation
  • model a future expansion of storage capacity
  • update protection thresholds for battery usage (soc-maxima and soc-minima could also be used for this, but those typically deal with highly dynamically changing operational parameters rather than physical thresholds)

Follow-up: as a sensor, soc-max and soc-min could possibly be modelled as instantaneous sensors with event_resolution=timedelta(0), to be treated as setpoints that should remain valid until the next record, rather than as sensors with a non-zero resolution. This would require a change in our search logic, in combination with a dedicated sensor attribute. But for the scope of this issue, I recommend just using a non-zero resolution with a long duration (e.g. a month or a year, with event_resolution="P1Y").

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

No branches or pull requests

2 participants