Trigger not firing

I’m still new to this, especially the yaml syntax. I’ve got an automation that runs at sunset and turns on our Christmas lights. Works great. But on rainy days like today, I don’t want to turn on the outdoor lights. Something about electricity and water… So I’m trying this,

- alias: 'rain xmas lights'
    platform: state
    entity_id: switch.outdoor_xmas_lights
    to: 'on'
    - condition: numeric_state
      entity_id: wunderground.precip_1hr_in
      above: 0.01
    - service: switch.turn_off
      entity_id: switch.outdoor_xmas_lights

But it doesn’t seem to be firing when I turn on the outdoor switch using the switch from the HA control panel. The lights stay on and the only thing in the HA log is showing the state change of the switch. It doesn’t show anything about trying to fire the associated trigger.