* Add source_list to universal media player
* Expanded attirubte and command support for UMP
Added support to the universal media player
for the following:
Volume Set
Current Source
Set Source
Current Volume
The goal is to facilitate a single-card media player
that includes source selection and setting the volume
of the receiver.
Example setup:
```
media_player:
- platform: universal
name: Media Center
children:
- media_player.kodi
- media_player.cast
commands:
select_source:
service: media_player.select_source
data:
entity_id: media_player.receiver
volume_set:
service: media_player.volume_set
data:
entity_id: media_player.receiver
volume_mute:
service: media_player.volume_mute
data:
entity_id: media_player.receiver
turn_on:
service: homeassistant.turn_on
data:
entity_id: media_player.receiver
turn_off:
service: homeassistant.turn_off
data:
entity_id: media_player.receiver
attributes:
state: media_player.receiver
is_volume_muted: media_player.receiver|is_volume_muted
volume_level: media_player.receiver|volume_level
source: media_player.receiver|source
source_list: media_player.receiver|source_list
```
* Remove print statements
* Change service call back to use call_from_config
* Modified service calls to use template data
* linting fixes
* Add tests
* linting fices
* More pylinting
If the mpd client ran into an socket timeout, the socket will raise an
OSError on every further request. This adds OSError to the list of
excptions, that causes a client reconnect.
This fixes#4650
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
In media_content_id() the "id" of the current song was returned. as
stated in bug #4652 the id is only the Tracklist-Id in the current
tracklist and is omitted if the track is not part of a tracklist (what
caused the bug in the first place).
To match the semantics described in the dockstring, to return a "Content
ID", this chooses the filename of the current song as id and returns
it.
It also uses get() instead of [] to prevent KeyError.
This fixes bug #4652
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
* Add channel switching for philips tvs.
* Disable track buttons when not watching tv.
* Undo isort config.
* Yes it does.
* Just testing some assumption on hound's flake8 behaviour.
* Revert "Just testing some assumption on hound's flake8 behaviour."
This reverts commit ff9940b39e.
* poke
* Implement WAQI sensor
* Corrections based on CI check.
* Updated requirements_all.txt for pwaqi==1.2
* Require latest version of pwaqi
* Initial implementation of DuneHD media player component based on pdunehd.
* Major: avoid update() in property fetch,
Major: implement source support,
Major: single device per media player instance,
Major: support for volume / mute controls
* Pythonify pdunehd.
Support media_title.
* Fix pylint.
* Further pylint.
* docstring
* Formatting and indentation.
* Change indentation to spaces.
* Update coverage and recorded requirements before PR.
* Further pylint / fake8 / pydocstyle fixes.
* Implement next / prev track,
Properly decode blu-ray playback,
Attempt to decode media title
* Fix play / pause
Linting
* Update requirements.
Fix lint.
* Fix lint and syntax error
* Yet more linting.
* Yet more linting.
* Fix lint: line too long.
* Force update of HA state.
* Added support for media_position property to media_player + implementation for sonos.
* Pla yback progress now updates without needed state transitions in HA.
* Linting fixes
* media_position_update_at property is now a datetime.
* Minor fix.
* Linting fixes.
* Move HTTP to own folder
* Break HTTP into middlewares
* Lint
* Split tests per middleware
* Clean up HTTP tests
* Make HomeAssistantViews more stateless
* Lint
* Make HTTP setup async
* Added source selection for Denon AVR Media Player
* Update denon.py
* Update denon.py
* Update denon.py
* Update denon.py
* Update denon.py
slight format update (space issue and new line)
* Further update regarding formatting
* Updated the source name with lowercase
* Update denon.py
* Migrate callbacks to use schedule_update_ha_state
* Migrate MQTT sensor callback to async
* Migrate wemo to not update inside schedule_update_ha_state
* Make MQTT switch async
* Fix nx584 test
* Migrate tellstick callback
* Migrate vera callback
* Alarm control panel - manual: use async callbacks
* Run the switch rest tests that work
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.
* Added support for Philips Tvs with JointSpace API
* Flake + Lint fixes
* Lint be like "lol fu"
* Changes as requested by reviewers, except lib-requirement
* Switched to library-usage
* lint... newline-bingo...
* Sonos responsiveness improvements (async_ coroutines, event based updating, album art caching) + Better radio station information
* Docstring fixes.
* Docstring fixes.
* Updated SoCo dependency + fixed file permissions.
* Only fetch speaker info if needed.
* PEP8 fixes
* Fixed SoCoMock.get_speaker_info to get test to pass.
* Regenerated requirements_all.txt + async fetching of album art with caching + added http_session to HomeAssistant object.
* Unit test fixed.
* Add blank line as per flake8
* Fixed media image proxy unit test.
* Removed async stuff.
* Removed last remnants of async stuff.
* Add Emby Server media_player component
* Code cleanup, move to request sessions, generate UUID per session
* Make media image fetch more robust
* Allow for http or https
* Cleanup some Keyerror conditions found through more testing
* Move EmbyRemote to pip, update requirements
* Code cleanup, add SSL config option
* 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.
* Sonos improvements: media_* properties delegate to coordinator if speaker is a slave, media_image_url and media_title now works for radio streams, source selection/list takes speaker model into account, commands on slaves delegate to coordinator.
* Fixed failing unit tests.