Properly show water consumption in liters

Hi guys,

I have a water consumption meter that displays how much m3 water I use everyday.
I want to have those values shown as Liters.

  1. So I created 4 helpers (Utitlity meters) that show how much water is consumped per hour/day/month/year.
  2. I then (according to some Thread in this forum) created a new sensor template that just multiplies each of my m3 value with factor 1000. So I get liters. Now I want to show those values.

But: For whatever **** reason only one of all sensors appears. I tripple checked that the sensor helpers are working properly (which they do) and that I spelled everything right.

Help would be appreciated.

Details:
Thats how the configuration.yaml looks like:


template:
  - sensor:
    - name: Wasserverbrauch_Garten_Tag_in_Liter
      unit_of_measurement: L
      device_class: current
      state_class: measurement
      state: >
        {{ states('sensor.wasserverbrauch_garten_tag') | float(default=0.0) | multiply(1000) | round(0) }}

template:
  - sensor:
    - name: Wasserverbrauch_Garten_Monat_in_Liter
      unit_of_measurement: L
      device_class: current
      state_class: measurement
      state: >
        {{ states('sensor.wasserverbrauch_garten_monat') | float(default=0.0) | multiply(1000) | round(0) }}

template:
  - sensor:
    - name: Wasserverbrauch_Garten_Stunde_in_Liter
      unit_of_measurement: L
      device_class: current
      state_class: measurement
      state: >
        {{ states('sensor.wasserverbrauch_garten_stunde') | float(default=0.0) | multiply(1000) | round(0) }}

template:
  - sensor:
    - name: Wasserverbrauch_Garten_Jahr_in_Liter
      unit_of_measurement: L
      device_class: current
      state_class: measurement
      state: >
        {{ states('sensor.wasserverbrauch_garten_jahr') | float(default=0.0) | multiply(1000) | round(0) }}

When I enter those values in developer tools / template they show up proper working values.
When I want to add those sensors in a dashbaord, only the yearly sensor appears.
All others cant be found. I validated that the config.yaml is proper and HA says that there are no issues.
Any idea?
image

That should only appear once in your configuration.yaml file.

template:
  - sensor:
    - name: Wasserverbrauch_Garten_Tag_in_Liter
      unit_of_measurement: L
      device_class: current
      state_class: measurement
      state: >
        {{ states('sensor.wasserverbrauch_garten_tag') | float(default=0.0) | multiply(1000) | round(0) }}

    - name: Wasserverbrauch_Garten_Monat_in_Liter
      unit_of_measurement: L
      device_class: current
      state_class: measurement
      state: >
        {{ states('sensor.wasserverbrauch_garten_monat') | float(default=0.0) | multiply(1000) | round(0) }}

    - etc...
1 Like

I feel dumb from here to the moon. That was it, thanks man :slight_smile:

1 Like