Skip to content

SensorMetric is not used by SensorMetricSample #325

@llucax

Description

@llucax

What's needed?

We are defining a frequenz.api.common.v1.microgrid.sensors.SensorMetric but it doesn't seem to be used, as SensorMetricSample is using frequenz.api.common.v1.metrics.Metric instead.

Proposed solution

Use frequenz.api.common.v1.microgrid.sensors.SensorMetric instead of frequenz.api.common.v1.metrics.Metric in frequenz.api.common.v1.microgrid.sensors.SensorMetricSample.

Maybe consider removing the equivalent values from frequenz.api.common.v1.metrics.Metric after the move:

  // General sensor metrics
  METRIC_SENSOR_WIND_SPEED = 160;
  METRIC_SENSOR_WIND_DIRECTION = 162;
  METRIC_SENSOR_TEMPERATURE = 163;
  METRIC_SENSOR_RELATIVE_HUMIDITY = 164;
  METRIC_SENSOR_DEW_POINT = 165;
  METRIC_SENSOR_AIR_PRESSURE = 166;
  METRIC_SENSOR_IRRADIANCE = 167;

Use cases

No response

Alternatives and workarounds

No response

Additional context

After this is done, the microgrid API needs to be updated too:

Metadata

Metadata

Labels

part:protobufAffects the protocol buffer definition filesscope:breaking-changeBreaking change, users will need to update their codetype:enhancementNew feature or enhancement visitble to users

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions