homeassistant智能家居

通过wifi名称传感器实现离家在家判断(使用几个月非常稳定)

alias: 设置yy在家状态
description: ""
trigger:
  - platform: state
    entity_id: sensor.ymf_wu_xian_wang_luo_lian_jie
  - platform: homeassistant
    event: start
condition: []
action:
  - service: python_script.set_state
    data:
      entity_id: device_tracker.phone_yy
      state: |
        {% if states('sensor.ymf_wu_xian_wang_luo_lian_jie') == 'nestor_5G' %}
          home
        {% else %}
          not_home
        {% endif %}
mode: single

猜你喜欢

转载自blog.csdn.net/weixin_45623983/article/details/129439123