之前通过车内beacon home, not_home 来触发 车库门, 但是离家要开的好远才判断 not_home . 我是希望刚开出车库门就就关门!
逻辑是通过beacon 属性 distance 数字变化判断远离 还是 接近!
先用模板把数字属性做成一个传感器!
sensor:
- platform: template
sensors:
tracking:
friendly_name: "tracking"
value_template: "{{ states.sensor.fsc_bp104_room_presence.attributes.distance }}"
用这个tracking传感器 在 node red 里面 用 events state节点 设置 state 0.6. 然后 用 wait until节点 设置 state 1.4. 通过这样就能判断车在离开到距离 1.4 就关门!
好了顺便问问大神 用别的方法实现!
|