Hi,
The homewizard watermeter has two sensors that i can read (translated):
sensor.watermeter_actual_water_usage (which indicated the usage in Liter)
sensor.watermeter_total_water_usage (which indicates the usage in m3)
I’ve tried several things but i can’t get a new sensor that tracks the usage daily.
Besides other things, i tried the code below with the other (current) sensor as well but i can’t get it to work.
What am i doing wrong? I can see the sensor but the value stays zero
utility_meter:
daily_water:
source: sensor.watermeter_total_water_usage
name: Water Usage Daily Utility Config
cycle: daily
template:
- sensor:
- name: "Water Usage Daily"
unique_id: water_usage_daily
unit_of_measurement: "L"
device_class: water
state_class: total_increasing
state: >-
{{states('sensor.daily_water') | float(0) * 0.001}}
DCSBL
(Duco)
July 24, 2023, 6:44pm
2
If I am not mistaken; You can create a utility meter directly from the UI without having to make any YAML. After connecting the Water meter to Home Assistant you can create a daily-usage meter out of the box.
Click here →
Then hit ‘Create helper’ → Utility meter
Select ‘Total Liter’ from your water meter, and configure the rest (self explaining)
Hope this helps . if it does you can mark this as ‘solution’, that will help others.
1 Like
Thanks for your quick reaction!
I tried that but the status was unknown:
After turning on the water to test,
It was working.
Thanks a lot for your help!
1 Like
Because the total value is in m3,
I created a template so it could present the value in Liters.
- sensor:
- name: Daily_Water_Meter_in_Liter
unit_of_measurement: L
device_class: current
state_class: measurement
state: >
{{ states('sensor.daily_water_meter') | float(default=0.0) | multiply(1000) | round(0) }}
The Liters are not being calculated correctly
Original :
Created one:
Where did i go wrong?
Because of the measurement in the helper i changed the template.
- sensor:
- name: Daily_Water_Meter_in_Liter
unit_of_measurement: L
device_class: current
state_class: measurement
state: >
{{ states('sensor.daily_water_meter') | float(default=0.0) | multiply(100) | round(2)}}
That seems to be working:
But with a larger amount this was not working so i had to bring it back to 1000.
It would be 16,6 and thats not good So for a lower usage it is less accurate.
Is there a way to also print the decimal value if the volume is less then 10?
Just as Raptile I’m running into some issues.
I can’t get it to duplicate the values that the HomeWizard app is displaying
Could you paste your helper and dashboard card in this topic please?
1 Like
anybody got it working eventually?