Skip to content

Commit d834a0c

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent c0fff83 commit d834a0c

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

custom_components/adaptive_lighting/const.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@
6969
CONF_MIN_COLOR_TEMP, DEFAULT_MIN_COLOR_TEMP = "min_color_temp", 2000
7070
DOCS[CONF_MIN_COLOR_TEMP] = "Warmest color temperature in Kelvin. 🔥"
7171

72-
CONF_REDUCE_DAYTIME_BRIGHTNESS, DEFAULT_REDUCE_DAYTIME_BRIGHTNESS = "reduce_daytime_brightness", 0
72+
CONF_REDUCE_DAYTIME_BRIGHTNESS, DEFAULT_REDUCE_DAYTIME_BRIGHTNESS = (
73+
"reduce_daytime_brightness",
74+
0,
75+
)
7376
DOCS[CONF_REDUCE_DAYTIME_BRIGHTNESS] = "Reduce brightness during the daytime (%)"
7477

7578
CONF_ONLY_ONCE, DEFAULT_ONLY_ONCE = "only_once", False
@@ -308,7 +311,11 @@ def int_between(min_int, max_int):
308311
(CONF_MAX_BRIGHTNESS, DEFAULT_MAX_BRIGHTNESS, int_between(1, 100)),
309312
(CONF_MIN_COLOR_TEMP, DEFAULT_MIN_COLOR_TEMP, int_between(1000, 10000)),
310313
(CONF_MAX_COLOR_TEMP, DEFAULT_MAX_COLOR_TEMP, int_between(1000, 10000)),
311-
(CONF_REDUCE_DAYTIME_BRIGHTNESS, DEFAULT_REDUCE_DAYTIME_BRIGHTNESS , int_between(0, 100)),
314+
(
315+
CONF_REDUCE_DAYTIME_BRIGHTNESS,
316+
DEFAULT_REDUCE_DAYTIME_BRIGHTNESS,
317+
int_between(0, 100),
318+
),
312319
(CONF_PREFER_RGB_COLOR, DEFAULT_PREFER_RGB_COLOR, bool),
313320
(CONF_SLEEP_BRIGHTNESS, DEFAULT_SLEEP_BRIGHTNESS, int_between(1, 100)),
314321
(

custom_components/adaptive_lighting/switch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,12 @@
127127
CONF_MAX_SUNSET_TIME,
128128
CONF_MIN_BRIGHTNESS,
129129
CONF_MIN_COLOR_TEMP,
130-
CONF_REDUCE_DAYTIME_BRIGHTNESS,
131130
CONF_MIN_SUNRISE_TIME,
132131
CONF_MIN_SUNSET_TIME,
133132
CONF_MULTI_LIGHT_INTERCEPT,
134133
CONF_ONLY_ONCE,
135134
CONF_PREFER_RGB_COLOR,
135+
CONF_REDUCE_DAYTIME_BRIGHTNESS,
136136
CONF_SEND_SPLIT_DELAY,
137137
CONF_SEPARATE_TURN_ON_COMMANDS,
138138
CONF_SKIP_REDUNDANT_COMMANDS,

webapp/app.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,14 @@ def plot_color_temp(inputs: dict[str, Any], sleep_mode: bool) -> plt.Figure:
227227
ui.input_slider("max_brightness", "max_brightness", 1, 100, 100, post="%"),
228228
ui.input_numeric("min_color_temp", "min_color_temp", 2000),
229229
ui.input_numeric("max_color_temp", "max_color_temp", 6666),
230-
ui.input_slider("reduce_daytime_brightness", "reduce_daytime_brightness", 0, 100, 0, post="%"),
230+
ui.input_slider(
231+
"reduce_daytime_brightness",
232+
"reduce_daytime_brightness",
233+
0,
234+
100,
235+
0,
236+
post="%",
237+
),
231238
ui.input_slider(
232239
"sleep_brightness",
233240
"sleep_brightness",

0 commit comments

Comments
 (0)