Gas Meter Reading / MQTT / Tasmota integration / counter entity: sensor.gaszahler_counter_c1 0,001m3 / How to integrate into Energy Dashboard

Hello,

I do have a Tasmota entity: sensor.gaszahler_counter_c1
It counts 0,001m3 gas that is used for heating.

What do I need to enter into configuration.yaml to be able to integrate it into the Energy Dashboard?

It would like to see Gas KWh consumed and m3 consumed.

Here 2 pictures of the setup:


Additional Info on the Used Hard & Software:

Obtained on EBay:

Wiki Page of the Product:
https://wiki.gorjup.de/doku.php?id=public:gaszaehler

Thank You !

I was able to integrate it into the Energy dashboard with the following entry into the customize.yaml:

sensor.gaszahler_counter_c1:
device_class: gas
unit_of_measurement: m³
state_class: total_increasing

Remaining Problem is the value :94e8ff77ed64898b89afd33b1fc008a0df546f47_2_583x499

Its of course 0,33 m3 not 33 m3 consumed Gas as shown.

How can I fix this?
With a Helper or a calculation with a new dummy entity?

Please advise

Thank You

Regards

Hello,
I tried separately those 2 entries in configuration.yaml:

1:

  • platform: template
    sensors:
    gaszähler_m3:
    friendly_name: „Gaszähler m3“
    unit_of_measurement: ‘m³’
    value_template: “{{ ( states(‘sensor.gaszahler_counter_c1’) | int / 1000 ) | round(1) }}”

2:

template:

  • sensor:
    • name: “Gaszähler_m3”
      unit_of_measurement: “m³”
      value_template: “{{ ( states(‘sensor.gaszahler_counter_c1’) | int / 1000 ) | round(1) }}”

Is this the right approach?
Im still struggling with the yaml format - can’t get it to work properly.

Can someone help me with the right format ? With the right Entry in configuration.yaml for this new desired sensor in m3?

Thank You!

Regards

Hi,

I have the same problem. I included the following lines in configuration.yaml:

template:
  - sensor:
      - name: "Gaszähler m3"
        unique_id: gaszaehler_m3
        state: "{{ states ('sensor.tasmota_counter_c1') | float * 0.01 }}"
        unit_of_measurement: "m³"
        icon: "mdi:gas-station"
        device_class: gas
        state_class: total_increasing
  - sensor:
      - name: "Gaszähler kWh"
        unique_id: gaszaehler_kwh
        state: "{{ (states ('sensor.gaszaehler_m3') | float(0) * 0.9533 * 10.3) | round(0) }}"
        unit_of_measurement: "kWh"
        icon: "mdi:gas-station"
        device_class: energy
        state_class: total_increasing

The first converts binary impulses to m³, the second m³ to kWh. In the energy dashboard, I only have kWh as a source.

How did you make the conversions on the Tasmota device? Is it a self compiled custom build?

Hi Oli,

that did it :slightly_smiling_face:

Thank you so much!

I can now select m3 or kWh in the energy dashboard. I selected kWh.



In my first post in this tread you can find 2 links - I bought the sensor on eBay.
There is also a wiki page - there you can see how the seller did it.

Thank You

Regards

1 Like

Hi Oli,
probably a stupid question :wink: :slight_smile:

I have the following gas data -

0050568861201EDD90940FDD436E58D0_pdf

I Can just update them in the configuration.yaml - in the highlighted green box?

After a reboot everything then is fine?

THX!

Hi,
yes, correct.
By the way: In my setup there are still some peaks in energy dashboard when the sensor was offline. Still investigating that.

Thank you Oli,

another small question, the kWh sensor counts in full kWh, can we do it in 0,1 kWh so I have a more detailed view in the Energy Dashboard?

Not sure, maybe with round(1). Didn’t try that so far

Hallo zusammen, bin ein Neuling undhabe eure Codes benutzt nur bekomme ich keine daten im Energie dashboard da der sensor nicht gefunden wird.
Muss ich noch etwas beachten

Hallo,
hier die Einträge welche hier funktioniert haben:

customize.yaml:

sensor.gaszahler_counter_c1:
  device_class: gas
  unit_of_measurement: m³
  state_class: total_increasing

configuration.yaml:

homeassistant:
  customize: !include customize.yaml

template:
  - sensor:
      - name: "Gaszaehler Keller m3"
        unique_id: gaszaehler_keller_m3
        state: "{{ states ('sensor.gaszahler_counter_c1') | float * 0.01 }}"
        unit_of_measurement: "m³"
        icon: "mdi:gas-station"
        device_class: gas
        state_class: total_increasing
  - sensor:
      - name: "Gaszaehler Keller kWh"
        unique_id: gaszahler_kwh
        state: "{{ (states ('sensor.gaszaehler_keller_m3') | float(0) * 0.9505 * 11.495) | round(1) }}"
        unit_of_measurement: "kWh"
        icon: "mdi:gas-station"
        device_class: energy
        state_class: total_increasing

1 Like

Einstellungen_–_Home_Assistant


Danke für deine Antwort nun hat es geklappt, warum weiß ich noch nicht. Habe nur die Daten custome nicht genommen weil es nicht gefunden wurde obwohl ich es angelegt hatte. Desweiteren musste ich den Namen " Gaszaehler Keller m3 " übernehmen sobald ich ihn geändert hatte ging es nicht. Wenn ich den Brennwert ändere geht es auch nicht. Werde aber weiter probieren bin ja froh das es erstmal klappt.
Danke

Hi,
note the line: include customize.yaml in the configuration.yaml.

If this line is not present the customize.yaml won’t be used.

Regards

Hey, I did it the same way an it works, But, after it counts some m3 there soul be a number for kWh. But I still found 0 kWh…

Has anyone bought one of these to use on the same type of gas meter in the UK. Also how do the gas companies feel attaching one of these devices to their meters.