-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store current light state in scenes and recall group scenes #157
base: master
Are you sure you want to change the base?
Conversation
@vanviegen Would you be able to fix the linting by running |
|
itemtype == "groups" | ||
and data["type"] in ["LightGroup", "Room", "Zone"] | ||
and "class" not in data | ||
async def __normalize_local_item(self, data: Any, itemtype: str) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this may work, can we use this structure instead as it makes the code more readable?
def func(value) -> output:
# Code
return value
result = func(value)
@@ -319,17 +317,6 @@ async def async_group_action(self, request: web.Request, request_data: dict): | |||
# Create success responses for all received keys | |||
return send_success_response(request.path, request_data, username) | |||
|
|||
@routes.post("/api/{username}/groups") | |||
@check_request() | |||
async def async_create_group(self, request: web.Request, request_data: dict): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change of the groups logic is very different from the other component of this pr (allowing scene recalls for group 0). Can you create a separate pr for the other change instead of combining them into one like this?
This pull request has been marked as stale due to no activity and will be closed in 7 days. |
When updating or creating a scene, it should store the current light state for all lights in the scene's group if
lightstates
is not set orstorelightstate
istrue
. This PR implement that behavior. It has been tested with Hue Essentials.The patch includes a tiny second change: scene recalls were only applied for group "0". Just ignoring the group seems less wrong, and makes scene recall work properly with at least Hue Essentials.