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 surround programs to zone 2+ #17445

Merged
merged 2 commits into from Nov 1, 2018

Conversation

Projects
None yet
4 participants
@Petro31
Contributor

Petro31 commented Oct 14, 2018

Add surround programs and surround program to any zone that supports it.

Description:

The current implementation only supports surround programs for the main zone. This change will allow all zones to support surround programs.

The method .surround_programs() returns false if the zone/receiver doesn't support it.

Related issue (if applicable): fixes #

Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>

Example entry for configuration.yaml (if applicable):

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

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

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

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.
Add surround programs to zone 2+
Add surround programs and surround program to any zone that supports it.
@@ -185,7 +185,7 @@ def update(self):
self._playback_support = self.receiver.get_playback_support()
self._is_playback_supported = self.receiver.is_playback_supported(
self._current_source)
if self._zone == "Main_Zone":
if self.receiver.surround_programs():

This comment has been minimized.

@balloob

balloob Oct 15, 2018

Member

Is this doing I/O and so, does this mean it is fetching the data twice?

This comment has been minimized.

@Petro31

Petro31 Oct 16, 2018

Contributor

Yes, it would fetch data twice if the check passed. I'll update it.

Update yamaha.py
removed double fetching.

@balloob balloob merged commit 9b47af6 into home-assistant:dev Nov 1, 2018

5 checks passed

Hound No violations found. Woof!
WIP ready for review
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.003%) to 93.551%
Details

@wafflebot wafflebot bot removed the in progress label Nov 1, 2018

@balloob balloob referenced this pull request Nov 9, 2018

Merged

0.82 #18335

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment