Taking Control of Notifications with Home Assistant

I was getting a bit tired of getting non-stop notifications when I was mowing the front lawn. So I decided to create a toggle in Home Assistant that would pause notifications for 15 minutes. The first step was to create a button helper in Home Assistant, which would serve as the toggle switch to pause notifications. I named it “Notifications” and created it in the Home Assistant user interface.

Next, I created an automation that would be triggered when I turned the toggle off. The automation would delay for 15 minutes, and then call a service ‘Input boolean: Turn on’ on ‘Notifications’ which would auto toggle the switch back on. This way, I wouldn’t have to remember to turn the notifications back on after I was done mowing the lawn.

But that’s not all – now that I have this toggle helper, I can also use it to control when notifications are sent to me. I can reference the toggle’s state in my notification automations, so that notifications are only sent to me when the toggle is in the “on” state. This means that I can avoid getting notifications when I’m mowing the lawn or engaging in other activities where I don’t want to be distracted.

Here is what it looks like:

Here is the YAML code for the automation:

alias: Auto turn back on notifications for 15 minutes
description: ""
trigger:
  - platform: state
    entity_id:
      - input_boolean.notifications
    from: "on"
    to: "off"
condition: []
action:
  - delay:
      hours: 0
      minutes: 15
      seconds: 0
      milliseconds: 0
  - service: input_boolean.turn_on
    target:
      entity_id: input_boolean.notifications
    data: {}
mode: single

This automation triggers when the input_boolean.notifications entity changes from “on” to “off”, waits for 15 minutes, and then turns the input_boolean.notifications entity back on.

If you’re looking for a way to take control of your notifications and reduce distractions, I highly recommend creating a similar toggle in Home Assistant. It’s a simple process that can make a big difference in your daily routine.

Conclusion

Taking control of notifications is an important part of maintaining a distraction-free smart home. With Home Assistant, it’s easy to create a toggle that pauses notifications for a set period of time, and also use it to control when notifications are sent to you. By following these simple steps, you can create a similar toggle and start enjoying a more peaceful and productive smart home experience.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *