-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
Fix/Refactor Hyperion Integration #39738
Fix/Refactor Hyperion Integration #39738
Conversation
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.
Nice!
@MartinHjelmare A huge thank you for the great review. I've attempted to integrate your recommendations -- in particular, I think the unittest is looking much better, thank you for the pointer to the concrete example of that alternative approach. Thanks again for your time. |
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.
Great!
Should we use another target branch to merge this, so we can guarantee to release all the big changes, including config flow, in the same release? In that case I can push a copy of dev that we can use as target branch and you can rebase the branch here and swap target branch in the PR. |
Thanks @MartinHjelmare for the continued review! To make sure I understand (and to be over explicit) you are proposing:
If that's what you mean:
In the end, I do not have a strong preference -- happy to support and work with whatever you think is the best path. |
Yes. I forgot that this PR is fixing a current issue. Then I think we should merge this to dev to make sure it's in the beta cut next week. Ok? |
Yes, totally fine also. Thanks. |
thanks for updating this , my workaround hack was working but not really clean.. the only comment I have on this update is that now the effects list is really big which makes it very annoying to use on mobile devices.. It would be nice if we could override adding all effects and only keep ones we specify..previously I only had 4-5 effects I could quickly switch between |
Hi, I've upgraded to Home Assistant 0.116.1 with the news that this was released, however I still can't get instances to work. I get the following with my configuration.yaml: |
@Sousanator Could you please share your YAML? I have the following as the integration YAML and it seems to work for me: light:
- platform: hyperion
host: x.x.x.x
port: 19444
name: Hyperion |
@JeffResc Yes, that configuration works for instance 0 in hyperion.ng but I have multiple instances I want to control. There's a change mentioned above ( Support instance selection from multiple instances. c8424d4 ) that appears I can add 'instance: 2' to be able to select my third instance but it won't load the configuartion.yaml
|
@Sousanator Yes, I had to remove support in the YAML for multiple Hyperion instances, as Home Assistant developers do not allow modifications to YAML anymore -- instead they ask component owners to move to using Web-UI based configuration. I have work already in flight to do this, which intends to provide full multi-instance support (without any YAML at all). See relevant Home Assistant decision for why they have applied these limitations on component developers. I hope to have the features for this ready on the dev branch within the next week or so. @pkishino I can have a think about that. Would you mind filing a bug against me here ( https://github.com/home-assistant/core/issues/new?template=BUG_REPORT.md ). I won't be able to support this in the YAML (as the YAML is being removed in future, as above), so I will need to think about how to represent this in a UI-based config flow. |
@dermotduffy Ok, I'll see when I have the time to create it.. was thinking similar to plex integration.. pull in a list of all effects and allow user to select which ones to "monitor", tickbox with "Ignore any new effects" etc |
Hi, was there a particular reason to remove the old integration? It was still working fine for me and now I had to spent some hours to update from Hyperion from HyperionNG, before I could do the HomeAssistant update and not breaking my system. |
Please open an issue if you suspect a bug. If you want to suggest an enhancement please open a feature request in the Feature Requests section of our community forum. Merged PRs should not be used for enhancement discussion or bug reports. If you've found a bug it's ok to make a review with inline comments and link to an issue that reports the bug. Thanks! |
Breaking change
Fixes the Hyperion Integration to work with the current Hyperion-NG release. Refactors the integration to rely on the hyperion-py client. The default_color, hdmi_priority and effect_list parameters no longer have any effect. Instead, users should use light profiles (as per https://www.home-assistant.io/integrations/light/) as default color. The effect_list is now automatically populated. The hdmi_priority parameter no longer make sense with Hyperion-NG and will be removed in a future release.
Proposed change
The current Hyperion integration does not work with the current version of Hyperion (see this bug: #36471 ). This PR rewrites the integration in order to:
Based on the advice received in the earlier PR attempt, this rewrite intentionally leaves the YAML entirely untouched so as to respect ADR-0007 and ADR-0010.
Instead, once this in-place refactor has been submitted and functionality restored, the YAML will be subsequently removed and a configuration flow added instead. These changes are kept separate to reduce the review size.
Type of change
Example entry for
configuration.yaml
:Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: