Creating a Smart 'Goodnight' Automation in Home Assistant

I’ve recently been diving into the world of smart home automation, and one feature I’ve been particularly excited to replicate is the ‘Goodnight’ automation I used to have with SmartThings. The idea is simple yet incredibly useful: when it gets late and there’s no movement detected in the house, certain lights and switches should turn off automatically.

After some trial and error, I managed to set up a system that works pretty smoothly. Here’s how I did it:

  1. Motion Sensors: I placed motion sensors in key areas of my home. These sensors detect movement and send signals to Home Assistant.

  2. Time-Based Trigger: I set the automation to activate after 9 PM. This ensures that it doesn’t interfere with my evening routines.

  3. Light and Switch Automation: Once the conditions are met (no movement detected after 9 PM), the automation turns off specific lights and switches downstairs. This not only saves energy but also adds an extra layer of security by making the house appear unoccupied.

  4. Testing and Fine-Tuning: Initially, I faced some challenges with the automation triggering too early or not at all. By adjusting the sensitivity of the motion sensors and refining the time settings, I was able to get everything working perfectly.

This setup has been a game-changer for me. It gives me peace of mind knowing that my home is secure and energy-efficient, even when I’m not actively monitoring it. If anyone has tips or tricks to make this automation even more robust, I’d love to hear them!