Page 1 of 1

Reset "energy usage"

PostPosted: Fri Jan 14, 2022 7:46 am
by Bildhauer
Hello,

is there anyone having a Python script to


  1. reset the energy usage of each Virtual Group Energy Meter,
  2. reset the energy usage of each Virtual Device Energy Meter,
  3. reset the energy usage of each other device logging the energy usage?

Thanks in advance for supporting me!

Best regards

Bildhauer

Re: Reset "energy usage"

PostPosted: Fri Jan 14, 2022 12:45 pm
by matt (support)
I believe this will work on all of them:

Code: Select all
indigo.device.resetEnergyAccumTotal(devInstanceHere)

Re: Reset "energy usage"

PostPosted: Mon Jan 24, 2022 12:25 pm
by Bildhauer
Thx.

But this only work for one device of this kind. I'm having approx. 30. Is there an "Loop" one can build to do by indentiying this calls of devices?

Best regards!

Stephan O. Merckens

Re: Reset "energy usage"

PostPosted: Mon Jan 24, 2022 4:43 pm
by matt (support)
Yes, try:

Code: Select all
for dev in indigo.devices.iter("props.SupportsEnergyMeterReset"):
  indigo.device.resetEnergyAccumTotal(dev)

Re: Reset "energy usage"

PostPosted: Sat May 21, 2022 11:40 am
by Bildhauer
Thanks a lot!

Before trying it one question: after this kind of reset the "energy usage" is set to 0?

Thanks in advance

Bildhauer