Counting water usage with the Watermeterkit

Watermeterkit is an awesome idea to count water usage on most Dutch watermeters (possibly in other countries too). With these steps, it would be easy to add into Home Assistant to show usage in litres or m³.

Steps to install

  1. Make sure the Watermeterkit is installed and connected to your Home Assistant install.
  2. Create a counter in the helpers screen, where the initial value is the current value of your meter. This will be in litres, so fill in the red numbers too.
  3. Add the blueprint (No need to copy this, you can press the add button instead) and make an automation from it. Setting the total consumption counter from the Watermeterkit entities as well as the helper counter you just created.

My Home Assistant (Links to a gist since HA has issues with blueprints containing multiple code blocks)

  name: Watermeterkit Meter Value
  description: Update a counter when the sensor gets updated
  domain: automation
      name: Watermeterkit Total Consumption counter
      description: Watermeterkit Total consumption counter (provided by ESPHome)
        entity: {}
      name: Self made helper counter
      description: The counter you just made in step 2
      default: []
        action: {}
mode: single
- platform: state
  entity_id: !input 'watermeterkit'
- condition: not
  - condition: or
    - condition: state
      entity_id: !input 'watermeterkit'
      state: '0.000'
    - condition: state
      entity_id: !input 'watermeterkit'
      state: unavailable
    - service: counter.increment
        entity_id: !input 'counter'

Congrats! The counter should now show the total usage in litres!

Extra options

  1. Optionally, Create a sensor to show the meter value in m³ (Update the sensor ID and counter ID where needed):
  - platform: template
        friendly_name: "Water meter consumption"
        unique_id: "sensor.water_meter_total_m3"
        value_template: >
          {{ states('counter.watermeter_consumption_counter') |float * 0.001 }}
        unit_of_measurement: m³
  1. Optionally, add a utility_meter on this sensor to show usage over different periods (Update the sensor ID where needed):
      source: sensor.water_meter_total_m3
      cycle: daily
      source: sensor.water_meter_total_m3
      cycle: monthly
      source: sensor.water_meter_total_m3
      cycle: yearly

I’ve seen the suggestion for the Counter in the ‘ha-watermeter-kit’ Discord channel recently. I ran into problems when reprogramming the Esp32, the values became zero (0) and I had to adjust values using template sensors etc.

This Helper + Automation approach is much more convenient to adjust incorrect values.

The imported blueprint is crippled, but from your instructions and source above I was able to create a correct automation myself.
Got it up and running now, Thanks!

1 Like

Cool blueprint!
However I’m not sure that the counter you use is the best way.
What if you don’t have wifi for some time? Then all the water you use is not counted?
As soon as the watermeterkit is back online, the meter value entity is updated, but the self made counter only increments by 1.

I just made an utility_meter sensor. This sensor has a ‘Calibrate’ service that lets you set it to a value.
With a ‘trick’ that i red somewhere I made sure that this utility_meter never resets:

  source : sensor.water_meter_total_consumption
  name   : Waterusage Total
  cron   : '0 0 * */1000 *'

The cron line says that the sensor only resets every 1000 months (83 years). That’s enough :smiley: