Trying automation with sonoff water sensor and Hue light

Hi, really sorry if this is an old question.
I just got the Home assistant green and it is working as far as turning on lights.
I have a Sonoff water sensor, SNZB-05P, and it seems to works ok, it shows dry and wet when I short the probes.
I wanted to try a simple automation so when the sensor detected water the action was to turn on a Hue bulb.
If I run the test it turns on light but nothing happens when it’s enabled.
I assumed if enabled it would run.
Not sure what yaml is but this is what I see:

alias: water on
description: “Water in Basement”
triggers:

  • type: moist
    device_id: 2ffd85be24f0ba86c51d1db84dc69660
    entity_id: d395fd51936d6992e04648976c0f7dbb
    domain: binary_sensor
    trigger: device
    for:
    hours: 0
    minutes: 1
    seconds: 1
    conditions:
    actions:
  • action: light.turn_on
    metadata: {}
    data:
    transition: 0
    brightness_pct: 100
    target:
    device_id:
    - 96150dcdc4143a1469aad6342600a586
    - f571fe1fc9aa22ff7a2707f856114926
    mode: single

Am I missing something? This is new to me, so sorry.
Thanks for any help in pointing me in the right direction.
Terry

Firstly please format your yaml code so it can be read easily.

Next always try to use entities rather than devices in triggers.

Thanks for the comments, guess I’m too old school to understand most of what’s said in most of the topics.
I have got most functions to work for now. I’m sure my poking around is not the most efficient or correct way but it’s like trying to learn Greek when you only have Greeks explaining it.
I had no idea being a programmer was a prerequisite.

Sorry,
Thanks again for taking the time to reply.