Trouble converting simple automation to Node-RED

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

35

Check occupancy - > Verify if is Sunset -> Trigger Light ON -> Delay 5min -> Trigger Light OFF

You should concider some more logic about this automation, couse Light will be blinkin every time when occupancy is verrified .

Thank Gary, could you suggest what that more logic should be? as if works as expecting with the Yamal automation