Hey guys,
I have a piston that I can run from a routine which will report to me any sensors below a set battery level or any sensors that are offline. I’m trying to program in a line that will tell me what device has the lowest battery level and what that battery level is.
Line 64. It is returning the lowest sensor battery level of 52% but I don’t know how to make it say what sensor has that battery level. My attempt is still in there which doesn’t work, it just reports “The lowest battery is at 52”. If you were wondering what I was trying to do, I was trying to match a device that had the same battery level as LowestBatt
Ideally I’d like it to report, “The lowest battery is Sensor 17 at 52%” and I’d like to save the device name with the lowest battery to the LowestBatt variable.
Cheers.