I have a sensor, that counts my alway increasing gas meter based on an impulse reader and counter. The values are sent via MBus (MeterBus not Modbus) and MQTT to Homeassistant.
This sensor is perfect for the new feature in the energy page: “Add gas source”.
But i am banging my head; i do not get it working. The configuration page of the energy module always shows: No matching statistics found.
My version is: core-2021.9.2
The configuration is like this:
sensor:
- platform: mqtt
name: "Hauptgaszähler"
state_topic: "My/Topic/Path/MainGasVolume"
json_attributes_topic: "My/Topic/Path/MainGasVolume"
value_template: "{{ value_json.Value | float | round(2) }}"
unit_of_measurement: m³
device_class: energy
state_class: total_increasing
#last_reset: 2021-08-26T00:00:00+00:00 # Is not valid for templates
last_reset_value_template: "2021-08-26T00:00:00+00:00"
last_reset_topic: "My/Topic/Path/DummyResetTopic"
I have read many posts about this topic, but I get not even one sensor, showing up in the energy page.
I wanted the Energy integration to display my oil usage so piggybacked on the Gas section and converted oil consumption into kWh through a template entity. This couldn’t be input into the integration so I just used Node-Red to pass it to an MQTT entity which could.
This entity picks out from other entities the kWh of the day…