Help with configuring actionable notifications

I created an automation for my coffee maker. It’s a simple automation which turns off the switch after 30 minutes and also sends a notification
to my phone stating that the coffee maker is now turned off.
I would like to take this further and be able to long press the notification and extend the on time for another 20 or 30 minutes.

To be honest, I haven’t tried that much myself yet, but just from looking at the documentation for actionable notifications I just don’t grasp the concept yet.
So if anyone could help me in the right direction I would be very grateful!

This is my current automation:

  • alias: Turn off coffee machine after 30 minutes
    hide_entity: True
    trigger:
    platform: state
    entity_id: switch.kaffebryggare_switch
    to: ‘on’
    for:
    hours: 0
    minutes: 30
    action:
    • service: homeassistant.turn_off
      entity_id: switch.kaffebryggare_switch
    • service: notify.notify
      data:
      message: Kaffebryggaren avstängd!

hey i have similar automation for my coffee maker it sends me a actionable notification if ti has been on for more then 30 minutes with the option to turn it off here are some pics from my iphone and apple watch

cafewatch

ios:
  push:
    categories:
      - name: cafetera
        identifier: 'CAFETERA'        #this name has to match the category name
        actions:
          - identifier: 'CAFETERA_off'
            title: 'Cafetera off'     
automation old:
  - alias: cafetera triger
    trigger:
      platform: state
      entity_id: switch.strip_cord
      to: 'on'
      for:
        minutes: 30    
    action:
      service: notify.ios_your_iphone
      data:
        message: "Cafetera esta encendida!" # coffee maker is on 
        data:
          push:
            badge: 0 # this will remove the badge/app icon number
            category: 'CAFETERA'          #this has to match with identifier name
          action_data:
            entity_id: light.test # I am no sure what this does. 

  - alias: apagar cafetera action1
    trigger:
      platform: event
      event_type: ios.notification_action_fired
      event_data:
        actionName: CAFETERA_OFF
    action:
     service: homeassistant.turn_off 
     entity_id: switch.strip_cord
2 Likes

you can add a condition for what you want but this works for me every morning if i forget to tun the coffee maker off after 30 minutes i receive a notification with the option to turn it off hope it helps

Thanks! I will check it out :slight_smile:

You can remove this section:

That, I believe, is from the example. It turns on a light named light.test to help confirm the yaml code is working.