I am trying to calculate and save the average result of 3 sensor lux values into the logic database.
I have in my room 3 motion sensors which all suply LUX values, now i want to save the average result as logic a value so i created the following flow:
When: sensor value changes (i choose 1 sensor)
Then: calculate logic value.
I choose from list the name of the value to which to save (in my case binnenlux) and then the following as text:
I expected that it would calculate the average of these 3 sensors and save the result as value in binnenlux but nothing happens, the value is empty
[helderheid1] = sensor 1 helderheid etc, choosen from list, blue tag)
binnenlux is the logic name and is number value type
I also tried:
This is working but is NOT what i want, i want the average not the total:
Anyone an idea what i am doing wrong and how to get the average and save this?