Skip to content

Conversation

@joshuaunity
Copy link
Contributor

@joshuaunity joshuaunity commented Jan 8, 2026

Description

This PR adopts a new shape for our SensorsToShowSchema, and also includes the adaptation of the flex-config into the schema as well.

TODO

  • Add changelog entry
  • Allow backwards compatibility for data with the old schema structure
  • Implement new schema structure to allow sensor or sensors, as well as assets' flex-config to be added to plots
  • Update all existing sensorToShowSchema test cases with the new expectations

Look & Feel

None

How to test

This new feature can only be interacted with through the API for now.

  1. Pick any asset(make sure it has sensors you can reference)
  2. Go to the API http://localhost:5000/api/v3_0/assets/<asset_id>
  3. Update the asset's sensor_to_show with the below data

NOTE: for the below, use sensors that are under the current asset being updated

[
  {
    "title": "No Title",
    "sensors": [
      <sensor_id>
    ]
  },
  {
    "title": "No Title 2",
    "plots": [
   
      {
        "asset": <asset_id>,
        "flex-model": "soc-min"
      },
      {
        "sensors": [
          <sensor_id>,
          <sensor_id>
        ]
      }
    ]

  }
]

Further Improvements

Support for the addition of fixed values as plot entries.

Related Items

This PR closes #1880

Sign-off

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on code under GPL or other license that is incompatible with FlexMeasures

Signed-off-by: joshuaunity <oghenerobojosh01@gmail.com>
@joshuaunity joshuaunity self-assigned this Jan 8, 2026
@joshuaunity joshuaunity added enhancement New feature or request API upgrading labels Jan 8, 2026
@read-the-docs-community
Copy link

read-the-docs-community bot commented Jan 8, 2026

Documentation build overview

📚 flexmeasures | 🛠️ Build #31072172 | 📁 Comparing 6fd81be against latest (92d4027)


🔍 Preview build

Show files changed (7 files in total): 📝 7 modified | ➕ 0 added | ➖ 0 deleted
File Status
changelog.html 📝 modified
genindex.html 📝 modified
_autosummary/flexmeasures.data.schemas.generic_assets.html 📝 modified
_autosummary/flexmeasures.data.schemas.utils.html 📝 modified
_autosummary/flexmeasures.utils.coding_utils.html 📝 modified
_autosummary/flexmeasures.utils.html 📝 modified
api/v3_0.html 📝 modified

joshuaunity and others added 11 commits January 8, 2026 20:36
Signed-off-by: joshuaunity <oghenerobojosh01@gmail.com>
Signed-off-by: joshuaunity <oghenerobojosh01@gmail.com>
Signed-off-by: joshuaunity <oghenerobojosh01@gmail.com>
Signed-off-by: joshuaunity <oghenerobojosh01@gmail.com>
Signed-off-by: joshuaunity <oghenerobojosh01@gmail.com>
Signed-off-by: joshuaunity <oghenerobojosh01@gmail.com>
Signed-off-by: joshuaunity <oghenerobojosh01@gmail.com>
Signed-off-by: joshuaunity <oghenerobojosh01@gmail.com>
Signed-off-by: joshuaunity <oghenerobojosh01@gmail.com>
@joshuaunity joshuaunity requested a review from nhoening January 19, 2026 15:59
Co-authored-by: Felix Claessen <30658763+Flix6x@users.noreply.github.com>
Signed-off-by: JDev <45713692+joshuaunity@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API enhancement New feature or request upgrading

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow SensorsToShowSchema to include flex-config

3 participants