Skip to content
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

Clean up old quest flavor code and hide some features from unsupported devices #2265

Merged
merged 2 commits into from Feb 17, 2022

Conversation

dshokouhi
Copy link
Member

Summary

Remove the checks for quest build, only use model checks where appropriate. Also hide some features from TV devices as they just won't work and will crash. I know we dont support the TV devices but just hiding things so we dont crash.

  • Last app sensor was hidden from quest build but works in the minimal version as we still get the proper permission
  • Network sensors do indeed works as we have the permission
  • Next alarm will show up but dont think there are any alarms apps yet 😛
  • Notification sensors do work as we have proper permission however I saw some crashes related to the permission on TV devices so hiding this from them because those devices do not have standard notifications and use different media features. This will never work.
  • There is no mobile data or sim cards on the quest so hiding that, wont crash on TV
  • Settings - Hide from Quest devices as some features will never work
  • Do not show notification channels to TV devices as they do not have the proper activity
  • Hide websocket info from TV devices as they cannot control the channel

Screenshots

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#

Any other notes

Copy link
Collaborator

@JBassett JBassett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should have any any explicit Build.MODEL checks unless it's causing crashes. There should be other ways to determine if a device supports an API.

@dshokouhi
Copy link
Member Author

I don't think we should have any any explicit Build.MODEL checks unless it's causing crashes. There should be other ways to determine if a device supports an API.

ok I can replace this in a few places but what do you suggest we do for things like Widgets, Tiles and Shortcuts? I hid them in settings based on the model because the devices API level supports it even though the device itself won't.

Copy link
Collaborator

@JBassett JBassett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a merge.

@JBassett JBassett merged commit 074c8ae into home-assistant:master Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants