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

Add device class to denonavr #100711

Merged
merged 3 commits into from
Sep 22, 2023
Merged

Add device class to denonavr #100711

merged 3 commits into from
Sep 22, 2023

Conversation

DanielWeeber
Copy link
Contributor

@DanielWeeber DanielWeeber commented Sep 22, 2023

Proposed change

adding device_class TV to denonavr component
fixes partially #94917

Type of change

  • Dependency upgrade
  • [ x] Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • [ x] The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the [development checklist][dev-checklist]
  • I have followed the [perfect PR recommendations][perfect-pr]
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

  • Documentation added/updated for [www.home-assistant.io][docs-repository]

If the code communicates with devices, web services, or third-party tools:

  • The [manifest file][manifest-docs] has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

@home-assistant
Copy link

Hi @DanielWeeber

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@home-assistant
Copy link

Hey there @ol-iver, @starkillerOG, mind taking a look at this pull request as it has been labeled with an integration (denonavr) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of denonavr can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign denonavr Removes the current integration label and assignees on the pull request, add the integration domain after the command.

@joostlek joostlek changed the title add device class TV Add device class to denonavr Sep 22, 2023
@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@home-assistant home-assistant bot marked this pull request as draft September 22, 2023 10:19
@starkillerOG
Copy link
Contributor

Well, the denonavr integration gives you a audio video receiver (AVR), it is not a TV.....
I would argue that it more closely represents a speaker than a TV.

@DanielWeeber
Copy link
Contributor Author

@starkillerOG @joostlek RECEIVER and out of constructor done

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
@joostlek
Copy link
Member

Oh and please click ready for review :)

@DanielWeeber DanielWeeber marked this pull request as ready for review September 22, 2023 10:39
@bdraco
Copy link
Member

bdraco commented Sep 22, 2023

This won't resolve the linked issue (which probably should be closed anyways since its a feature request, and HA doesn't want issues for feature requests) because the HomeKit implementation doesn't currently support receivers.

It needs to be added in these two places

if device_class == MediaPlayerDeviceClass.TV:

and state.attributes.get(ATTR_DEVICE_CLASS) == MediaPlayerDeviceClass.TV

And than subclassed so its the same as TV but sets the category to AUDIO_RECEIVER = 34

HomeKit implementations generally map receivers as TVs so you'll also need to do a PR to the homekit integration to map receivers to be treated the same as TVs if you want to address what was requested in #94917

@DanielWeeber
Copy link
Contributor Author

Yeah, but the TV integration is way better than it being a Switch. If the homekit integration will support Receivers in the future it will just work.

@bdraco
Copy link
Member

bdraco commented Sep 22, 2023

Yeah, but the TV integration is way better than it being a Switch. If the homekit integration will support Receivers in the future it will just work.

I agree, I'm only saying it doesn't solve the problem reported in the issue and more work is needed to achieve that with another PR.

@bdraco
Copy link
Member

bdraco commented Sep 22, 2023

I changed fixes #94917 to fixes partially #94917 since fixes is a closing keyword and will auto close #94917 on merge.

@bdraco bdraco merged commit 4133162 into home-assistant:dev Sep 22, 2023
21 checks passed
@bdraco
Copy link
Member

bdraco commented Sep 22, 2023

Thanks @DanielWeeber

@bdraco
Copy link
Member

bdraco commented Sep 22, 2023

#100717

@github-actions github-actions bot locked and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants