apache_conf 家庭助理,到家后迅速解锁门

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了apache_conf 家庭助理,到家后迅速解锁门相关的知识,希望对你有一定的参考价值。

- alias: Notify iOS device about locked door when coming home
  trigger:
    platform: state
    entity_id: device_tracker.user_a_iphone,device_tracker.user_b_iphone
    to: home
  condition:
    - condition: state
      entity_id: lock.ytterdor
      state: 'locked'
  action:
    # TODO: Figure out how to use service_template to notify the device that triggered the state-change
    service: notify.ios_user_b_iphone
    data:
      message: "Welcome home! The door is locked, want to unlock it?"
      data:
        push:
          category: "unlockdoor"

- alias: Unlock the door from iOS response
  trigger:
    platform: event
    event_type: ios.notification_action_fired
    event_data:
      actionName: UNLOCK_DOOR
  action:
    service: lock.unlock
    data:
      entity_id: lock.ytterdor
      code: !secret verisure_lock_code
ios:
  push:
    categories:
    - name: Unlock door
      identifier: unlockdoor
      actions:
      - identifier: 'UNLOCK_DOOR'
        title: 'Unlock Door'
        activationMode: 'background'
        authenticationRequired: true
        destructive: no
        behavior: 'default'

automation: !include automations.yaml

以上是关于apache_conf 家庭助理,到家后迅速解锁门的主要内容,如果未能解决你的问题,请参考以下文章

基于树莓派的人脸识别解锁门锁设计

家庭助理的配置UI

家庭助理 - 请求失败错误代码 400

如何把米家设备接入HomeAssistant,并实现离线后局域网控制?

递归函数实例助理解

SQL NOT EXISTS讲解 (详例助理解)