Skip to content

Commit

Permalink
Use native_unit_of_measurement for custom sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
killer0071234 committed May 21, 2024
1 parent 2952684 commit e74a858
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/hiq/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
ATTRIBUTION_PLC = "Data read from HIQ controller"
DEVICE_DESCRIPTION = "HIQ controller"
DEVICE_HW_VERSION = "2/3"
DEVICE_SW_VERSION = "0.3.0"
DEVICE_SW_VERSION = "0.3.3"

LOGGER = logging.getLogger(__package__)
SCAN_INTERVAL = timedelta(seconds=10)
Expand Down
2 changes: 1 addition & 1 deletion custom_components/hiq/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ async def async_setup_entry(
device_class=SensorDeviceClass(sensor_config[CONF_DEVICE_CLASS])
if sensor_config.get(CONF_DEVICE_CLASS) is not None
else None,
unit_of_measurement=sensor_config.get(CONF_UNIT_OF_MEASUREMENT),
native_unit_of_measurement=sensor_config.get(CONF_UNIT_OF_MEASUREMENT),
),
dev_info=dev_info,
value_template=value_template,
Expand Down

0 comments on commit e74a858

Please sign in to comment.