I am trying to get some directions or guidance on how to setup some automations in Node Red that will work in Hassio. I have been stumbling through yaml and made a couple of automations that worked and now are no longer working. i was hoping to test in Node Red but little "Green" to say the least. I have (4) device_trackers that I track their location and complete automation when they arrive home. Any suggestions would be great. I have attached code in yaml.
- id: '1536977150329'
alias: Open Garage Door
trigger:
- platform: state
entity_id:
- device_tracker.xxxx
- device_tracker.xxxx
- device_tracker.xxxx
condition:
- condition: state
entity_id: cover.my_house
state: closed
action:
- entity_id: cover.my_house
service: cover.open_cover
- id: '1536977383518'
alias: Close Garage Door
trigger:
- entity_id: device_tracker.xxxx
platform: state
to: home
for:
minutes: 5
- entity_id: device_tracker.xxxx
platform: state
to: home
for:
minutes: 5
- entity_id: device_tracker.xxxx
to: home
for:
minutes: 5
condition:
- condition: template
value_template: '{{(as_timestamp(now()) - as_timestamp(states.device_tracker.xxxx.last_changed | default(0)) | int > 300 ) and (as_timestamp(now()) - as_timestamp(states.device_tracker.xxxx.last_changed | default(0)) | int > 300 ) and (as_timestamp(now()) - as_timestamp(states.device_tracker.xxxx.last_changed | default(0)) | int > 300 )}}'
- condition: state
entity_id: cover.my_house
state: open
action:
- entity_id: cover.my_house
service: cover.close_cover