{"id":1179,"date":"2021-12-22T21:55:05","date_gmt":"2021-12-23T02:55:05","guid":{"rendered":"http:\/\/robotsbench.com\/?p=1179"},"modified":"2022-09-11T21:07:18","modified_gmt":"2022-09-12T02:07:18","slug":"home-assistant-automation-sun-condition","status":"publish","type":"post","link":"https:\/\/robotsbench.com\/home-assistant-automation-sun-condition\/","title":{"rendered":"How to code a Home Assistant automation sun condition"},"content":{"rendered":"
In Home Assistant, an automation is a action that runs one time when a condition is reached. The condition itself is called a trigger<\/em>.<\/p>\n\n\n\n There are many types of trigger available such as:<\/p>\n\n\n\n Here I’m going to tell you about my automations that are related to the sun, more precisely if the sun rises or set. If you want to react to the current light level outside, it’s the best option: if you look only at the time, you’ll have to keep adjusting your automations as the seasons changes.<\/p>\n\n\n\n