Skip to content

Commit

Permalink
feat: update Adaptive Lighting via HACS
Browse files Browse the repository at this point in the history
  • Loading branch information
aronnebrivio committed Aug 6, 2023
1 parent a28804b commit 5769e25
Show file tree
Hide file tree
Showing 3 changed files with 288 additions and 205 deletions.
8 changes: 8 additions & 0 deletions custom_components/adaptive_lighting/adaptation_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
ATTR_COLOR_TEMP_KELVIN,
ATTR_HS_COLOR,
ATTR_RGB_COLOR,
ATTR_RGBW_COLOR,
ATTR_RGBWW_COLOR,
ATTR_TRANSITION,
ATTR_XY_COLOR,
)
Expand All @@ -27,8 +29,11 @@
ATTR_HS_COLOR,
ATTR_RGB_COLOR,
ATTR_XY_COLOR,
ATTR_RGBW_COLOR,
ATTR_RGBWW_COLOR,
}


BRIGHTNESS_ATTRS = {
ATTR_BRIGHTNESS,
ATTR_BRIGHTNESS_PCT,
Expand Down Expand Up @@ -136,6 +141,7 @@ class AdaptationData:
context: Context
sleep_time: float
service_call_datas: AsyncGenerator[ServiceData, None]
force: bool
max_length: int
which: Literal["brightness", "color", "both"]
initial_sleep: bool = False
Expand Down Expand Up @@ -174,6 +180,7 @@ def prepare_adaptation_data(
service_data: ServiceData,
split: bool,
filter_by_state: bool,
force: bool,
) -> AdaptationData:
"""Prepares a data object carrying all data required to execute an adaptation."""
_LOGGER.debug(
Expand Down Expand Up @@ -204,6 +211,7 @@ def prepare_adaptation_data(
context=context,
sleep_time=sleep_time,
service_call_datas=service_data_iterator,
force=force,
max_length=service_datas_length,
which=lighting_type,
)
2 changes: 1 addition & 1 deletion custom_components/adaptive_lighting/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"iot_class": "calculated",
"issue_tracker": "https://github.com/basnijholt/adaptive-lighting/issues",
"requirements": ["ulid-transform"],
"version": "1.18.0"
"version": "1.18.3"
}
Loading

0 comments on commit 5769e25

Please sign in to comment.