Up until now, I’ve used many automations to control the lights in every room. Each room had single-action buttons with similar functions:
- Single click: cycle through scenes.
- Double click: turn lights off and reset the scene.
- Hold (on some): turn off devices, set sleep mode, or other specific actions based on the button.
This blueprint simplifies scene selection and light management in a room using button presses, motion sensors, and optional hold actions. It replaced several dozen automations with a single blueprint, simplifying maintenance and configuration. I hope you find it useful for your home automation projects!
You can view source of thus blueprint on this Gist URL. The community forums post is over at: Room Scene Selector Blueprint
Features:
- Scene Selection: Use a button device to cycle through scenes.
- Light Management: Turn off lights in selected areas or specific lights on a double press.
- Automatic Turn Off: Configure a delay to turn off lights automatically.
- Occupancy Monitoring: Use a motion sensor to monitor room occupancy and turn off lights after a specified duration.
- Optional Hold Action: Execute an automation, script, or scene on a hold action.
Inputs:
- Scene Selection Helper: Input helper for scene IDs.
- Button Devices: Button devices for triggering scene selection.
- Target Areas for Light Control: Areas to turn off lights on a double press.
- Target Lights for Control: Specific lights to turn off on a double press or automatically.
- Automatic Turn Off Delay: Delay before lights turn off automatically.
- Hold Action: Optional automation or script to execute on a hold automation, script or scene.
- Motion Sensor: Sensor to monitor occupancy.
- Motion Sensor Duration: Time for the motion sensor to stay clear to turn off the lights.
Triggers:
- Single Press: Cycle to the next scene and activate it.
- Double Press: Turn off lights in the target areas or specified lights.
- Hold: Execute the optional hold automation, script or scene
- Occupancy: Turn off lights when no motion is detected for the specified duration.
UPDATE 22.07.2024: Introduced configurable action types for turning off lights and executing special actions, providing greater flexibility and customization in automation.
UPDATE 19.06.2024: Modified condition for automatic light turn off to properly check if the turn off delay is set to 0. This will prevent the automation from turning off the lights when the delay is set to 0.