Skip to content

Commit

Permalink
Merge pull request #5 from roku133/main
Browse files Browse the repository at this point in the history
add native_unit_of_measurement for RF sensors
  • Loading branch information
rrooggiieerr authored Jul 7, 2024
2 parents 482eac6 + 1274969 commit 2579e1b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/homeduino/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ async def async_setup_entry(
translation_key="temperature",
translation_placeholders={"unit": unit},
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
)

entities.append(
Expand All @@ -135,6 +136,7 @@ async def async_setup_entry(
translation_key="humidity",
translation_placeholders={"unit": unit},
device_class=SensorDeviceClass.HUMIDITY,
native_unit_of_measurement=PERCENTAGE,
)

entities.append(
Expand Down

0 comments on commit 2579e1b

Please sign in to comment.