Hi, I have been trying to solve this problem for way too long. I’ve been to the discord and combed the forums. I’ve applied all advice I could find with no success.
I am using the AI on the edge ESP32-CAM setup to read my water meter, it works fairly well and also supplies a meter. My issue stems from needing to format my result, I use the decimal shift config which malformed some data in the utility meter it supplies. This required me to create my own utility meter in order to get monthly usage stats/cost.
I use the TOTAL value that the water meter sends over MQTT as an input into my own utility meter helper. I can add the water meter TOTAL value to the energy dashboard no problem but, I can’t add the water utility meter that uses the TOTAL value sensor as input, it makes no sense to me!
The utility meter is receiving data and has updated its value several times over the course of about a week, so it’s receiving and parsing data, it shows up in dev tools > statistics
and reports ‘No Issues’.
I saw in dev tools > states
that the utility meter did not inherit the device_class
from the input sensor so, I used the customization ability to add device_class: water
attr. Still can’t add it to the energy dashboard.
utility meter sensor > state data:
# Added name, state for clarity
name: sensor.water_usage_monthly
state: 10.025
state_class: total_increasing
source: sensor.water_total_m3
status: collecting
last_period: '0'
last_valid_state: '5655.181'
meter_period: monthly
cron pattern: 0 0 29 * *
last_reset: '2023-06-13T01:27:00.304177+00:00'
unit_of_measurement: m3
icon: mdi:water-percent
friendly_name: Water usage monthly
device_class: water
input sensor to utility meter > state data:
# Added name, state for clarity
name: sensor.water_total_m3
state: 5655.181
state_class: measurement
unit_of_measurement: m³
device_class: water
friendly_name: water total m3
I would appreciate any help on this issue!
TIA!