Recently, I’ve been working on setting up an automation for my evening lighting, and I wanted to share my experience in case it helps others or sparks some ideas. The goal was to have several lights turn on between 3 PM and 6 PM, but only if the sun elevation is below 7.0 degrees and all my mobile devices are at home. It sounds straightforward, but I ran into a few hiccups along the way!
Initially, I set up the automation using the built-in Home Assistant logic. The idea was simple: check the sun elevation sensor and the presence of my devices. If both conditions were met, the lights should turn on. However, I noticed an issue where if I manually triggered another scene using my Hue dimmer, the automation would kick in again a few minutes later, even though I was already home. It was a bit frustrating because I thought the devices were already tracked and the automation had run its course.
After some research and trial and error, I realized that the problem might be with how the presence detection was being handled. I decided to dive deeper into the input boolean function and tweak the logic to ensure that once the devices were detected as home, the automation wouldn’t repeat unless the conditions changed again. This involved adjusting the trigger conditions and adding a delay to prevent the automation from overlapping with manual actions.
The solution I landed on was to use a combination of the presence sensors and a more precise sun elevation check. By fine-tuning the automation’s conditions and ensuring that the input boolean correctly tracked the state of my devices, I managed to get everything working smoothly. Now, the lights come on at the perfect time without any unwanted repetitions!
This experience taught me the importance of thoroughly testing each component of an automation and not being afraid to experiment with different logic flows. It’s also a reminder that even small adjustments can make a big difference in how an automation performs.
If anyone has tips or alternative approaches for similar setups, I’d love to hear them! Happy automating everyone! ![]()