Skip to content

Commit 6fcb858

Browse files
Remove SensorCategory enum (#352)
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. closes #348
2 parents de9ac32 + 43a0dff commit 6fcb858

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
@@ -45,6 +45,7 @@
4545
- The code `UNDERVOLTAGE_SHUTDOWN` has been removed in favour of `UNDERVOLTAGE`.
4646
- New diagnostic codes have been added to cover more cases, especially for inverters.
4747
- The codes have been renumbered.
48+
- 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.
4849

4950
## Bug Fixes
5051

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)