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

Implement fallback attribute mechanism in the flex-model load step #914

Open
victorgarcia98 opened this issue Nov 27, 2023 · 1 comment
Open

Comments

@victorgarcia98
Copy link
Contributor

The recently created QuantityOrSensor Marshmallow class (#897) allows defining a field with a Sensor or with a quantity. This enables the use of Sensors (time-varying data) or fixed values (quantities) for the inputs of the Scheduler.

If the value is not provided, we should (and we usually do) default to a fallback attribute that lives in the sensor or asset of the target device. This fallback mechanism should be built-in in the flex-model deserialization step. This class already has the sensor as its input and can be used in the load step.

Credits: #909 (comment)

@nhoening
Copy link
Contributor

I like the idea to let the Marshmallow schema sort out where this comes from. Not 100% convinced yet, though.

This is relevant to discussion #990

The function get_continuous_time_series_from_quantity_or_sensor() might give an indication on which fields to start with here.

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

No branches or pull requests

3 participants