woutike
(Tom Wouters)
November 5, 2022, 12:20pm
1
Hello, i was trying to setup the water consumption in the energy dashboard, but was not able to select my entity ‘water totaalteller’ that i get from the ESPHome pulse counter. The unit of measurement is set to m³, so i thought that was enough. But after trying some syntax changes, i noticed that i couldn’t select ‘water’ or ‘volume’ as a device class for this entity. For the gas counter i had no problems.
Am i doing something wrong? Thanks in advance. Tom
sensor:
- platform: pulse_counter
pin: GPIO12
unit_of_measurement: l/min
name: 'water teller'
filters:
- multiply: 0.1 # (60s/1 pulses per l/min) 1 puls = ½ liter
total:
unit_of_measurement: m³
name: 'water totaalteller'
device_class: '' # cannot set to 'volume' or 'water'
filters:
- multiply: 0.0005 # (1/2000 pulses per m³)
- offset: 152.045
- platform: pulse_counter
pin: GPIO14
unit_of_measurement: m³/h
name: 'gas teller'
filters:
- multiply: 1 # (60s/1 pulses per l/min) 1 puls = 0,01m³
total:
unit_of_measurement: m³
name: 'gas totaalteller'
device_class: 'gas'
filters:
- multiply: 0.01 # (1/100 pulses per m³)
- offset: 145.122
pbranly
(Philippe)
November 5, 2022, 12:25pm
2
You have to use a recent version of esphome
Mine is 2022.10.2
For information water port of my code
< ########### EAU ##################################################################################
Debit detecteur compteur d´eau
platform: pulse_meter
id: capteur_inductif_eau_pulse
pin:
number: GPIO25
mode: INPUT_PULLUP
name: “Debit compteur d’eau”
unit_of_measurement: “l/mn”
icon: mdi:water
internal_filter: 200ms
#########################
Consommation Totale d’Eau Jour
total:
name: "Compteur Eau Jour"
icon: mdi:water
device_class: water
unit_of_measurement: 'L'
accuracy_decimals: 0
filters:
- multiply: 1 # (pour resrer en l)
id: compteur_eau_jour
#########################
#########################
Consommation eau du jour en m3
platform: template
name: “Compteur eau Jour m3”
icon: mdi:water
lambda: |-
return id(compteur_eau_jour).state * 0.001;
device_class: water
unit_of_measurement: “m³”
accuracy_decimals: 3
id: compteur_eau_jour_m3
state_class: total_increasing
########### EAU ############################################################################### >
Phil
woutike
(Tom Wouters)
November 8, 2022, 6:22pm
3
Phil
Thanks!! My ESPHome add-on wasn’t updated anymore… I’ve installed a newer add-on, that did the trick.
sebster
November 18, 2022, 3:11pm
4
Same issue here, I was “stuck” on some February 2022 add-on. Deinstalled it, added it again as an Add-On, everything was still there and the update helped. Thanks!
solomos
(Gerasimos Solomos)
January 26, 2023, 4:02pm
5
Has anyone solve this problem ??
Am currently on HA 2023.1.7 and esphome v2022.12.7 and I can’t add my node under Energy dashboard.
Getting No matching statistics found
pbranly
(Philippe)
January 27, 2023, 7:57am
6
Please verify the content of your sensor . If it has the necessary attributes as described here above, it will work
Phil
1 Like
solomos
(Gerasimos Solomos)
January 29, 2023, 5:06pm
7
I confirm that as soon as you add all three aittributes it works!
Thank you everybody