I am trying to setup an automation to send me a push notification reminder at night that will allow me to Arm my alarm system
I’ve tried different variations but I cannot get the notification to actually show the button to Arm Home
This is my config (removed triggers and condition just for testing):
alias: Push - Reminder to Arm Home
description: ''
trigger: []
condition: []
action:
- service: notify.notify
data:
message: Alarm System has not been armed.
title: Frontpoint
data:
actions:
- action: null
service: alarm_control_panel.alarm_arm_home
target:
entity_id: alarm_control_panel.panel
title: Arm Home
mode: single
Ive also tried:
actions:
- service: alarm_control_panel.alarm_arm_home
target:
entity_id: alarm_control_panel.panel
title: Arm Home
I get the push, but no actionable button for me to press.
I have, and ti seems I may have to use a variable under the action to get this to work.
I’m confused on how I can setup a variable with a specific service call not relying on a trigger or sequence.
Is that correct or can I statically define the service to call under the action using a variable?
@jaimmor to be clear you need an action in the first automation that sends the notification. Then you need an automation that handles the button action as a trigger.
You could combine these into 1 automation with two triggers and leveraging a condition on trigger IDs. The key is that the notification and the action are 2 different things. You can’t have the notification actually trigger the thing you want to have happen.
So I would like to just use 1 automation to help keep things neat
In my example, I do have two different actions for this, 1 for the notification, and another for when a user presses the ‘button’ within the notification.
I’ve seen examples getting this to work but my issue is that the action I need performed when the button is pressed is a service, rather than an action such as light.turn_off
At least thats what I think
If I cant get that to work Ill do two automations and see if I can get that to work
I found a YT video that I think goes over what you mentioned in the second paragraph of your reply
Im going to try that out but it seems like that’ll do what I want it to
@jaimmor so all automations have Triggers->Conditions->Actions, so it’s that flow I’m referring to when I say “action” whereas in your case the “action” would be to call a service. I decided to do myself a favor and I combined them into 1 automation. Here is the single automation:
alias: Coffeemaker Manager
description: ""
trigger:
- platform: state
entity_id:
- switch.coffee_maker_start_pause
from: "on"
to: "off"
id: coffee-maker-off
- platform: event
event_data:
action: turn_on_coffeemaker
event_type: mobile_app_notification_action
id: coffee-maker-action
condition:
- condition: device
type: is_off
device_id: xxxx
entity_id: switch.coffee_maker_start_pause
domain: switch
action:
- choose:
- conditions:
- condition: trigger
id: coffee-maker-off
sequence:
- service: notify.mobile_app_pixel_4a_5g_tim
data:
message: The coffeemaker has turned off and is cooling down!
title: Coffeemaker Status
data:
ttl: 0
priority: high
actions:
- action: turn_on_coffeemaker
title: Turn on Coffeemaker
- conditions:
- condition: trigger
id: coffee-maker-action
sequence:
- type: turn_on
device_id: xxxx
entity_id: switch.coffee_maker_start_pause
domain: switch
default: []
mode: single
Hi,
So I took your logic and tried to apply it to my garage door notification for when somebody opens the garage door. I just want a button to close it again.
Would you mind telling where I lost the plot on this one please?
@Mark.sydney your condition id is open-garage-action but in your action conditional you are triggering off of the close-garage-action id which doesn’t exist. Your action conditional should be triggering off of the open-garage-action id.