Thank you for the information because KNX associated with Home assistant is not usual and it is difficult to find information.
The gas consumption display works and I tried to reproduce the same for the water consumption but I encounter a problem.
knx_sensor.yaml
#Compteur gaz
- name: compteur_gaz
state_address: "9/7/1"
type: "volume"
sync_state: every 30
state_class: total_increasing
#Compteur eau (litres)
- name: compteur_eau
state_address: "9/7/12"
type: "volume_liquid_litre"
sync_state: every 30
state_class: total_increasing
customize.yaml
sensor.compteur_gaz:
device_class: gas
unit_of_measurement: "m³"
sensor.compteur_eau:
device_class: water
unit_of_measurement: "L"
the device class “water” is not accepted and I have this error message
Value is not accepted. Valid values: “apparent_power”, “aqi”, “awning”, “battery”, “battery_charging”, “blind”, “carbon_dioxide”, “carbon_monoxide”, “cold”, “connectivity”, “current”, “curtain”, “damper”, “date”, “door”, “duration”, “energy”, “frequency”, “garage”, “garage_door”, “gas”, “gate”, “heat”, “humidity”, “illuminance”, “light”, “lock”, “moisture”, “monetary”, “motion”, “moving”, “nitrogen_dioxide”, “nitrogen_monoxide”, “nitrous_oxide”, “occupancy”, “opening”, “outlet”, “ozone”, “plug”, “pm1”, “pm10”, “pm25”, “power”, “power_factor”, “presence”, “pressure”, “problem”, “receiver”, “running”, “safety”, “shade”, “shutter”, “signal_strength”, “smoke”, “sound”, “speaker”, “sulphur_dioxide”, “switch”, “tamper”, “temperature”, “timestamp”, “tv”, “update”, “vibration”, “volatile_organic_compounds”, “voltage”, “window”.
The device class “water” is well mentioned in the documentation sensor (devices)
The problem is the same with the device class “volume”