feat: Support Home Assistant water device_class (#18066)

This should be sufficient for https://www.zigbee2mqtt.io/devices/ZVG1.html to be water_consumed sensor to be usable in Energy dashboard (water section).

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
This commit is contained in:
Grégoire SeuxandKoen Kanters authored and GitHub committed 2023-06-19 19:21:43 +02:00
1 parent 57aaa5a85a
commit e083a6bff7
1 file changed
+4
+4
View File
@@ -732,6 +732,10 @@ export default class HomeAssistant extends Extension {
entity_category: 'diagnostic',
state_class: 'measurement',
},
water_consumed: {
device_class: 'water',
state_class: 'total_increasing',
},
x_axis: {icon: 'mdi:axis-x-arrow'},
y_axis: {icon: 'mdi:axis-y-arrow'},
z_axis: {icon: 'mdi:axis-z-arrow'},