flexmeasures.api.common.utils.migration_utils

This module is part of our data model migration (see https://github.com/SeitaBV/flexmeasures/projects/9). It will become obsolete when we deprecate the fm0 scheme for entity addresses.

Functions

flexmeasures.api.common.utils.migration_utils.get_sensor_by_unique_name(sensor_name: str, generic_asset_type_names: List[str] | None = None) Sensor | Tuple[dict, int]

Search a sensor by unique name, returning a ResponseTuple if it is not found.

Optionally specify a list of generic asset type names to filter on. This function should be used only for sensors that correspond to the old Market class.