๐Ÿ“˜ Turn on light based on a binary sensor with automation memory

Getting started

Option 1:

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

Option 2:

Copy this link and import the blueprint manually.
:link: https://gist.github.com/tommekevda/3f74f6d76cf1dc52f2f827d4bdbed191

Description

With this blueprint you can turn on a light when a binary sensor is on after a specific time.

This blueprint is time pattern based (checks every 10 seconds) so in case your binary sensor is already โ€œonโ€ and the threshold time of the day is not reached yet, the light will turn on after the threshold time has passed.

Turning on the light manually will make the automation ignore the light, therefore it will not automatically turn it off, unless you turn the memory toggle to โ€œonโ€.
Turning the light off in any way (automated or manual) will give automation regained control over the light.

Helpers

2 toggle helpers need to be created in order for this blueprint to work:

  • 1 toggle to act as a โ€œmaster switchโ€ to check that automation is actually allowed to run.
    Example: Turn this switch off if you have guests and you donโ€™t want to run this automation while they are present
  • 1 toggle to act as the โ€œmemoryโ€ for this automation.
    When this automation turns on the light, it will also turn on this toggle, acting as a memory.
    This will prevent the light from turning off when you manually turned on the light and the condition criteria are not fulfilled.

Changelog

  • 2021-05-18: Initial version
2 Likes

Hi @nightwalker. This is exactly what I was looking for. However, Iโ€™ve realised the light sometimes takes 1-2s to turn on. Sometimes is instantaneous. Also the blueprint only alows one entity, not a group of lights, unless you change manually on the yaml, correct?

@nightwalker Great Blueprint, could replace a lot of my manual automations if there also was a optional timeout setting, so keep the light triggered by this blueprint on for xx:xx hours/minutes.