Scene with condition

hi!
I want to make a scene to use in alexa that when i get home i say “i’am back” them the scene check if the condition sun is below horizon then lights on or not
thanks

Expose a script to Alexa.

Make the script check the condition before launching the scene.

if i paste this in script works?

  • alias: “i’am back”
    condition:
    • condition: state
      entity_id: sun.sun
      state: ‘below_horizon’
      action:
      service: scene.turn_on
      entity_id: scene.livingroom_normal

Not quite

script:
  i_am_back:
    alias: I am back 
    sequence:
      - condition: state
        entity_id: sun.sun
        state: 'below_horizon'
      - service: scene.turn_on
        entity_id: scene.livingroom_normal