Exploring Sensor Logging and Automation in Lua

Hey everyone, I’m diving into the world of sensor logging and automation, and I’d love to share my journey with you. I recently set up a motion sensor in ‘Always Fire’ mode, and I’m trying to log how frequently it triggers. My goal is to store the current time in an array every time the sensor trips, and once I have 10 readings, I want to log them for analysis.

Here’s where I’m stuck: I’m not sure how to maintain the array across multiple triggers without it resetting each time. I’ve heard Lua can handle this, but I’m not quite sure how to implement it. Any suggestions or resources would be super helpful!

On a lighter note, I’ve also been experimenting with integrating different smart devices. It’s amazing how seamless some integrations are, while others require a bit of tweaking. For instance, my IKEA Tradfri bulbs were a breeze to set up once I figured out the right app and steps. I just had to go through the on/off process six times, and voilà! They were recognized.

If you’ve got any tips for maintaining state across triggers or experiences with device integrations, I’d love to hear them. Let’s keep the conversation flowing and help each other out on this smart home journey! :rocket: