Group workaround - #21
Closed
tylerlv3 wants to merge 4 commits into
Closed
Conversation
… own group to try and get around the exception we were getting when trying to tint individually by panels. Now it routes all tinting through the groups endpoint, whether tinting an actual group, or an individual panel group
The Halio API fails when sending tint commands to individual panels directly, so the RealAdapter uses a workaround where it maps each panel to a single-panel group and sends tint commands to the group endpoint instead. During initialization, the adapter fetches existing groups and attempts to create missing single-panel groups. However, group creation was failing because the adapter expected a 201 Created HTTP response. According to the Halio Group API documentation, the POST /groups endpoint actually returns a 202 Accepted response. This commit updates the expected status code in RealAdapter.create_group() from 201 to 202, allowing the group creation workaround to complete successfully during application boot.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Briefly explain what this PR does and why
Type
Testing
Tested locally as best as I could, but it is a somewhat straightforward change. Will test at trailer.
Risk and rollout
If tint mapping fails we will revert and re implement based on issues we encounter
Checklist