I was wondering because you said : " It must be something like counter.xxxxxx"
I just installed a new instance of HA on a second virtual machine to avoid disrupting my production version.
I was able to display the electricity consumption without any problem but this is not the case for gas (the gas device-class exists).
knx.yaml
#Compteur gaz
- name: compteur_gaz2
state_address: "9/7/1"
type: "volume"
configuration.yaml
homeassistant:
packages: !include_dir_named knx
template:
- sensor:
- template:
- sensor:
- name: gaz
unit_of_measurement: "m³"
state_class: total_increasing
device_class: gas
state: "{{states('compteur_gaz2') | multiply(0.001) }}"
How to simplify the last line because the value is already in m3?
