Modbus set device_class in slaves (#103442)

This commit is contained in:
jan iversen
2023-11-05 20:20:13 +01:00
committed by GitHub
parent 806205952f
commit 701a93c298

View File

@@ -168,6 +168,7 @@ class SlaveSensor(
self._attr_unique_id = f"{self._attr_unique_id}_{idx}"
self._attr_native_unit_of_measurement = entry.get(CONF_UNIT_OF_MEASUREMENT)
self._attr_state_class = entry.get(CONF_STATE_CLASS)
self._attr_device_class = entry.get(CONF_DEVICE_CLASS)
self._attr_available = False
super().__init__(coordinator)