Presence-based lights
Home Assistant has a built-in integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [Learn more] 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
This integration requires the integrations sun, device_tracker, person and light to be enabled.
To enable this integration, add the following lines to your configuration.yaml
configuration.yaml 文件是 Home Assistant 的主要配置文件。它列出了要加载的集成及其特定配置。在某些情况下,需要直接在 configuration.yaml 文件中手动编辑配置。大多数集成可以在 UI 中配置。 [Learn more] file.
在更改了configuration.yaml
configuration.yaml 文件是 Home Assistant 的主要配置文件。它列出了要加载的集成及其特定配置。在某些情况下,需要直接在 configuration.yaml 文件中手动编辑配置。大多数集成可以在 UI 中配置。 [Learn more] 文件后,重启 Home Assistant 以应用更改。
# Example configuration.yaml entry
device_sun_light_trigger:
Configuration Variables
Specify which light profile to use when turning lights on.
Specify which group to track. The group can contain device_trackers or persons.
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: true