I made a virtual watercounter that count rain water that i recover into a tank (with mysensors: https://www.mysensors.org/build/distance) . It is made to watering my plants. When it rains, it works fine and i can see each day volume recovered. But when it doesn't rain enough, i must refill my tank....and when i refill my tank, counter counts this volume as rain water. So i made a script to reset my counter but it only reset one value and not "Today" value...and it is this value that interest me! So i am not able to know rain water volume recovered.
Could you help me to solve my problem please?
Code: Select all
volume_sensor = 'Gain Eau pluie cuve /jour'
volume_sensor_id = 123
commandArray = {}
if (devicechanged['Remplissage manuel cuve'] == 'On') then
print('Remplissage manuel')
volume = 0
commandArray[2] = {['UpdateDevice'] = volume_sensor_id .. "|0|" .. volume}
end
return commandArray