Skip to content

Instantly share code, notes, and snippets.

View zemen's full-sized avatar

Konstantin Semenov zemen

View GitHub Profile
@zemen
zemen / custom_lights.yaml
Last active May 3, 2026 13:48
Adaptive Light Controller v2
blueprint:
name: "Adaptive Light Controller v2"
description: >
Adjusts brightness based on morning/evening times, with an optional
"daytime-only" subset of lights, optional presence-based on/off, and a
brightness lock that stops automatic brightness changes (presence on/off
still works). Brightness lock is activated by the brightness button or any
external brightness change (UI, KNX long-press dim).
Adaptive refresh runs via a sleep loop with 300ms gradient steps that
converges current toward target — robust against mode:restart interruptions
blueprint:
name: "Adaptive Light Controller"
description: >
Adjusts brightness and color temperature based on morning/evening times,
includes an optional “daytime-only” subset of lights (min=0 brightness),
optional presence-based on/off, and manual override to 100% brightness
that locks out auto updates. A heartbeat re-applies settings unless locked out.
domain: automation
blueprint:
name: Customized wake-up light alarm with sunrise effect
description: 'A wake-up light alarm with a brightness and color temperature sunrise
effect. Note: Requires date_time_iso sensor in configuration, not manually executable!'
domain: automation
input:
lights_with_color:
name: "Lights with color temperature support"
description: The lights to control
default: []