Skip to content

Commit

Permalink
feat: add different brightness ramping mechanisms
Browse files Browse the repository at this point in the history
  • Loading branch information
basnijholt committed Aug 4, 2023
1 parent 1ef7ed5 commit 98a117b
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions custom_components/adaptive_lighting/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,30 @@
" for later real sunsets. 🌇"
)

CONF_BRIGHTNESS_MODE, DEFAULT_BRIGHTNESS_MODE = "brightness_mode", "default"
DOCS[CONF_BRIGHTNESS_MODE] = (
"Brightness mode to use. Possible values are `default`, `linear`, and `tanh` "
"(uses `brightness_ramp_time_before` and `brightness_ramp_time_after`). 📈"
)
CONF_BRIGHTNESS_RAMP_BEFORE, DEFAULT_BRIGHTNESS_RAMP_TIME_BEFORE = (
"brightness_ramp_time_before",
3600,
)
DOCS[CONF_BRIGHTNESS_RAMP_BEFORE] = (
"(Ignored if `brightness_mode='default'`) The duration (in seconds) to ramp up/down "
"the brightness before sunrise/sunset. The brightness starts changing at this many seconds "
"before the sunset/sunrise 📈📉"
)
CONF_BRIGHTNESS_RAMP_AFTER, DEFAULT_BRIGHTNESS_RAMP_TIME_AFTER = (
"brightness_ramp_time_after",
3600,
)
DOCS[CONF_BRIGHTNESS_RAMP_AFTER] = (
"(Ignored if `brightness_mode='default'`) The duration (in seconds) to ramp up/down "
"the brightness after sunrise/sunset. The brightness starts changing at this many seconds "
"after the sunset/sunrise 📈📉."
)

CONF_TAKE_OVER_CONTROL, DEFAULT_TAKE_OVER_CONTROL = "take_over_control", True
DOCS[CONF_TAKE_OVER_CONTROL] = (
"Disable Adaptive Lighting if another source calls `light.turn_on` while lights "
Expand Down

0 comments on commit 98a117b

Please sign in to comment.