Hi Guy,
I have a very simple automation that I’m trying to convert from yamal to node-RED, which switches my porch light on when I arrive home after sunset and then switches it off after 5 minutes. I’m struggling to setup in a similar way in node-RED. I’ve tried using big timer, which seems like overkill and was hoping to use te delay to switch off after 5 minutes. Is it possible to use the HA sun state in node-red to set the condition? I am very new to node-red, so apologies for my ignorance, as I’m sure this is a simple automation to achieve.
alias: Porch light on
trigger:
- entity_id: group.tracker_matt
from: not_home
platform: state
to: home
condition:
- after: sunset
condition: sun
action:
- data:
entity_id: light.hue_white_light_1_2
service: light.turn_on
- id: '1543501274770'
alias: Porch Off
trigger:
- entity_id: light.hue_white_light_1_2
for: 0:05
from: 'off'
platform: state
to: 'on'
condition: []
action:
- data:
entity_id: light.hue_white_light_1_2
service: light.turn_off