Skip to content

Allow SensorsToShowSchema to include flex-config #1880

@nhoening

Description

@nhoening

Here is how the next generation of SensorsToShowSchema should look like:

[
  {
    "title": "Storages",
    "plots": [
      {"asset": 10, "flex-model": "soc-max"},
      {"asset": 10, "flex-model": "soc-min"},
      {"asset": 10, "flex-context": "consumption-price"},
      {"sensor": 3},
      {"sensor": 4}
    ]
  }
]

So we add a "plots" field to the dict, and there are two new types of entries, for ones having the "flex-context" or "flex-model" keys.

We can check validity of the field names, as we have schemas for the flex-context and flex-model. We can check if the field names exist there.
Let's ignore fields that are neither a sensor and/or fixed values, i.e. the more complex fields like soc-usage for now.

Also adapt any tests that test the schema.

But mainly, the code that generates graphs (see the /charts endpoint) needs to start to interpret these new fields. In the discussion, Felix made some suggestions how to get started.

  • Sensors might be rather easy, as we deal with exactly that already
  • Fixed values lead to slightly different vega-light code, but as it is just a line I hope it is not too hard
  • The label should be the field name (e.g. "consumption-price")

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions