Notify master switch built in?

HI,

many of my automations/scripts have a notify element, so that i now what happening, or just that the automation was triggered and working correctly.

There are several situations i dont want all of these notifications happening.
Ive made this silly input_boolean Masterswitch, which i can add to all of them as a condition being On, to be able to notify.

Still , i was wondering whether a built-in switch in HA would exist, the could make that even simpler.

Glas to hear of your findings/opinions,

  condition: 
    - condition: state
      entity_id: input_boolean.notify_master_switch
      state: 'on'

notify_master_switch:
  name: Notify master switch
  initial: On
  icon: mdi:bell

Cheers,
Marius

that’s the approach I would have taken, and if you’re on iOS you can set an automation to switch that input off so you dont’ get notified if you no longer want to, without having to log on the app/web interface

yes, working like the now, really simple but functional.

Not really sure i follow your remark here though about being in iOs and automation?
I just flip the switch now, independent from the device im on.
Not what your implying here though i think?

just saying that if you get a notification and want to disable it, you don’t need to open the app,just reply to the notification and have an HA automation that turns that switch off.

o thats cool, have iOS installed of course, get my share of notifications there (also cutoffs for crossing the limits…)

any hint on creating an automation like that with the destructive notification in Ios?
would be really helpful indeed! thishttps://home-assistant.io/docs/ecosystem/ios/notifications/actions/ is a bit overwhelming without any guidance…

check how I’ve implemented it myself:

yes! i will for sure, thanks.

was thinking about this:

action:
  service: notify.ios_phone
  data:
    message: "Something happened at home!"
    data:
      push:
        badge: 5
        sound: <SOUND FILE HERE>
        category: "alarm" # Needs to match the top level identifier you used in the ios configuration
      action_data: # Anything passed in action_data will get echoed back to Home Assistant.
        entity_id: input_boolean.notify_master_switch
        my_custom_data: select 'Off'

How to set the my_custom_data?

not sure about the sound here. Is that on the iPhone, or at home in the media setup…

don’t set the sound, it’ll take the iphone’s built in one. Check/steal my automation it’ll give you a good template to start from :wink:
Good luck

not really sure how to use that input_boolean.switch in the data field… please help would you?

secondly:

been discerning a bit in the booleans, for a bit of selectivity.

made these Master on and off automations, but am sure this can be done in 1 automations using a template for the on/off in trigger and action fields?
Would you know how to?

- alias: 'Master - Switch off'
  id: '1511601570102'
  initial_state: 'off'
  trigger:
    platform: state
    entity_id: 'input_boolean.notify_master_switch'
    from: 'on'
    to: 'off'
  condition: []
#    - condition: state
#      entity_id: group.probably_at_home
#      state: 'off'
  action:
    - service: notify.notify
      data_template:
        title: "All Motion alerts switch on"
        message: "{{ trigger.to_state.attributes.friendly_name }} is set to {{???? state}}."
    - service: input_boolean.turn_off
      data: 
        entity_id: input_boolean.notify_movement_switch
    - service: input_boolean.turn_off
      data: 
        entity_id: input_boolean.mode_notification
    - service: input_boolean.turn_off
      data: 
        entity_id: input_boolean.activity_notification
      
- alias: 'Master - Switch on'
  id: '1511601570103'
  initial_state: 'off'
  trigger:
    platform: state
    entity_id: 'input_boolean.notify_master_switch'
    from: 'off'
    to: 'on'
  condition: []
#    - condition: state
#      entity_id: group.probably_at_home
#      state: 'on'
  action:
    - service: notify.notify
      data_template:
        title: "All Motion alerts switched on"
        message: "{{ trigger.to_state.attributes.friendly_name }} is set to {{???? state}}."
    - service: input_boolean.turn_on
      data: 
        entity_id: input_boolean.notify_movement_switch
    - service: input_boolean.turn_on
      data: 
        entity_id: input_boolean.mode_notification
    - service: input_boolean.turn_on
      data: 
        entity_id: input_boolean.activity_notification

sorry I’m still at work. Can you come on discord tonight? I should be available then. My discord user is lolouk44#7180

If you use the master switch as a condition to the automation, the automation will not trigger. I 7nderstood that you want to run the automation but not send a notification.

i use it as a trigger.
in the wanted iOS notification, i want it to be the action (set it to on or off, depending on the situation) so i can act when away from home, without having to open the Hassio app and flip the switch.

hope this makes sense :wink: