I created a counter which is driven by an automation which increases when a sensor switches from off to on. I’m interested in to get daily and monthly stats using the “Create Helper”->“Utility Meter” functionality in the UI , just like I setup counters for energy etc.
However the UI does not offer the counter as input sensor (though I can add it to a card), even after HA restart. From other sensors which directly report a number such as compressor starts utility meters can be created.
Is this a limitation of the UI and can I add a utility meter manually, did I miss something when setting up the counter or does this require another approach?
That’s the code from the counter and automation (the goal is to increase the counter when the heatpump starts a deice operation)
counter:
abtauzaehler:
name: Abtauzähler
initial: 0
step: 1
automation:
- alias: "Abtaubeginn"
trigger:
platform: state
entity_id: sensor.abtauen
from:
- 'unknown'
- 'unavailable'
- 'Aus'
to: 'Ein'
action:
- entity_id: counter.abtauzaehler
service: counter.increment