Skip to content

Commit 4847f98

Browse files
committed
fix(number): Use correct attr for unit of measurement
Fix node-red-contrib-home-assistant-websocket#1138
1 parent 96e26a5 commit 4847f98

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

custom_components/nodered/number.py

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
CONF_ICON,
1414
CONF_ID,
1515
CONF_TYPE,
16+
CONF_UNIT_OF_MEASUREMENT,
1617
STATE_UNAVAILABLE,
1718
STATE_UNKNOWN,
1819
)
@@ -115,3 +116,6 @@ def update_discovery_config(self, msg):
115116
)
116117
self._attr_native_step = self._config.get(CONF_STEP_VALUE, DEFAULT_STEP)
117118
self._attr_mode = self._config.get(CONF_MODE, NumberMode.AUTO)
119+
self._attr_native_unit_of_measurement = self._config.get(
120+
CONF_UNIT_OF_MEASUREMENT
121+
)

0 commit comments

Comments
 (0)