Skip to content

Migrate inflexible-device-sensors to inflexible-consumption and inflexible-production on flex-context #2239

Description

@Flix6x

Change schema, UI and interpretation in scheduler: replace the flex-context field inflexible-device-sensors (bare sensor IDs, sign read from each sensor's consumption_is_positive attribute) with two sign-explicit fields, named consistently with the consumption/production vocabulary used elsewhere (consumption-price/production-price, aggregate-consumption/aggregate-production, and the flex-model's consumption/production output fields from #2190):

  • inflexible-consumption: positive data is treated as consumption, negative data as production.
  • inflexible-production: positive data is treated as production, negative data as consumption (the FlexMeasures default).

Entries are sensor references ({"sensor": <id>}), optionally with source filters (following #2209), rather than bare IDs. A sensor whose explicit consumption_is_positive attribute contradicts the field it is listed under is rejected. The deprecated field remains supported (reading via the sensor attribute, as before), but cannot be mixed with the new fields in one flex-context.

The data migration assumes that existing inflexible devices are meant to be production-positive, unless they had the consumption_is_positive attribute (on the sensor, or falling back to its asset), in which case they are meant to be consumption-positive. The attribute is kept on the sensor, since trigger messages cannot be migrated.

Implemented in #2358 (superseding #2156).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions