There are at least three moments to consider: 1. When sensor data is UPSERTed 2. When a trigger references a sensor in its flex-model or flex-context 3. When a scheduler GETs sensor data Gathering some thoughts: ### 1. When sensor data is UPSERTed - It's still unknown whether the sensor will even be referenced in a flex-model or flex-context. ### 2. When a trigger references a sensor - Allows early validation whose results can be immediately returned to the user. - Sensor data may still get updated in the time between triggering (creating the scheduling job) and scheduling (executing the scheduling job). ### 2. When a scheduler GETs sensor data - Validation against the exact data that would be used in scheduling - Validation errors would show up in failed task logs. _Originally posted by @Flix6x in https://github.com/FlexMeasures/flexmeasures/pull/985#discussion_r1507411998_
Activity