Hi everyone. I’m pretty new to WebCore but not to programming. I’ve learned a great deal in the last few weeks just reading questions and answers here. So a big thanks to everyone asking and answering questions.
This code simply gets the status of the batteries in all my devices and reports any that are below 20 percent. I have more devices that are not included in this code yet and have some more sensors ordered so before I go any farther, I was wondering if there was a more efficient way to do this. I would like to incorporate this as part of my “Alexa, start my day” routine.
Currently as you can see, I have an if statement for each device that populates a variable with any that matches the criteria. It works, and runs pretty fast but I was wondering if there was a simpler way to cycle through the devices and add text to the variable.
Any advice would be greatly appreciated!