jarek_waw
(Jarek)
November 21, 2023, 9:45am
1
hi
I have some trouble setting up my energy dashboard. I have MEW-01 device which gives me total energy forward and reverse in watts, and I have it configured through MQTT sensors:
- platform: mqtt
name: total_reverse_active_energy
device_class: power
state_class: total_increasing
unit_of_measurement: W
state_topic: "supla/devices/zamel-mew-01-3a25da/channels/0/state/total_reverse_active_energy"
- platform: mqtt
name: total_forward_active_energy
state_class: total_increasing
unit_of_measurement: W
device_class: power
state_topic: "supla/devices/zamel-mew-01-3a25da/channels/0/state/total_forward_active_energy"
I cannot figure out, how I can make these two configured as energy consumed and produced sources in the Energy dashboard.
I think it needs to be configured with Riemann sum:
- platform: integration
source: sensor.total_reverse_active_energy
name: energia_total_reverse_active_energy
round: 2
unit_prefix: k
- platform: integration
source: sensor.total_forward_active_energy
name: energia_total_forward_active_energy
round: 2
unit_prefix: k
but it still doesn’t show in the dropdown of the Energy configuration screen.
Desperately looking for help
tom_l
November 21, 2023, 9:48am
2
The state classes of your power sensors are incorrect. Should be:
- platform: mqtt
name: total_reverse_active_energy
device_class: power
state_class: measurement
unit_of_measurement: W
state_topic: "supla/devices/zamel-mew-01-3a25da/channels/0/state/total_reverse_active_energy"
- platform: mqtt
name: total_forward_active_energy
state_class: measurement
unit_of_measurement: W
device_class: power
state_topic: "supla/devices/zamel-mew-01-3a25da/channels/0/state/total_forward_active_energy"
jarek_waw
(Jarek)
November 21, 2023, 9:51am
3
ah all right. But these MQTT topics give me a total, increasing value. Still the ‘measurement’ is the correct state_class?
tom_l
November 21, 2023, 9:53am
4
Well in that case you have unit and device class incorrect and you don’t need the Riemann sum helpers, try this:
- platform: mqtt
name: total_reverse_active_energy
device_class: energy
state_class: total_increasing
unit_of_measurement: kWh
state_topic: "supla/devices/zamel-mew-01-3a25da/channels/0/state/total_reverse_active_energy"
- platform: mqtt
name: total_forward_active_energy
state_class: total_increasing
unit_of_measurement: kWh
device_class: energy
state_topic: "supla/devices/zamel-mew-01-3a25da/channels/0/state/total_forward_active_energy"
jarek_waw
(Jarek)
November 21, 2023, 9:59am
5
ok, so I have now:
- platform: mqtt
name: total_reverse_active_energy
device_class: energy
state_class: total_increasing
unit_of_measurement: kWh
state_topic: "supla/devices/zamel-mew-01-3a25da/channels/0/state/total_reverse_active_energy"
- platform: mqtt
name: total_forward_active_energy
state_class: total_increasing
unit_of_measurement: kWh
device_class: energy
state_topic: "supla/devices/zamel-mew-01-3a25da/channels/0/state/total_forward_active_energy"
The sensors work fine when I look at them in the Developers Tools, but somehow they still don’t show up in the dropdown:
Not sure what else I’m doing wrong…
tom_l
November 21, 2023, 10:01am
6
Try restarting home assistant.
Also go to Developer Tools → Statistics and press all the FIX ISSUE buttons.
jarek_waw
(Jarek)
November 21, 2023, 10:14am
8
It seems I have some MQTT issues, this maybe the reason they don’t show in the Energy configuration dropdown:
jarek_waw
(Jarek)
November 21, 2023, 10:51am
9
I did it, still don’t see them in the energy configuration dropdown.