KNX - Integrating your water usage

Hi all,

I am trying to implement my water usage into HA energy dashboard.
However my KNX-based water meter (LINGG&JANKE) is not shown up.

I used “type: volume_m3” but the sensor is not displayed in the dropdown.

Anyone using this feature with knx?

Thanks,
Tobias

You’ll have to add device_class: water and a state_class to the config.

1 Like

Thank you very much! :slight_smile:

please help me, I can’t figure out shed, you need to specify the state_class parameter

  • platform: template
    scan_interval: 60
    state_class: total
    sensors:
    water_ex:
    friendly_name: Водопотребление
    unit_of_measurement: ‘m³’
    value_template: ‘{{ states.counter.water_counter_int.state }}’
    device_class: water

Invalid config for [sensor.template]: [state_class] is an invalid option for [sensor.template]. Check: sensor.template->sensors->water_ex->state_class. (See ?, line ?).

or

  • platform: template
    scan_interval: 60
    sensors:
    water_ex:
    friendly_name: Водопотребление
    unit_of_measurement: ‘m³’
    value_template: ‘{{ states.counter.water_counter_int.state }}’
    device_class: water
    state_class: total

nvalid config for [sensor.template]: [state_class] is an invalid option for [sensor.template]. Check: sensor.template->state_class. (See ?, line ?).

You’ll probably have to use the modern yaml syntax, not the old one with platform: .... See Template - Home Assistant

The discussion above is about the knx integration, as you can read in the topic. It’s Syntax is not applicable for other integrations such as template.