Skip to content

Commit 521b808

Browse files
Rename SensorStateCode variant ON to OK in sensors.proto (#350)
Sensor state `ON` is misleading, as it can mislead users to think that the API controls the on/off state of the sensor. This is not the case, as the API only provides information about the sensor's state. The sensor's state can be `OK` (indicating that the sensor is functioning correctly) or `ERROR` (indicating that the sensor is in an error state). This change renames the `SENSOR_STATE_CODE_ON` variant to `SENSOR_STATE_CODE_OK`, which is more accurate and descriptive.
2 parents 31f568c + 3c6c248 commit 521b808

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
- Remove `SensorMetricSample` in favour of using `MetricSample` for sensors.
3939
- Remove `SensorMetric` enum, since it was unused and redundant.
4040
- Renamed `MetricSample.source` to `MetricSample.connection` to make it more specific as to what it refers to.
41+
- 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.
4142

4243
## Bug Fixes
4344

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ enum SensorStateCode {
5050
SENSOR_STATE_CODE_UNSPECIFIED = 0;
5151

5252
// The sensor is up and running.
53-
SENSOR_STATE_CODE_ON = 1;
53+
SENSOR_STATE_CODE_OK = 1;
5454

5555
// The sensor is in an error state.
5656
SENSOR_STATE_CODE_ERROR = 2;

0 commit comments

Comments
 (0)