Skip to content

Commit

Permalink
Fixed setting color
Browse files Browse the repository at this point in the history
  • Loading branch information
xplus2 committed Feb 20, 2023
1 parent 30d15ab commit 21d6156
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ambient Extractor

Fork of [color_extractor](https://www.home-assistant.io/integrations/color_extractor/), adding automatic brightness and rudimentary color correction.
Fork of [color_extractor](https://www.home-assistant.io/integrations/color_extractor/), adding automatic brightness.

Like color_extractor, this integration will extract the predominant color from a given image and apply it to a target light.
Additionally, overall brightness can be calculated and applied within adjustable limits. Useful as part of an automation.
Expand Down
3 changes: 3 additions & 0 deletions custom_components/ambient_extractor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ async def async_handle_service(service_call: ServiceCall) -> None:
)
return

if color:
service_data[ATTR_RGB_COLOR] = tempered_color

if brightness:
"""Apply min and max brightness"""
if br_min >= br_max:
Expand Down

0 comments on commit 21d6156

Please sign in to comment.