I am following this guide to add gas monitoring capability to my HASS installation and have a problem that is driving me crazy as I can’t figure out what I’m doing wrong so any help would be appreciated.
My configuration entries are:
configuration.yaml:
sensor:
# For the gas usage sensor
- platform: template
sensors:
gas_meter:
friendly_name: Gas Meter
unit_of_measurement: "m³"
icon_template: "mdi:fire"
device_class: gas
value_template: "{{ states ('counter.gas_counter') | float(0) * 0.01}}"
The automation.yaml:
- alias: Gas Counting
# see https://community.home-assistant.io/t/gas-meter-from-xiaomi-aqara-door-sensor-zigbee/348032
# description: ''
mode: single
trigger:
- platform: state
entity_id: binary_sensor.gas_sensor_aqara
from: 'off'
to: 'on'
# condition: []
action:
- service: counter.increment
target:
entity_id: counter.gas_counter
Customize.yaml:
sensor.gas_meter:
# device_class: energy
state_class: measurement
last_reset: '2021-08-20T06:43:36.740703+00:00'
The energy setting for gas is:
The Gas Meter counter is incrementing:
And the problem is that the m3 is not showing but cost is being attributed:
What am I doing wrong, please?
Thanks.
Richard