Skip to main content

Counting water usage with the Watermeterkit

·2 mins
Table of Contents

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³.

Watermeterkit on my watermeter

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.
    Counter creation
  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

blueprint:
  name: Watermeterkit Meter Value
  description: Update a counter when the watermeterkit.nl sensor gets updated
  domain: automation
  input:
    watermeterkit:
      name: Watermeterkit Total Consumption counter
      description: Watermeterkit Total cosumption counter (provided by ESPHome)
      selector:
        entity: {}
    counter:
      name: Helper Counter
      description: The helper counter you made
      default: []
      selector:
        entity:
  source_url: https://gist.github.com/Techwolf12/e7f3bf88d33c803b7b024e7e229a1c81
mode: single
trigger:
  platform: state
  entity_id: !input 'watermeterkit'
condition:
  - condition: not
    conditions:
  - condition: or
    conditions:
    - condition: state
      entity_id: !input 'watermeterkit'
      state: '0.000'
    - condition: state
      entity_id: !input 'watermeterkit'
      state: unavailable
action:
  - service: counter.increment
    target:
      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):
sensor:
  - platform: template
    sensors:
      water_meter_total_m3:
        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: 
  1. Optionally, add a utility_meter on this sensor to show usage over different periods (Update the sensor ID where needed):
utility_meter:
    water_daily:
      source: sensor.water_meter_total_m3
      cycle: daily
    water_monthly:
      source: sensor.water_meter_total_m3
      cycle: monthly
    water_yearly:
      source: sensor.water_meter_total_m3
      cycle: yearly