Home Assistant Period of the Day

Here’s a quick template sensor that I found on the interwebs that’s really useful for automations. Basically the sensor translates Home Assistant’s sun component into dusk, dawn, night, or day. It also shows a corresponding icon. We’ve found it to be very useful for conditions in automations. This requires that you have your correct latitude and longitude in your configuration.yaml.

To get it to show up in your UI, just add – sensor.period_of_day to your ui-lovelace.yaml file (if you’ve made the switch to lovelace).

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *