Hello,
I have a clamp meter directly connected to the egress wire from my meter.
It sends data via Matt to mosquito already configured in HA.
My understanding was that I had to build an entity which gave energy measurements in kWh to be configured as energy source.
So I create a sensor:
If I go to developer tools I can correctly read values from energia_consumata unfortunately however in the Energy Usage graph I cannot see any value.
I read that it can take up 2 hours for new data to arrive but I configured this interface more than a day ago so I suspect I didn’t catch anything.
I have a arduino that logs instantaneous W (watts), every time the power changes the arduino sends an update of the new measure in watts.
This sensor is setup in the sensors.yaml like this:
# Power comes in via this sensor
- platform: mqtt
state_topic: "emon/phaseBig0"
name: "Power Top Floor"
unit_of_measurement: "W"
# it gets formatted as "Energy" by this integration
- platform: integration
name: "Top Floor Consumption"
source: sensor.power_top_floor
unit_prefix: k
My configuration.yaml now looks like this:
default_config:
homeassistant:
customize_glob:
sensor.*_energy:
last_reset: '1970-01-01T00:00:00+00:00'
device_class: energy
state_class: measurement
#This template is just to change Watts to Kilowatts and apply the kWh unit
template:
- sensor:
- name: "Top Floor energy"
unit_of_measurement: 'kWh'
state: >
{{(( states("sensor.top_floor_consumption") | float) /1000)}}
sensor: !include sensor.yaml
The “Top Floor energy” sensor appears in the “Energy” dropdown
Thanks so much.
I have a ZWave electric plug that shows a fixed and useless kWh data, and a useful W data, which I could put to use thanks to you ! I was afraid it was not working because of the time it takes to see something in the Energy Dashboard, but now everything seems ok.
Your info would be great in the doc.