Integrating Motion Sensors for Smart Lighting Automation

Hello everyone, I’m currently working on setting up a smart lighting system in my home and I’m looking for some advice. I’ve got a few motion sensors and I want to automate my lights so they turn on when I enter a room and off after a period of inactivity. I’ve tried setting up some basic rules, but I’m not quite getting the results I want. I’ve read through some forums and watched a few tutorials, but I’m still a bit confused about how to fine-tune the settings. For example, I have a motion sensor in my living room, and I want the lights to come on when I walk in, but I don’t want them to stay on all night if I’m just sitting still. I’ve set a timer, but sometimes it turns off too quickly or stays on too long. I’m also thinking about integrating this with my smart thermostat. Maybe if the temperature drops below a certain level, the lights could dim automatically to save energy. I’m not sure if that’s possible with my current setup, though. If anyone has experience with motion sensor integration or can suggest some best practices, I’d really appreciate it. I’m also curious if there are any apps or tools that can help me visualize and adjust these settings more easily. Thanks in advance for your help! I’m really excited to get this working smoothly.