Problem ZwaveJS2MQTT, MQTT discovery and Energy panel!

I have just switched all of my Zwave equipment, from “ZwaveJS2MQTT => WS ZwaveJS” to “ZwaveJS2MQTT => MQTT”.
The problem is that during the basic installation, I found my consumption equipment (kWh) in the energy pannel (therefore under ZwaveJS), now that I am under MQTT no longer anything.
I observe that the attributes of my equipment that I was monitoring are:

 time: 1633700329113
 value: 0.06
 unit_of_measurement: kWh
 friendly_name: shutter_electric_kwh_value
 device_class: power

If I understood the concept correctly, I should have a “device_class: energy”, and a “state_class: total_increasing”

But why would I have to format everything manually?
Why does this panel not work automatically, as long as you have equipment that gives the consumption in Kwh?
Do you have a solution so that I can do this without too many lines to create and modify?


Pour information, en basculant vers MQTT, j’ai divisé mon usage procésseur par 2

1 Like

You will have to setup the necessary device class and state_class yourself with MQTT. It does not currently support this via MQTT discovery. You will have to wait for someone to fix it, or do it yourself.

The Z-Wave JS integration does this for you, so it was a bit of a step backwards to switch to MQTT. The zwavejs2mqtt developer is recommending users to use the integration for full capabilities. If you want to use MQTT, the recommendation is to use it as an supplemental interface and not a replacement for the integration. MQTT discovery issues are not being prioritized by the maintainer.

Thank you for the quick and precise response.

I made this choice because some devices are not very well integrated in zwaveJS.
Mqtt allows me to retrieve topics and be more flexible with this type of problem.
I will therefore make the modifications manually for my energy panel.

thank you

Do you have an example of such a device?