change counter incremental and counterToday  [Solved]

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
Gravityz
Posts: 652
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Netherlands
Contact:

change counter incremental and counterToday

Post by Gravityz »

i know i can change an incremental counter by using .updateCounter

this however does not update with a new amount but increments(not a big deal because i can use - to substract value)
however when i do this the amount also get's incremented on the today usage.

is there a way to update the counter with a new value without updating the counter today(or to substract the today usage without affecting the total count)

the reason i want this is i have a incremental counter with an offset and i want to 0 the offset but want to keep the total on the meter
thanks
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: change counter incremental and counterToday  [Solved]

Post by waaren »

Gravityz wrote: Wednesday 25 March 2020 13:00 i know i can change an incremental counter by using .updateCounter
is there a way to update the counter with a new value without updating the counter today(or to substract the today usage without affecting the total count)
Not possible. The Counter record only contains the total value and the daily total is a computed number (value now - value at 00:00)
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Gravityz
Posts: 652
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: change counter incremental and counterToday

Post by Gravityz »

ok. thanks. what i will do is raise the counter by let's say 200 and substract this value from the offset. have to spread this out over multiple days(to avoid daily peaks) until the offset hits zero
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest