Achieving Seamless Sleep Mode Automation in Home Assistant

After recently transitioning from Homey Pro to Home Assistant, I’ve been exploring ways to replicate the seamless sleep mode functionality I previously enjoyed. The challenge lies in creating a system that automatically turns off bedroom lights without relying on rigid schedules, as my sleep patterns are far from consistent.

In my previous setup, I used an IKEA switch to trigger a ‘user sleeping’ state, which would deactivate all bedroom lights. Translating this to HA has been an enlightening journey. I’ve discovered that leveraging Home Assistant’s Scenes and Automations alongside a motion sensor offers a robust solution.

Here’s how I’ve structured it:

  • A motion sensor detects inactivity, which, after a defined period, triggers the activation of a ‘Sleep Mode’ scene.
  • This scene dims the bedroom lights and ensures any activated lights remain off until motion is detected again.

The integration with the IKEA switch adds a manual override, allowing me to initiate sleep mode immediately if needed. This hybrid approach balances automation with manual control, providing flexibility and reliability.

I’d love to hear how others have tackled similar scenarios, especially those who’ve successfully integrated motion sensors with sleep modes. Any additional tips or alternative methods would be greatly appreciated!