本帖最后由 puppy0505 于 2018-4-28 23:39 编辑
这个交互我真的服了
我的automations 跟你们的不一样 网上看了教程 可以用 automations.old 但是没整会
现在只出现这个
###############################
- action:
- data:
data:
push:
category: lightnotif
message: 是否开灯
service: notify.ios_puppy
alias: test
initial_state: true
condition: []
id: '1524914407558'
trigger:
- entity_id: light.gateway_light_34ce008d7ff8
from: 'off'
platform: state
to: 'on'
- action:
- data:
entity_id: group.all_lights
service: light.turn_off
alias: iOS action lights off
condition: []
id: '1524921240240'
trigger:
- event_data:
actionName: LIGHT_OFF
event_type: ios.notification_action_fired
platform: event
- action:
- data:
entity_id: group.all_lights
service: light.turn_on
alias: iOS action lights on
condition: []
id: '1524921612332'
trigger:
- event_data:
actionName: LIGHT_ON
event_type: ios.notification_action_fired
platform: event
###############################
ios:
push:
categories:
- name: lightnotif
identifier: 'lightnotif' #必须使用小写,没有特殊字符或空格
actions:
- identifier: 'LIGHT_ON' #必须使用大写,没有特殊字符或空格
title: '开灯'
activationMode: 'background' #(是否后台执行,无需打开app,foreground为 前端执行 )
authenticationRequired: yes #(点击按钮后是否需要解锁设备)
destructive: yes #(字体红色)
- identifier: 'LIGHT_OFF'
title: '关灯'
activationMode: 'background'
authenticationRequired: yes
|