I’ve been experimenting with smart lighting automation in my bathroom, and I wanted to share my journey and insights with the community. This project has been both challenging and rewarding, and I hope others might find my experience useful or inspiring.### The SetupIn my bathroom, I’ve installed a Hue motion sensor alongside three Hue GU10 bulbs and a Sonoff switch controlling the extractor fan. My goal was to create a seamless experience where the fan activates upon entry, and the lights adjust based on the time of day—day, evening, or night. The lights should only turn off if they weren’t already on, to avoid disrupting any manual overrides.### The ChallengesInitially, I set up two separate rules: one for the lights and another for the fan, both triggered by the motion sensor. This worked perfectly, but I was curious if I could merge them into a single rule for efficiency. I attempted to create a more complex rule using a variable to track the light state, but encountered issues when the motion sensor triggered multiple times. The rule would incorrectly assume the lights were already on, preventing them from turning off when needed.After some trial and error, I reverted to the simpler, two-rule setup. While it works, I still wonder if a single rule is achievable and if the effort is worthwhile. This conundrum got me thinking about the balance between efficiency and simplicity in automation.### The SolutionFor now, I’m content with the two-rule system. It’s reliable, and I haven’t encountered any issues since reverting. The lights adjust beautifully based on ambient light levels and time of day, and the fan reliably activates when needed. It’s a small victory, but it’s made a noticeable difference in my daily routine.### Tips & Tricks1. Start Simple: If you’re new to automation, begin with straightforward rules and gradually build complexity. This approach not only reduces frustration but also helps in identifying potential issues early on.2. Test Thoroughly: Always test your rules under different scenarios. This helps in uncovering edge cases and ensures your automation behaves as expected.3. Document Your Setup: Keeping a record of your configurations and any tweaks you make can be invaluable, especially when troubleshooting or revisiting your setup later.### Looking AheadI’m still curious about optimizing this setup further. If anyone has experience with merging such rules or has insights into handling motion sensor triggers more effectively, I’d love to hear your thoughts!Smart home automation has the potential to significantly enhance our living spaces, and sharing our experiences—both successes and challenges—helps us all learn and grow. I’d love to hear about your automation projects and the lessons you’ve learned along the way!Happy automating! ![]()