Modbus set device_class in slaves (#103442)

This commit is contained in:
jan iversen 2023-11-05 20:20:13 +01:00 committed by Franck Nijhof
parent 9327c51115
commit 9a37868244
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3

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)