sunpeek.db_utils.crud.get_sensors#

sunpeek.db_utils.crud.get_sensors(session, id=None, raw_name=None, plant_id=None, plant_name=None)#

Get all sensors, all sensors of a given plant, or a specific sensor. Note, parameters have the following precedence: id, name, plant_id, plant_name. So if a component name is given, all further parameters are ignored

Parameters:
  • session (Session)

  • id (int)

  • raw_name (str)

  • plant_id (int)

  • plant_name (str)

Return type:

Sensor object, or list of Sensor objects