flexmeasures.data.queries.sensors

Functions

flexmeasures.data.queries.sensors.query_sensor_by_name_and_generic_asset_type_name(sensor_name: str | None = None, generic_asset_type_names: list[str] | None = None, account_id: int | None = None) Select

Match a sensor by its own name and that of its generic asset type.

Parameters:
  • sensor_name – should match (if None, no match is needed)

  • generic_asset_type_names – should match at least one of these (if None, no match is needed)

  • account_id – Pass in an account ID if you want to query an account other than your own. This only works for admins. Public assets are always queried.

flexmeasures.data.queries.sensors.query_sensors_by_proximity(latitude: float, longitude: float, generic_asset_type_name: str | None, sensor_name: str | None, account_id: int | None = None) Select

Order them by proximity of their asset’s location to the target.