[Tasmota] Automation to reset energy counter

Hi all,!

I just want to push a mqtt command ‘EnergyReset3 0’ to my ShellyEM (tasmota) and after 3 hours of fiddling with it I’m still unable to successfully reset the energy counter (command works in console). Do you know what exact syntax I can use ? or maybe there is another way to automate it ?

Any help much appreciated

Does this not work for you?

cmnd/%topic%/<command> <parameter>

So in your case

cmnd/ShellyEM/EnergyReset3 0

Or replace “ShellyEM” with whatever topic you use for this device

It doesn’t work. Tried with mqtt.publish and no success. Could you tell me the exact yaml code or mqtt service that I can use ?

EDIT: I’ve managed to sort it out.

Service: mqtt.publish

payload: ‘0’
topic: Smart_plug_p1_AV/cmnd/EnergyReset3

Hi there,

I’m trying to achieve the same thing only on a nous plug (similar to gosund sp1 or these blitzwolf thingis).

The config-/info-site from the device shows the following :
|MQTT Client|Ender3_16E832|
|MQTT Topic|Ender3_%06X|
|MQTT Group Topic 1|cmnd/tasmotas/|
|MQTT Full Topic|cmnd/Ender3_16E832/|
|MQTT Fallback-Topic|cmnd/Ender3_16E832_fb/|

I’ve setup a Skript with the following content:

alias: Neues Skript
sequence:
  - service: mqtt.publish
    data:
      topic: Ender3_16E832/cmnd/EnergyReset3
      payload: '0'
mode: single

When I run the skript nothing in the values changes.
I’ve tried changing the topic to the full-topic and tried it with EnergyReset1 2 and 3.

Can anyone help me or point me to right direction.

Your help is much appreciated.
Thanks a lot. And have a good one.

to answer myself:

i created a skript:

alias: Ender 3 Reset Verbrauch
sequence:
  - service: mqtt.publish
    data:
      topic: cmnd/Ender3_16E832/energyreset1
      payload: '0'
  - service: mqtt.publish
    data:
      topic: cmnd/Ender3_16E832/energyreset2
      payload: '0'
  - service: mqtt.publish
    data:
      topic: cmnd/Ender3_16E832/energyreset3
      payload: '0'
mode: single
icon: mdi:sync

and then created

  • script.ender_3_reset_verbrauch
    as an entity.