Hi,
I’m looking to schedule some lights via HA so that they turn on during the day, and dim at night.
I saw that there’s no in-built point-click functionality to setup complex time/calendar schedules in Home Assistant, but you need to install various add-ons (link). Some other people suggested just using the inbuilt automation framework.
Is that what most people are doing?
I tried doing a simple time-of-day one below - is this an efficient way of doing it via code? Or any tweaks/optimisations to below?
alias: Schedule lights
description: ''
trigger:
- platform: time
at: '08:00:00'
id: start_of_daytime
- platform: time
at: '20:00:00'
id: start_of_nighttime
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: start_of_daytime
sequence:
- service: light.turn_on
data:
brightness_pct: 100
target:
entity_id: light.living_room_lights
- conditions:
- condition: trigger
id: start_of_nighttime
sequence:
- service: light.turn_on
data:
brightness_pct: 18
target:
entity_id: light.living_room_lights
default: []
mode: single
If you have to setup schedules based on say, weekends etc, or seasons - guessing it might get quite convoluted?