- id: ACTIONABLE_REQ-001
alias: Actionable Request - Request alarm to be enabled as nobody is home.
trigger:
- entity_id: binary_sensor.people_home
platform: state
to: 'off'
for:
minutes: 5
action:
service: notify.ios_user1_iphone
data:
message: "Nobody is home. Would you like to turn on the alarm?"
data:
push:
category: "arm_alarm"
客户端按钮事件
- id: ACTIONABLE_RESP-001
alias: Actionable Response - Receive arm request with pin and activate accordingly
trigger:
platform: event
event_type: ios.notification_action_fired
event_data:
actionName: arm_alarm
action:
- alias: Turn off Alarm
data_template:
code: '{{ trigger.event.data["textInput"] }}'
entity_id: alarm_control_panel.nx584
service: alarm_control_panel.alarm_disarm