-
-
Notifications
You must be signed in to change notification settings - Fork 99
supported_features Vs current_supported_features #1
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
Comments
Adding
|
I wouldn't say it was a proposal from my part, it was merely an idea as part of a brainstorm. I think that Things that are supported_feature "worthy":
Sometimes however, we see that we don't need a |
I agree that I'm not sure I fully understand how this would work with also being able to derive features that are available in the state. Does this mean you would need to check both the The other question is do we need a Updating the documentation makes sense and would be happy to help with that. I would also like to figure out if we can start moving components to using |
I've thought about it a bit more and we should go for the first implementation: For "active supported features" I want to make sure that we do not use the word "features" or the current flags as I don't want to conflate concerns. Maybe call it something as "player functionality" or something. It can still work with bit flags like supported features, just should be clearly differently called. |
Sounds good to me. How do you normally manage a somewhat breaking change like this? I would like to start moving entities to ensuring I’m happy to work through the media players as I already have a PR for Apple TV and understand the impact this change has on the UI component (its mostly around hiding showing controls). The options are:
Similar decisions also need to be made for other entities that have cards which rely on dynamic |
I think that only the media player has the frontend depend on supported_features being dynamic. To make the transition easier, I would expect us to indeed start with adding the new functionality attribute to the media player. We will have to look at the frontend to see what kind of checks we actually need. Source code for media player is here Some things can still be derived from supported_features, like turn on/turn off. I think that we just need prev track, next track, pause/play/stop (not completely sure what is going on here) |
The UI changes look fairly straight forward: What is the difference between In HA it is a case of:
Questions:
|
|
I've started mapping media player I also start to define |
This seems like much ado about (almost) nothing. Can we just remove the dynamic features? It is crazy to have each individual platform add/remove a bunch of Rather than a generic framework, I think much of this could be solved by adding e.g. a For now, though, I propose that we just ignore the issue and have a visible no-op Previous control in that situation. My DVD remote control always worked like that. According to a survey by @lucasweb78, only three media players use dynamic controls so it will be a simple cleanup. |
I've been thinking about this some more and tend to agree. I'm still working on improving the documentation for the media_player component so that it's clear what flag maps to which service but I am not sure about introducing a second set of flags just for managing the UI controllers. It would be good to figure out a path forward as right now the Apple Media Player still doesn't have all of it's capabilities correctly discovered by Alexa (unless you run my PR home-assistant/core#12167 as a custom_component). I've been running the above PR for a few weeks and not having the media_player controls in the UI disappear when it's not in use has not caused any problems and is actually, IMO, nicer as the UI component doesn't keep shifting in size and changing the layout. |
👍 for making supported_features static across Home Assistant. It follows very much the "backend should not care nor try to solve frontend issues". |
It looks like we've reached a consensus on this and are moving the media_player platforms to using a static set of supported features (only plex is left cc @ryanm101). Any objections to closing this discussion? |
@lucasweb78 What needs done for plex? |
The conclusions in this issue have been reconsidered in #985, we now allow updating |
Currently Entity exposes
supported_features
that has become overloaded to mean both:The second use case breaks Alexa Discovery which relies on
supported_features
to discover all of the capabilities of an entity not just the ones that are available in it's current state.One proposal from @balloob is to use
supported_features
as the list of all features and introduce a newcurrent_supported_features
that will reflect the features available at the current time base on the players state.The text was updated successfully, but these errors were encountered: