Skip to content

Commit

Permalink
feat: Support Home Assistant water device_class (#18066)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
kamaradclimber and Koenkk authored Jun 19, 2023
1 parent 57aaa5a commit e083a6b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/extension/homeassistant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'},
Expand Down

0 comments on commit e083a6b

Please sign in to comment.