Open garage door when entering home zone

Hey guys. I am new to Node Red and I am trying to see how I can make an automation in Node Red when I am entering my home zone, the garage door will star opening the door if the door is detected to be closed. I currently have this automation working in the home assistant automation page, but the problem I am having is that if the garage door is already opened and I am entering my home zone, the garage door will close even and I do not want it to do that. What I want is when I am arriving to the zone of my home, if the garage door is closed, to open the garage door. If the garage door is detected to be opened and I am entering my home zone, I do not want it to close. How can I make this automation in Node Red?

Here is how I have the working automation in home assistant but this closes the garage door if it’s already opened which I do not want:

alias: Open garage when arriving home
description: ''
trigger:
  - platform: zone
    entity_id: person.marte_systems
    zone: zone.home
    event: enter
condition: []
action:
  - service: cover.open_cover
    data: {}
    entity_id: cover.garage_door
mode: single

I don’t use Node Red, however a condition using the state of the cover would prevent this in HA by only allowing the automation to run if the garage door is closed when you enter the home zone.

condition:
  - condition: state
    entity_id: cover.garage_door
    state: "closed"

Thank you, TazUk. Will give this a try!

No worries.

It’s worth noting that your cover may also report interim states of opening and closing, so you may need to use closing in the conditions as well, depending on how your cover control behaves if you try to open it while closing - mine simply stops where it is if I fire open / close when moving.

1 Like