Commit Graph

21 Commits (a119bd005648bcd4eac130e98f78db5f01e895f6)

Author SHA1 Message Date
Fabian Affolter a4f1f6e724 Update docstrings (#7374)
* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstring

* Update docstrings

* Update docstrings

* Fix lint issues

* Update docstrings

* Revert changes in dict
2017-05-02 09:18:47 -07:00
Paulus Schoutsen edf500e66b Upgrade netdisco to 1.0.0rc2 (#7008)
* Upgrade netdisco to 1.0.0rc2

* fix tests
2017-04-11 20:10:02 -07:00
Adam Mills ecfe8e0a9a Formalize supported_features as entity property (#5794)
* Formalize supported_features as entity property

* Remove extra emulated_hue conditions

* Generate log message in executor
2017-02-07 20:42:45 -08:00
Paulus Schoutsen 6cd57ac02f Fix Yamaha doing I/O in event loop (#5387) 2017-01-17 21:53:03 -08:00
Adam Mills 469472914b Add SUPPORT_PLAY flag (#5181)
* Add SUPPORT_PLAY flag

* Add SUPPPORT_PLAY to existing media players

* Leave usage of new flag to device devs
2017-01-09 01:09:30 +01:00
Paulus Schoutsen d2bbc6ef70 Upgrade linter (#4461) 2016-11-18 21:47:59 -08:00
Sean Dague c06c82905a dynamically fetch yamaha media playback support (#4385)
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).
2016-11-15 21:56:40 -08:00
Sean Dague e9d19c1dcc Fix "argument of type 'NoneType' is not iterable" during discovery (#4279)
* 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.
2016-11-10 20:44:38 -08:00
Paulus Schoutsen ee5f228309 Make services yield (#4187)
* Make services yield

* Disable pylint abstract-method check

* add input_select

* add input_slider

* change to async vers.

* fix lint

* yield on add_entities as other components does
2016-11-03 18:32:14 -07:00
Sean Dague 2a7b7ebd6a Merge pull request #3985 from postlund/yamaha_additions
Improve support for Yamaha receiver
2016-11-01 21:50:03 -04:00
Fabian Affolter be272ac64a Disable too-many-* (#4107)
* Disable too-many-* and too-few-public-methods

* Remove globally disabled pylint warnings
2016-10-30 22:18:53 +01:00
Sean Dague 9d836a115a Add zone_ignore option for yamaha. (#4091)
* 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
2016-10-28 19:18:31 -07:00
Sean Dague 3d897e0e52 Add discovery for yamaha component (#4061)
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.
2016-10-26 23:46:44 -07:00
Pierre Ståhl 297a6f6f03 Improve support for Yamaha receiver
* Playback (play, pause, stop, next, previous)

* Media title, artist and album
2016-10-25 20:53:04 +02:00
Sean Dague 7da47852d4 Yamaha zones (#3920)
* 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.
2016-10-18 18:04:15 -07:00
Simon Szustkowski 4c625d09aa Add the ability to manually specify a Yamaha AVR via it's IP address (#3451)
* 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
2016-09-20 22:26:43 -07:00
Fabian Affolter 68def21615 Use voluptuous for Yamaha receiver (#3210)
* Migrate to voluptuous

* Add missing configuration variables
2016-09-13 21:39:03 -07:00
Dennis Karpienski 953223b81b Yamaha: added mapping and exclude lists (#1880)
* added mapping and exclude lists

* reworked pr

* made code more pythonic
2016-04-28 12:03:24 +02:00
Dennis Karpienski f1d8667d7e Yamaha AVR Input Select (#1796)
* added select input for yamaha

* set source_list to none on init
2016-04-13 21:13:12 -07:00
Jan Harkes 3bb571b578 Bump rxv to 0.1.11.
Fixes socket read/write timeout issues.
2016-04-05 14:17:42 -04:00
Andrew 2285a6761c Initial Yamaha Receiver Implementation
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
2016-03-26 00:47:00 -06:00