HTML5 push notification action options?

Is there a list somewhere of possible actions? The examples show ‘open’, but I’d like to know what all the possibilities are.

I.e. I’d like to create a manual action, TV turns on, push notification: action: Dim Lights

I believe any service can be performed as action. Just create a script with what you want to do and run it as action.

I created a script with an action so I can call it from a notification but it doesn’t work. I can’t find enough guidance on how to add an action to a notification. My config is below.

- id: '1570814507286'
  alias: Garage Alert
  description: ''
  trigger:
  - entity_id: cover.garage
    for: 00:05:00
    from: closed
    platform: state
    to: open
  condition: []
  action:
  - data:
      data:
        actions:
        - action: close_garage
          title: Close door
      message: Garage door is {{ states('cover.garage') }}
    service: notify.push

My script is…

'1572621856474':
  alias: close_garage
  sequence:
  - data:
      entity_id: cover.garage
    service: cover.close_cover

Can anyone give me a steer on how to get it working please?

Thank you

1 Like

I dug further and found that you need an automation that captures the press of the notification button, so when I added the following (and removed the script which is not needed), it worked :slightly_smiling_face:

- id: '1572622812506'
  alias: close_garage_button_pressed
  description: ''
  trigger:
  - event_data: {}
    event_type: html5_notification.clicked
    platform: event
  condition: []
  action:
  - data:
      entity_id: cover.garage
    service: cover.close_cover
1 Like

Your automation to capture the button click is incomplete. Like this it will capture all button presses, no matter from which notification or which button you pressed. You need to add this to the trigger so that it only triggers when you press the button “close_garage”:

event_data:
  action: close_garage

Thank you. Added.