I got around to using the ambient light sensor from my Ecowitt weather station as an input to my evening lights automation in Home Assistant.

Using sunset alone is a bit too optimistic on overcast days. It can be gloomy for ages before the calculated sunset time arrives, which means the house feels dark.

The new version still turns the lamps on at sunset, but it can also fire earlier if the Ecowitt lux sensor has been below 2000 lux for ten minutes. I added the sun conditions around that low-lux trigger so it only applies close to sunset, rather than every time a cloud passes over during the day.

alias: Evening Lights On
description: ""
triggers:
  - event: sunset
    trigger: sun
    id: sunset
  - trigger: numeric_state
    entity_id:
      - sensor.gw3000c_solar_lux
    for:
      hours: 0
      minutes: 10
      seconds: 0
    below: 2000
    id: low_lux
conditions:
  - condition: or
    conditions:
      - condition: trigger
        id:
          - sunset
      - condition: and
        conditions:
          - condition: trigger
            id:
              - low_lux
          - condition: sun
            after: sunset
            after_offset: "-01:00:00"
          - condition: sun
            before: sunset
actions:
  - action: light.turn_on
    target:
      entity_id: light.house_lamps
    data: {}
mode: single

Original Mastodon thread: evening lights using ambient lux.