Run actions once a day(or once in a while) during certain period of time [Smartthings migration collection]

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

Background

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 run some actions between 2 timestamps.
  2. It will only run the actions when a binary sensor is in a certain state for a certain period of time.
  3. It will run the actions immediately if at the start of the time period the conditions are already met.
  4. It may skip running the actions if the conditions are not met within the period.
  5. It will only run the actions at most once a day.

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

Highlights

  • Completely bypassing capability: Completely put automation into “Dumb” state by not triggering at all.
  • Does not require the conditions to be met within the time period. It is useful when you use this blueprint to turn on/off the alarm system or lights in underlit areas daily, even if you go to bed early the automation will still trigger.
  • Extended capability to skip the actions every other day or N days.
  • Better reliability without any delayed action/waiting for trigger.

Reminders

  • You can group multiple binary sensors into a single one to be used with this automation.
  • It is highly recommended to bypass this automation with a “Dumb” mode in case of emergency.
  • If used with critical systems try include an action that will send yourself a message.
  • Test the automation with a single non-critical deployment before moving on to larger scales.

Disclaimer

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.

Release

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

  • 20230506: Initial release - stable - 30 days testing
  • 20230515: Update binary sensor state description, no functionality change

Test environment:

Home Assistant 2023.5.2
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.

1 Like