I am configuring water consumption using input.number helper ( in M3) and template sensor.
The templace sensor does not support the device_class water as there is an error " Value is not accepted. Valid values: “apparent power”, “aqi” , “battery” , …
below the template.yaml file
- sensor:
- name: "water meter monthly"
unit_of_measurement: "m³"
unique_id: "water meter"
device_class: water
state_class: total_increasing
state: "{{states('input_number.water_monthly') }}"
If i change the device_class to gas for example it works.
This is surprising as this is normally supported.
Anu advice please
The extension uses lists to check if the input is correct, and throws an error if the value is not correct. So the list used by the VSCode extension is incorrect, but if you save this, it would work fine in HA.