Help turning lights on at night using ping and sun

Hello all.
I’m hoping someone can see the error in my code here.
What I want to do is when a user comes home after sundown, the outside lights turn on, then turn off 10 minutes later.
I am using the ping instruction for presence detect as some of the users do not have data plans on their phones, so it says they’re home when they connect to the house wifi.
I’ve setup tracker id’s for each user and on the main screen of home assistant, it does show them as home and away correctly.
I can also turn the outside light on and off from the main page as well, so those things seem to be setup correctly.
The problem is the automation doesn’t work. I turn my phone wifi on and off and watch home assistant show me as away, then home, but the lights don’t turn on. I’ve even removed the first sun.sun condition, and still no lights.
Any ideas? Please note that I’m a bit of a noob to programming, so speak slooooooowly. :upside_down_face:
If I’ve formatted this wrong, or you need more info, please let me know.
Thank you.
Here is the section of my configuration.yaml

# Triggers for light automation for user1
automation:
  - alias: 'Turn on outside light when user1 comes home after dark'
    trigger:
      - platform: state
        entity_id: device_tracker.user1
        to: 'home'
    condition:
        condition: state
        entity_id: sun.sun
        state: 'below_horizon'
    action:
      service: light.turn_on
      entity_id: switch.outside_front_lights

  - alias: 'Turn off outside light 10min after user1 comes home'
    trigger:
      - platform: state
        entity_id: device_tracker.user1
        to: 'home'
        for:
            minutes: 10
    condition:
        condition: state
        entity_id: sun.sun
        state: 'below_horizon'
    action:
      service: light.turn_off
      entity_id: switch.outside_front_lights

First things first, confirm the automation is turned on. If it is turned off, it won’t trigger.

After you’ve confirmed it is on, execute it manually (either from the Services page or from its More-Info box when selected from the Unused entities view). Manually executing an automation will skip its trigger and condition sections and simply run the action.

If the action works now we know the problem lies either in the trigger or the condition.

You call the service ‘light.turn_on’, but the entity_id ‘switch.outside_front_lights’

it should either be
‘switch.turn_on’, and entity_id ‘switch.outside_front_lights’
or
‘light.turn_on’, and entity_id ‘light.outside_front_lights’

depending on the name of your entity_id

Thank you both for your replies.
I did as suggested by francisp and changed the service to “switch.turn_on”.
Worked like a champ.
I kinda figured I did something dumb somewhere.
:upside_down_face: