#Help with an actionable notification

1 messages · Page 1 of 1 (latest)

versed gull
#

I've setup an automation based on a calendar event. 10 minutes before I have my google speaker tell me that a Phillies/Eagles/Flyers game is on in 10 minutes. I then change the lights by the TV to the teams colors for a few seconds and then turn them off. Now I just recently added a step that will then tell my Kodi instance running on the TV to change to a certain channel on my PVR that will be for that team. Now, what I'd like to do though is have my phone actually popup a notification of if I wanna actually execute that step. My phone would say "Would you like to turn the game on" Then a simple yes or no option and obviously if yes execute the change channel command. I've not setup an actionable notification before so I don't know if this is A possible and B if so how to execute.

    target:
      entity_id: media_player.living_room_kodi
    data:
      media_content_id: '112'
      media_content_type: channel
    metadata:
      title: Philadelphia Phillies
      thumbnail: /api/media_player_proxy/media_player.living_room_kodi
      media_class: channel
      children_media_class:
      navigateIds:
      - {}
      - media_content_type: channel
        media_content_id: ''```

That is the code in the step if I dont have the notification.  I tried to add this to the notification datablock but probably not doing it right.  Any help would be great.
tropic stormBOT
#

To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.

versed gull
#

Anyone able to tell me if this is possible?

narrow gale
#

Yes this is possible. Here's my simple "Close Covers on Sunset" Automation featuring a clickable notification:

description: ""
triggers:
  - trigger: time
    at:
      entity_id: sensor.sun_next_dusk
      offset: "-00:01:00"
conditions:
  - condition: state
    entity_id: cover.wohnzimmer_rolladen
    state: open
actions:
  - data:
      data:
        actions:
          - action: CLOSE
            title: Mach zu das Ding.
        channel: NotSilent
        clickAction: entityId:cover.wohnzimmer_rolladen
      message: "Close Covers"
    action: notify.mobile_app_tobi_s24
  - wait_for_trigger:
      - trigger: event
        event_type: mobile_app_notification_action
        event_data:
          action: CLOSE
    continue_on_timeout: false
    timeout:
      hours: 3
      minutes: 0
      seconds: 0
      milliseconds: 0
  - action: cover.close_cover
    metadata: {}
    data: {}
    target:
      entity_id: cover.wohnzimmer_rolladen
mode: single
#

The most important thing is the wait on trigger part that actually checks for the notification

versed gull
#

Thank you, trying to adapt this to what I wanna do lol

graceful magnet
#

I like the idea. Automation is great, but in some cases i still want to manually say Yes or No.