Skip to content

Commit

Permalink
Set suggested_unit to m/s on wind sensors
Browse files Browse the repository at this point in the history
  • Loading branch information
astrandb committed Jul 19, 2023
1 parent 265b9c5 commit 1ea8aa6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/viva/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class ViVaSensorDescription(SensorEntityDescription):
device_class=SensorDeviceClass.WIND_SPEED,
translation_key="wind_strength",
native_unit_of_measurement=UnitOfSpeed.METERS_PER_SECOND,
suggested_unit_of_measurement=UnitOfSpeed.METERS_PER_SECOND,
state_class=SensorStateClass.MEASUREMENT,
)

Expand All @@ -73,6 +74,7 @@ class ViVaSensorDescription(SensorEntityDescription):
device_class=SensorDeviceClass.WIND_SPEED,
translation_key="gust_strength",
native_unit_of_measurement=UnitOfSpeed.METERS_PER_SECOND,
suggested_unit_of_measurement=UnitOfSpeed.METERS_PER_SECOND,
state_class=SensorStateClass.MEASUREMENT,
)

Expand Down

0 comments on commit 1ea8aa6

Please sign in to comment.