Skip to content

Commit 2fb2c88

Browse files
Remove SensorCategory enum
This enumeration was not useful and potentially confusing. Sensors can report different sensor metrics, and they could belong to several of these categories simultaneously. This defeats the purpose of having singular categories for sensors. We need to rethink how to categorize sensors. Until then, having it does not add any value, and therefore it has been removed. Signed-off-by: Tiyash Basu <[email protected]>
1 parent 84fd05d commit 2fb2c88

File tree

2 files changed

+1
-30
lines changed

2 files changed

+1
-30
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
- Rename `SensorStateCode.SENSOR_STATE_CODE_ON` to `SensorStateCode.SENSOR_STATE_CODE_OK`, to better indicate that we do not control on/off state of sensors.
4242
- Rename `ComponentData` to `ElectricalComponentTelemetry` to better specify its purpose of encapsulating general telemetry data from electrical components.
4343
- Rename `SensorData` to `SensorTelemetry` to better specify its purpose of encapsulating general telemetry data from sensors.
44+
- Removed `SensorCategory` enum, since it was not useful and potentially confusing. Sensors can report different sensor metrics, and they could belong to several of these categories simultaneously. This defeats the purpose of having singular categories for sensors. We need to rethink how to categorize sensors. Until then, having it does not add any value, and therefore it has been removed.
4445

4546
## Bug Fixes
4647

proto/frequenz/api/common/v1/microgrid/sensors/sensors.proto

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,6 @@ import "frequenz/api/common/v1/microgrid/lifetime.proto";
1515

1616
import "google/protobuf/timestamp.proto";
1717

18-
// Enumerated sensor categories.
19-
enum SensorCategory {
20-
// Unspecified
21-
SENSOR_CATEGORY_UNSPECIFIED = 0;
22-
23-
// Thermometer (temperature sensor)
24-
SENSOR_CATEGORY_THERMOMETER = 1;
25-
26-
// Hygrometer (humidity sensor)
27-
SENSOR_CATEGORY_HYGROMETER = 2;
28-
29-
// Barometer (pressure sensor).
30-
SENSOR_CATEGORY_BAROMETER = 3;
31-
32-
// Pyranometer (solar irradiance sensor).
33-
SENSOR_CATEGORY_PYRANOMETER = 4;
34-
35-
// Anemometer (wind velocity and direction sensor).
36-
SENSOR_CATEGORY_ANEMOMETER = 5;
37-
38-
// Accelerometers (acceleration sensor).
39-
SENSOR_CATEGORY_ACCELEROMETER = 6;
40-
41-
// General sensors, which do not fall in any of the above categories
42-
SENSOR_CATEGORY_GENERAL = 7;
43-
}
44-
4518
// Enum to represent the various states that a sensor can be in.
4619
// This enum is unified across all sensor categories for consistency.
4720
enum SensorStateCode {
@@ -82,9 +55,6 @@ message Sensor {
8255
// An optional name for the sensor.
8356
string name = 3;
8457

85-
// The category of the sensor.
86-
SensorCategory category = 4;
87-
8858
// The sensor manufacturer.
8959
string manufacturer = 5;
9060

0 commit comments

Comments
 (0)