HELP to get min value from variable


#1

1) Give a description of the problem
I need to get min and max value from variable LastMotionList.

2) What is the expected behaviour?
(PUT YOUR INFO HERE)

3) What is happening/not happening?
(PUT YOUR INFO HERE)

**4) Post a Green Snapshot of the piston![image|45x37]

5) Attach logs after turning logging level to Full
(PASTE YOUR LOGS HERE THEN HIGHLIGHT ALL OF THE LOGS AND CLICK ON THE </> ICON TO FORMAT THEM CORRECTLY)

Thanks for help.


#2

The two expressions are:

min(data1, data2, data3)
max(data1, data2, data3)

as seen here in the Wiki.


#3

Thanks for the reply and link to the"min" function description.
I would like to ask if there is a way to use “min” function directly for variable “LastMotionList” where are inactive times for each device (example “Garage Motion Sensor:1788” ).
Would be great to be able to do “min” function just to the second parameter of each device (inactive time example 1788).
Thanks for help


#4

I think it will be less code, and less hassle if you drop the loop, and just hard code it:

pic


Edit: Updated image to show the required.0


#5

Thank you very much for help!