Considerate motion triggered lights with dim before turning off [Smartthings migration collection]

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.


I’m migrating away from Samsung Smartthings, there are automations I need to re-implement in Home Assistant.
One of the automations I have is following:

  1. It will turn on lights when motion is triggered.
  2. It will dim lights when motion is no longer detected for a certain period so you are aware it is about to turn off.
  3. It will turn off lights after a longer period if there are still no motion detected.
  4. It will adjust the initial brightness based on current time.
  5. It will allow the automation to be completely bypassed, in case motion is triggered by curtains during midnight or there is a guest in motion detector area.

I’m not able to find similar solution here so I’m making my own.


  • Completely bypassing capability: allow bypassing turning on/turning off of the lights or completely put automation into “Dumb” state.
  • Dim before completely turning off: for safety reasons this is highly recommended in areas such as bathroom.
  • Choose color(for color changing lights) or color temperature(for tunable white lights) or keep the existing color settings.
  • Day/night mode for common scenarios, can be overridden by adding luminous sensor.
  • Does not schedule triggers that can cause undesired side effects.


  • You can group multiple motion sensors in a single area to be used with this automation.
  • Lights turn off action may not execute due to following reasons: another motion on event is triggered, scheduled delay action is aborted due to system restart or failure, turn off bypass condition is met(even if the lights were turned on by this automation).
  • It is highly recommended to bypass this automation with a “Dumb” mode in case of emergency.
  • Do not use this automation in potentially life threatening areas, such as cooking area or pool side.
  • Test the automation with a single non-critical deployment before moving on to larger scales.


Use of the blueprint is at your own discretion and the authors are not responsible for the potential outcome caused by using of their work.


I take home automation reliability, stability and security seriously and will only release blueprints passing tests.

  • 20230506: Initial release - stable - 15 days testing
  • 20230515: Add ability to set color temp by kelvin - 7 days testing
  • 20230522: Add ability to retry failed actions(turn on/off) as well as logging failed device(s) to logbook - 7 days testing

Test environment:

Home Assistant 2023.5.3
Supervisor 2023.04.1
Operating System 10.1
Frontend 20230503.3 - latest

Test hardware:

  • Home assistant yellow
  • Home assistant OS vm on ESXi + skyconnect
  • Home assistant OS on NUC + skyconnect

Feedbacks and bug reports

Development status: Actively maintained

  • You may leave your feedback below this topic.
  • You may open a pull request on github.
  • You may open an issue on github.

Feel free to click the :heart: button below if you find my works useful.

Special thanks:

…and may others who helped me learn Jinja2 template language as well as gaining better knowledge about how trigger, condition and blueprint works.