Outdoor light triggered by Sunset - How do you do it?


I was wondering how you have set up your outdoor lights to be automated using the Sun component.

Currently I’ve added my Long, Lat and Elevation to make sure my location is correct. I’ve then added some Automations that turn my light on when the sun elevation is below -6.
Unfortunately my experience is that over time (probably due to season of the year), the -6 is sufficient in some months, but then it starts turning on when there is still light and after some months it will turn on too late when it is really dark.

In all cases the automation works and does only trigger when it should.

How do you guys do so the light triggers at the “right” time?

I use a light level sensor. BH1750 + Wemos D1 mini running ESPhome.

I used my custom Illuminance Sensor for a long time and it worked fairly well. But recently I bought an Aeotec MultiSensor 6 which works way better.

FYI, I first tried the Zooz ZSE40 4-in-1 sensor since it was less expensive. But I discovered that its light sensor has way less dynamic range. Basically it would saturate shortly after dawn when it was still fairly dark. So although it could be used for this in a pinch, it isn’t very useful for telling the difference between a bright, sunny day and a dark, overcast one. I now use it indoors and it works well enough for that.

How have you connected this device into HA?
Also how often do you get the illumination data, do you set a manual poll or?

It is a Z-Wave device. (FYI, I use the Aeotec ZW090 Z-Stick Gen5 as my Z-Wave controller.) The MultiSensor has config parameters that provide quite a bit of flexibility for controlling how often it updates the various sensor values. I pretty much have it set up to update them every 10 minutes. So far I’m using a battery in it, but I plan to hook up a power supply. (Not sure how long the battery would last updating that often. :slight_smile:)

Whats the signal lenght on this Z-Stick and did you just hook it up to your rpi / vm / ?

Like any Z-Wave network, the more Z-Wave devices you have, the better, since they form a “mesh network.” If you just had the USB stick controller and the MultiSensor, I honestly don’t know how far it might reach. It also depends on what’s in between (walls, etc.) You can find more info here.

They sure do :joy:

1 Like
  - condition: state
    entity_id: sun.sun
    state: 'below_horizon'

Hey Dixey,

So you just measure on whenever it gets below horizon?
Does it follow the light intensity nicely or?

Well, I might just go ahead and buy one of those then.
Isn’t it the same stick some people have gotten to work with Ikea and Xiaomi and various other z wave devices?

I use that condition for turning on lights indoors when there is motion and it’s dark. I know it doesn’t factor in cloud cover or thunderstorms but it serves me well:

- alias: 'Roaming Camera Motion Detection'
  initial_state: true
  - entity_id: sensor.406_roaming_motion_detected
    from: 'False'
    platform: state
    to: 'True'
    condition: and
      - condition: state
        entity_id: sun.sun
        state: 'below_horizon'
  - data:
      entity_id: switch.06200046bcddc2ea159b
    service: switch.turn_on

No those devices are zigbee devices. the Aeotec stick is only for zwave.

You are thinking of the HUSBZB-1. That stick will support both z wave and zigbee.

Arh yes sorry. I realize that now.
Thanks for the clarification :blush: