Hi all !
I had successfully plugged a zigbee button to my gas counter following this guide :
So i have a input_number increasing each 10L and a sensor that divide this value by 1000 to convert in m³ for the volume.
Here is my configuration :
- The input_number :
gas_counter:
min: 0
max: 100000000000
name: gas_counter
icon: "mdi:gas-station"
mode: box
For information only, the input_number is updated with nod red to avoir false counter when HA restart :
.
.
- The sensor :
- platform: template
sensors:
gas_volume:
friendly_name: "Gaz Volume"
unit_of_measurement: 'm³'
value_template: "{{ states('input_number.gas_counter') | int / 1000 | round(3) }}"
device_class: gas
# state_class: total
→ sensor is working BUT the state class is not ( HA refuse to restart, unsupported state )
.
.
.
- Finally the utility meter :
# gazpar
utility_meter:
daily_gas_volume:
source: sensor.gas_volume
cycle: daily
weekly_gas_volume:
source: sensor.gas_volume
cycle: weekly
monthly_gas_volume:
source: sensor.gas_volume
cycle: monthly
yearly_gas_volume:
source: sensor.gas_volume
cycle: yearly
.
.
The result :
.
.
In energy tab :
Don’t know WHERE and WHAT is sensor.gas_consumption_index_kwh cause i can’t found it anywhere in all my config file ( HA created this one automatically ? no existing in dev tools too btw )
→ Problem none of my sensor is accepted in energy panel. And why the state classe is unsupported ?
Any help would be gratefully appreciated ! Thk !