kolia
September 14, 2022, 8:10am
1
Hello,
I have a counter that every tick represents one 1L off consumed water. I’d like to use utility meters in order to count dalty, weekly, etc. consumption. But utility meter requires a sensor which a counter is not. Is there a way to do that?
Should’nt a counter be considered as a sensor as well?
Herebelow is the automation code to increment the counter at every tick
- id: 532445d2-a9a1-4a1d-9b6d-e7c14b82a666
alias: Shelly Uni IN2
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.shelly_uni_channel_2_input
from: "on"
to : "off"
condition: []
action:
service: counter.increment
target:
entity_id: counter.eau
mode: queued
damu
September 14, 2022, 8:36am
2
Try to use sensor template and add it to meter media.
kslb
(KSLBe)
November 21, 2022, 9:26pm
4
I have exact the same problem…
Can you give me your example code for sensor and automation…
Thank you…
kolia
November 25, 2022, 5:49am
5
I set up afterwards a template sensor as such:
template:
- sensor:
- name: eau
unit_of_measurement: m³
device_class: water
state_class: total_increasing
state: "{{states('compteur_eau') | multiply(0.001) }}
Then this new sensor can be added to the energy panel. Go to settings/dashboard
RGB
November 28, 2022, 7:53am
7
Hi @damu I see I had exactly the same question this weekend https://community.home-assistant.io/t/creating-daily-months-stats-from-counter-through-utility-meter/ .
Being still pretty new to HA I do not understand your answer. Can you elaborate a bit?
Thanks!