This makes it so that media playback support for inputs is dynamically
fetched from the receiver, instead of assuming that all playback
commands work for all inputs.
Tests are added for this, using a FakeYamaha class, which has some
sample data stubbed in for key methods that need to be called. We also
include an example of the desc.xml needed to dynamically parse these
features for these tests (as this is done in platform init).
* Fix "argument of type 'NoneType' is not iterable" during discovery
When yamaha receivers are dynamically discovered, there config is
empty, which means that we need to set zone_ignore to [] otherwise the
iteration over receivers fails.
* Bump rxv library version to fix play_status bug
rxv version 0.3 will issue the play_status command even for sources
that don't support it, causing stack traces during updates when
receivers are on HDMI inputs.
This was fixed in rxv 0.3.1. Bump to fix bug #4226.
* Don't discovery receivers that we've already configured
The discovery component doesn't know anything about already configured
receivers. This means that specifying a receiver manually will make it
show up twice if you have the discovery component enabled.
This puts a platform specific work around here that ensures that if
the media_player is found, we ignore the discovery system.
* Add zone_ignore option for yamaha.
We attempt to discover all zones for yamaha receivers. There are times
when users may want to suppress some zones from showing up. When a
Zone isn't actually connected to speakers, or on some newer receivers
where Zone_4 is an HDMI only zone, that doesn't support even basic
media_player UI.
This provide a mechanism for users to do that.
Fixes#4088
* Update yamaha.py
This uses the discovery code from netdisco/ha to discover yamaha
receivers. The old discovery code remains if discovery is turned of in
HA, at least for now. Though it probably is worth turning that off in
the future.
* Enhance yamaha component
This enhances the yamaha component to create 1 player per zone,
instead of only one play, which provides direct control of the various
zones for the player.
It also exposes play_media for NET_RADIO sources, which allows direct
setting of that.
This requires code changes in rxv 0.2.0, so the requirement dependency
is raised.
* Support current playback metadata for NET_RADIO
When on NET RADIO, support the currently playing information.
* Added the possibility to manually specify a Yamaha Receiver
* Added the possibility to manually specify a Yamaha AVR
* Using string formatting
* Hostname checks for None now
* Do not use add_devices for each if-branch separately
* Fixed linting
Text Update
Additional additions and better support for volume, and mute. Cleanup
Added rxv to requirements_all
Added yamaha.py to .coveragerc
Made uppercase, and removed tabs
Added requirements variable
Added doc string for lint
Removed global variable, and simplified state as per balloobs suggestion
Refactored the component with balloobs suggestions
-Added import in the method
- Only get receiver information on init
- A bit of cleanup
Remove up and down volume
Uneeded as this is handled by set volume instead
Fixed a lint build error
More lint fixes
Removed unused imports
Lint Fixes
Simplified if statement
Minor refactoring since the init calls update.
Fixed lint error
Just variable naming change
Added support for an optional name for the receiver.
Better error handling, a bit of refactoring based on balloobs suggestions
Fixed lint error.
Another lint error fix
Changed raise to return
Disable pylint error handling
Pylint broad exception
Made exception handling in the setup platform instead of the constructor.
Lint error fix
Refactored the way devices are found. This allows for multiple receivers