The event "Sun has set" and "Sun has risen" is disappeared

Hi there all,
I have some automation that trigger the sun set/risen event.
Now from yesterday night that trigger is not work anymore.

I check the sun set/risen event in the Logbook menu and is disappeared.

Obviously I don’t remember what I do yesterday… cause I play with Hassio all day.

I check the States menu and the sun.sun is still there with this values:

next_dawn: 2019-09-19T04:31:38+00:00
next_dusk: 2019-09-19T17:51:40+00:00
next_midnight: 2019-09-19T27:17:09+00:00
next_noon: 2019-09-19T19:17:39+00:00
next_rising: 2019-09-19T09:05:12+00:00
next_setting: 2019-09-19T19:30:06+00:00
elevation: -35.15
azimuth: 38.9
rising: true
friendly_name: Sun

I play all day with Lovelace but…
I remember that yesterday I put a time sensor in my config:

  - platform: time_date
#    display_options:
#      - 'time'
#      - 'date'
#      - 'date_time'
#      - 'date_time_iso'
#      - 'time_date'
#      - 'time_utc'
#      - 'beat'

Can be this the missing event problem please ?

Thanks all in advance

Mine is still going up and down.

1 Like

What version of Home Assistant?

What does your automation look like?

Are your automations enabled (turned on)?

If you select the automation (use the icon next to it in the States menu) and push TRIGGER, what happens?

1 Like

Thanks a lot for your help.

I just want to tell you that before yesterday all was working.
But… let’s let out of story the automation… cause if we can solve
the missing sun set/risen event from logbook,
I believe that the automation will work.

My Hassio vers. is 0.98.5. …usually I always update it.
I just so the .99 update but I’ll do it after I’ll solve this issue.

Anyway here is my automation:


- alias: sun_chiudi_porta_pollaio
  id: sun_chiudi_porta_pollaio
    - platform: sun
      event: sunset
      offset: "+00:20:00"
  - service: mqtt.publish
      topic: "pollaio/switchCMD/"
      payload: "0"

It’s a automation that open/close the chicken coop door at sun risen/set.
If I click TRIGGER it’s work… the door will close.

I just have reload Hassio… we will see if will be triggered this evening.

Thanks a lot again

Weird, mine is still working

September 19, 2019

6:26 PM [Sun] has set

6:24 AM [Sun] has risen

Honestly, try rebooting, sometimes these things just stop for some reason.

That’s your Home Assistant version :wink: is how you installed Home Assistant.

I’ll put my standard recommendation here - don’t use a fixed time offset, use the sun elevation. Unless you live near the equator a fixed offset gives you different light levels through the year.

1 Like

Thanks for your answer.
I installed Hassio like a docker under a virtual Ubuntu 18 under a Qnap NAS.

About the use of the sun elevation I juset take a look… It’s little complicated,
and I must to take more time to understand it :slight_smile:

But the good news is that yesterday night was working.
And now in the morning it’s working again :slight_smile:

So it was need only a little reset of Hassio :slight_smile:

Thanks a lot for your help.