Reset daily energy meter smart switch TS011F

I want to make an automation, that resets the counters on a daily basis for these counters.

As the documentation suggests, …
https://www.zigbee2mqtt.io/devices/TS011F_plug_3.html

Reset energy

To reset “Sum of consumed energy”, use the Dev console and execute: Endpoint: 1 Cluster: 0x00 Command: 0 Payload: (don’t change this)

Next time the plug gets polled, “Sum of consumed energy” will start from zero again.

#

And this works however I want to automate it daily not going to do that everyday, for all my smart switches. How would I do that?

Hello,

Did you find a solution ?

I’m facing exactly the same thing, I would like to automate every day at midnight the resetting of the energy counter of the socket.

Thank you

With energy there was no reason to reset this it does this by it self even though the counter keeps increasing it only looks what the difference is since the beginning of the day so if the beginning is 0 all that is added is that days energy, … if the beginning is 2kwh and 1 is added then only 1kwh is daily use.

Hi,
I found a working solution, please see this:

Cheers, big-big

Here I want to give a possible solution for the meter reset if integration is done through ZHA, but before I jump to this I have a question, why is it even needed?
On the ‘Energy’ dashboard you can quickly see daily, weekly, monthly and yearly energy consumptions and if in addition, if you have tariffs included then the cost for the corresponding period will be shown. Information is given for each device and the total for the entire grid.
Now back to the solution. You can automate the service ‘Zigbee Home Automation: Issue zigbee cluster command’ (ref. Zigbee Home Automation - Home Assistant) with ‘Trigger’ being ‘Helper>Type: Time’ set on midnight.
I hope this was helpful.

Can you write step by step? With some screenshot? Thank you.

I have the issue that one of my tuyas randomly started counting on 109 kWh even after resetting it.
From there it increments correctly but it would be cool to reset it.

As a workaround you can define a template sensor that reflects the summation minus the static starting value (109 in my case)

Here is my automation:

automation:
  - id: reset_socket_energy_daily
    alias: reset_socket_energy_daily
    trigger:
      - platform: time
        at: "23:59:59"
    action:
      repeat:
        for_each:
          - your_socket_one # these are device names in z2m
          - your_socket_two
        sequence:
          service: mqtt.publish
          data:
            topic: >-
              zigbee2mqtt/{{ repeat.item }}/1/set
            payload_template: >-
              {
                "command": {
                  "cluster": 0,
                  "command": 0,
                  "payload": {}
                  }
              }

1 Like

This works nicely in ZHA for three of my TS011F (_TZ3000_typdpbpg), thanks for the hint. For reference, this is the service call:

service: zha.issue_zigbee_cluster_command
data:
  ieee: xx:xx:xx:xx:xx:xx:xx:xx
  endpoint_id: 1
  cluster_id: 0
  command: 0
  command_type: "server"
  args: []

Now I got some other variant, registered in ZHA as _TZ3000_okaz9tjs. Unfortunately, they do not accept above request.

Failed to issue cluster command with status: <Status.UNSUP_CLUSTER_COMMAND: 129>

Any ideas?

2 Likes

I have this same problem. Did someone find any solution?

Nope, unfortunately not.