Derived values driven by sliders and functions


#1

Hi,
im trying to create a system which will use a distance sensor to measure distance and then divide it to dimension to give me a count number. So what im doing it creating a distance lane which is feed by sensors over MQTT. it works seamless. lets name this sensor out put as SensorValue

also i have create some derived values and trying to drive them via slider widgets. So whenever i move the slider values updates perfectly. so lets call this one as Dimension

after that i try to create an other derived value which uses measured distance and dimension value which is assigned by Slider widget
so formula for derived Result is (SENSORVALUE/DIMENSION) = RESULT
so i was expecting an update when i have a updated value from sensor readings but it`s not happening. it only works if i create a new derived value with typed in dimensions. so i cant use a setup dimension simultaneously. this makes lifes so harder and its not easy to create simple linked values unless you use an event hook which also takes longer for our project.

is there any way to implement this? may be i`m missing something?
when ever i change slider value it doesnt updated in the derived function?

Thanks
MERT


#2

I had a similar problem trying to use a slider input as the threshold for an alert - my conclusion was it couldn’t be done because derived values are tied down to datapoints that occur in the same time window (~15s iirc). e.g. for the difference between two temperature senders that are reporting regularly. Unfortunately there’s no way (that I could find) to force it to use the ‘last’ value from an input (or any other source that updats infrequently).