Home Assistant has a built-in integration called
device_sun_light_trigger to help you automate your lights. The integration will:
- Fade in the lights when the sun is setting and there are people home
- Turn on the lights when people get home after the sun has set
- Turn off the lights when all people leave the house
To enable this integration, add the following lines to your
# Example configuration.yaml entry device_sun_light_trigger:
(string)(Optional)Specify a specific light/group of lights that has to be turned on.
(string)(Optional)Specify which light profile to use when turning lights on.
Default value: relax
(string)(Optional)Specify which group of devices to track.
(boolean)(Optional)Disable lights being turned off when everybody leaves the house.
Default value: false
A full configuration example could look like this:
# Example configuration.yaml entry device_sun_light_trigger: light_group: group.living_room light_profile: relax device_group: group.my_devices disable_turn_off: 1