* Lazy loading of service descriptions
* Fix tests
* Load YAML in executor
* Return a copy of available services to allow mutations
* Remove lint
* Add zha/services.yaml
* Only cache descriptions for known services
* Remove lint
* Remove description loading during service registration
* Remove description parameter from async_register
* Test async_get_all_descriptions
* Remove lint
* Fix typos from multi-edit
* Remove unused arguments
* Remove unused import os
* Remove unused import os, part 2
* Remove unneeded coroutine decorator
* Only use executor for loading files
* Cleanups suggested in review
* Increase test coverage
* Fix races in existing tests
* Updated plexapi to 3.0.5
* Removed removed server obj that was being used for the media URL generation as .url() is available in self._session
seasons() no longer exists -> renamed to season()
season() returns obj not list so corrected
season.index returns int, cast to str to zerofill
* Fixed Linting
* Cleaned up '_clear_media()'
* Moved media Type to new method
* renamed "clear_media()' to ' clear_media_details()'
reset 'app_name' (Library Name) in clear_media_details
moved thumbs to '_set_media_image()'
* Moved playback info into setmedia type as it was just used for the next anyway
* Moved library name & image download to only happen if session and player active as else no point anyway
* Fixed Linting issue
* Some tweaks to clean up unintended complexity
* Removed redundant declarations
* Fixed whitespace
* Revert "Fixed whitespace"
This reverts commit 0985445c47.
* Revert "Removed redundant declarations"
This reverts commit 6f9d5a85b0.
* added functionality to save/restore snapshots to monoprice platform
* renamed monoprice_snapshot, monoprice_restore to snapshot, restore
This is to simplify refactoring of snapshot/restore functionality for monoprice, snapcast and sonos in the future
Sonos Playbar and Playbase devices support Night Sound and Speech Enhancement
effects when playing from sources such as a TV. Adds a new service "sonos_set_option"
whichs accepts boolean options to control these audio features.
* Add media progress information
* Remove unnecessary comments
* Remove datetime import
* Remove pysonyavr dependency
* Fix doc syntax (D205)
* Lint fix: no-else-return
* Don't attempt to set media progress info if program is None
* Fix Python 3.4 compatibility
* Explicitely depend on pyteleloisirs
* Only update remaining play time when it changed
* Fix floot state table
* Add support for Logitech UE Smart Radios.
* Removed full stops to please Hound's line limit.
* Updated with requested changes.
* Fix Pylint Flake8 problem.
* Updated with requested changes.
* initial commit of shuffle option for sonos
* added test
* Small adjustments to adhere to review requests
* Removed unnessesary setting of variable. Use shuffle state from soco instead
In a case where either (a) an incorrect source name is used, or (b) the
TV isn't currently queryable (e.g. it's off), we get tracebacks because
we assume the source that we are being asked to select exists in
self._source_list.
This makes the lookup code a little more rugged, and adds in a warning
message (in place of the current exception).
* Correction of Samsung Power OFF behaviour
Addition of a delay after powering OFF a Samsung TV, this avoid status
update from powering the TV back ON.
Deletion of update() return statement, return value not used.
* Rename self._end_of_power_off_command into self._end_of_power_off
* Removal of unused line break in Samsung TV component
* Refactored to new global json saving and loading
* Fixed emulated_hue tests
* Removed unnecassary error handling
* Added missing newline
* Remove unused imports
* Fixed linting error
* Moved _load_json wrapper out of the config class
This bumps the used snapcast version to 2.0.8 and enables the new
reconnect feature that causes the component to reconnect to a server if
the connection was lost.
This fixes the ned to restart Home Assstant after a snapcast reboot, as
described in issue #10264.
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
* Implementation of `state_template` for the Universal media_player
* add tracking to entities in state template
* use normal config_validation
* fix tests, use defaults in platform schema, remove extra keys
* and test the new option `state_template`
* lint fixes
* no need to check attributes against None
* use `async_added_to_hass` and call `async_track_state_change` from `hass.helpers`
With the default timeout of 10 seconds, the log gets filled up with "component is taking more than 10 seconds" errors.
This should probably be fixed in some other way, but for now this reduces the problem a bit.
* Introduce update_hass()
* Introduce media_positions
* Version bump pymusiccast
* Fix: Unnecessary "else" after "return"
* FIX D400: First line should end with a period
* Version bump
Fixes https://github.com/home-assistant/home-assistant/issues/10411
The play_media parameters are a little bit black magic for the yamaha
platform, this explains what they are in a code comment instead of
having to go look at the yamaha platform itself.
Fixes Bug #10180
* Add HTTP cache header to proxied media player images
With the resource actually being cacheable, preemptively extend the cache
buster key to prevent hash collisions.
While at it, change the hash from md5 to sha256 for consistency with the
access_token method.
* Remove lint
* Fix: Last Played Media Title in plex would stay even when player was idle/off
Primary Fix is in the "if self._device" portion.
code in "if self._session" is a catch all but i'm not 100% if it is needed.
* Fixed lint issues with previous commit
* 1st Pass at refactoring plex refresh
Moved _media** into clearMedia() which is called in _init_ and
at start of refresh.
Removed redunant _media_* = None entries
Grouped TV Show and Music under single if rather than testing
seperately for now.
* Fixed invalid name for _clearMedia()
Removed another media_* = None entry
* Removed print() statements used for debug
* Removed unneeded "if" statement
* Changes
* Updated Requests to 2.18.4
* Updated plexapi to 3.0.3
* Removed function to convert_NA_to_None
* Removed function get_thumb_url
Type changes
* _session.player is now a list players
* na_type deprecated and to be removed
* plexapi has change na to None
Known Issues:
* Player controls currently broken
* Last location (library) stays while player idle
* Username is now Usernames and a list
* Fix for broken controls
* Removed errant print statement
* Removed depecrated na_type
* Updated Plex Sensor to use plexapi 3.0.3
Added support for Token to be used in sensor
Known Issues:
Username and Password broken for Plex Sensor use Token instead for now
* removed TODOs
* Fixes for private access violations
* Removed need for _local_client_fix
* Removed unused import and fixed parens
* Do not include program data in media_title if program data is undefined (None)
* Show thumbnail of currently playing program
* async setup
* Update requirements
* Updated RussoundRNETDevice.update() to call and enhanced function that reduces network traffic
Refer to issue #6 on the Russound project
* Updated RussoundRNETDevice.update() to invoke an enhanced function to reduce network traffic
PLease see issue #6 on the russound project
* Updated REQUIREMENTS to use version 0.1.9 of the Russound component
Please refer to issue #6 on the Russound rnet project
* Corrected some minor style details to satisfy Houndbot
* Update requirements_all.txt
* Update request requirement
Update request requirement from version v2.14.2 to v2.18.4
* Fix dependency vizio integration
3rd patry packages were removed from requests. Changed dependency from requests to urllib3
* forgot =
forgot = when adding the requirement
* re-run script/gen_requirements_all.py
re-run script/gen_requirements_all.py
* Unvendoring urllib3 from requests
In v2.16.0 and newer of requests they unverdored urllib3.
* undefined name 'InsecureRequestWarning'
* Removed requirement to 'urllib3==1.22
* removed import requests
* removed urllib3.exceptions.InsecureRequestWarning
removed urllib3.exceptions.InsecureRequestWarning travis lint
* added implementation for monoprice 6-zone amplifier. This implementation is based on and very similar to russoun_rnet implementaion
* updated comments and cleaned up code
* updated comments and cleaned up code
* added unit tests
* removed 'name' attribute from platform schema.
* added monoprice.py to .coveragerc
* fixed lint
* fixed lint errors
* fixed lint errors
* added monoprice to requirements_all.txt
* fixed lint errors again
* implemented change requests
* fixed lint error
* added exception handling to setup_platform()
* replaced catchall with SerialException only
* added myself to CODEOWNERS
* fixed weird merge to CODEOWNERS
* Fix: Last Played Media Title in plex would stay even when player was idle/off
Primary Fix is in the "if self._device" portion.
code in "if self._session" is a catch all but i'm not 100% if it is needed.
* Fixed lint issues with previous commit
* 1st Pass at refactoring plex refresh
Moved _media** into clearMedia() which is called in _init_ and
at start of refresh.
Removed redunant _media_* = None entries
Grouped TV Show and Music under single if rather than testing
seperately for now.
* Fixed invalid name for _clearMedia()
Removed another media_* = None entry
* Removed print() statements used for debug
* Removed unneeded "if" statement
* allow customizable action for webos tv turn on as not all models allow for WOL
* trying to fix the houndci-bot
* last few fixes hopefully
* I guess not
* last time!
* This is a breaking change. I have removed the build-in wake-on-lan functionality and have opted for a script which can be a wake-on-lan switch. I have also removed any reference to wol.
* hoping to fix formatting
* linter errors
* Added configurable timeout for receiver HTTP requests | Additional AVR-X detection based on CommApiVers | Treat Marantz SR6007 - SR6010 as AVR-X device
* timeout value not passed correctly
* fix not providing device for discovered directvs
This fixes a bug introduced at 6884965c80
Discovered directv boxes would not be instantiated with a DEVICE
parameter.
Signed-off-by: Nicholas Sielicki <sielicki@yandex.com>
* directv: add discovery of RVU clients
If discovery is used with directv, also try to further discover and
configure RVU client set-top boxes by requesting information from a REST
service running on the main directv box/RVU-server.
This commit also disables discovery if any directv configuration is
supplied by the user.
Signed-off-by: Nicholas Sielicki <sielicki@yandex.com>
* components/media_player/directv.py: use hass.data
Use hass.data instead of a global to remember state.
Signed-off-by: Nicholas Sielicki <sielicki@yandex.com>
* unconditionally import requests in directv.py
Requests is a core requirement, so we're okay to import at the top of
the file rather than conditionally / in a function.
Signed-off-by: Nicholas Sielicki <sielicki@yandex.com>
* Add support for Automatic OAuth2 authentication
* Fix async conversion of configurator
* Rename method for async
* Use hass.components to get configurator component
* Fix typo
* Move session data to hidden directory
* Make configurator callback optional
* Do not use pychromecast.Chromecast for Cast Groups
pychromecast.Chromecast creates Chromecast instance with friendly_name and cast_type of the device and not of a group.
Which leads to collisions
* Update cast.py
* using hass.data
* Fixed and extended tests
* Line length in tests
* Lint in tests
* Allow sonos to select playlists as a source
Most of this was taken from
https://github.com/home-assistant/home-assistant/issues/5598#issuecomment-278229895
however I made a few small improvements so that it works for other
services than Spotify and it should properly switch to playing the queue
if you had another song playing previously.
/cc @PatBoud
* Attempt to fix style issues
* More indent changes
* Fix misplaced period
* Move playlist replacement to function
* Privatize replace_queue_with_playlist and explain
* Remove unneeded decorator
* Fix doc formatting
* New media_player platform for Russound devices using the RIO protocol
Auto discovers zones and sources
Handles media metadata from sources that support it
asyncio implementation
Push updates for any zone or source changes so no polling required.
* Fixed up linting issues
* Addressing PR feedback
Updated russound_rio dependency to 0.1.3
Use enumerate_zones and enumerate_sources methods instead of doing it in
the platform.
Register callbacks in async_added_to_hass coroutine
Corrected behavior of async methods
DirectPy, the third party library used for controlling directv boxes,
has the ability to accept an ID in order to act as a remote for Genie
slaves instead of just the master directv box. This commit adds glue
such that one can configure home assistant to interface with these slave
genie boxes.
Signed-off-by: Nicholas Sielicki <sielicki@yandex.com>
* Make it available during state paused.
* Don't adjust for media_position_updated_at. I.e. do as vlc, sonos etc
so that returned position is the position at the time of
media_position_updated_at, not now.
* Lift Apple TV to pyatv 0.3.2
Update code to use basic new features.
* Support button presses in Apple TV
* Support device authentication
* Convert Apple TV to a component
A media_player platform and a remote platform will be loaded for each
manually configured or discovered device.
* Move device auth to apple_tv component
* Update requirements and coverage config
* Add scan support to apple_tv
* Fix Plex component to use port number in discovery.
* Break line
* Correctly save port to config
* Handle port with fewer code changes
* This is stuck configuring and I'm not sure why
* Changes suggested by @dale3h
* handle TransportError exceptions when calling JSONRPC API
* use double quotes for log messages; show TransportErrors as in async_ws_connect
* fix spaces around keyword / parameter
* fix logging message
* review changes
* Adding support for https.
This change allows to access a firetv-server instance that runs over https (via a reverse proxy for exemple).
Default stays http, but if `ssl: true` is set in the configuration the connection goes over https.
Successfully tested.
* respecting the 79 characters line limit
* initial commit
* class name and requirements_all.txt
* removed mentions of D7050
* changed default name
* catch oserror in update, travis errors.
* use nad_receiver pip version
* update coveragerc
* add option to display all sources / pushed to version 0.4.3 of library
* Add show_all_sources option for auto discovery too
* change code style for hass
* fix lint
* Check if media commands are actually applicable
- Explicitly allow ‘stop’ and ‘play’ on radio streams
- Disallow media commands when the playlist is empty
- Check if command is supported when calling `turn_on` and `turn_off`
* Suppress UPnP error 701 on media commands
* Clean up soco_filter_upnperror
Clean up soco_filter_upnperror and fix small bug in support_previous_track determination
* Remove setting up an hbmqtt broker
* Don't pass loop to web.Application in tests
* Use .query instead of deprecated .GET for aiohttp requests
* Fix closing file resource
* Do not use asyncio mark
* Notify.html5 - PyJWT: Use options to disable verify
* Yamaha: Test was still using deprecated ip
* Remove pytest-asyncio
* Kodi specific services to call Kodi API methods
- new service: `kodi_execute_addon` to run a Kodi Addon with optional parameters. Results of the Kodi API call, if any, are redirected in a Home Assistant event: `kodi_execute_addon_result`.
- new service: `kodi_run_method` to run a Kodi JSONRPC API method with optional parameters. Results of the Kodi API call are redirected in a Home Assistant event: `kodi_run_method_result`.
- Add descriptions in services.yaml.
- Add `timeout` parameter to yaml config (needed to make slow queries to the JSONRPC API, default timeout is set to 5s).
- Trigger events with the results of the Kodi API calls, with:
```
event_data = {
'result': api_call_results,
'result_ok': boolean,
'input': api_call_parameters,
'entity_id': 'media_player.kodi'}
```
* no need to clean OrderedDicts; no need for the `kodi_execute_addon` service
* no need for the `kodi_execute_addon` service
* unused import
* naming changes
* Add sonos alarm clock update service
* Add tests and break lines
* Fix style errors
* Make test work with python<3.6
* Fix last two pylint errors
* fix new line to long errors
* Fix Kodi specific services, add descriptions, add more handled exceptions
- Fixes issue #7528
- Add descriptions for Kodi specific services in services.yaml.
- Error handling in Kodi API errors.
- Make compatible the existent specific service `media_player.kodi_set_shuffle` with the general `media_player.shuffle_set` service (both use the same method but with different named parameter, I think the Kodi specific service should be eliminated, since it is not)
* fix line too long
* removed new services (for another PR); removed `kodi_set_shuffle` service
* requested changes
- Removed `kodi_set_shuffle` service.
- Optional `media_name` and `artist_name` parameters. `media_name` defaults to 'ALL'.
- Guard clause to check if the services are already registered.
* add support for shuffle toggling on Spotify component.
this also required adding support for shuffle on the
media_player component.
* lint
* Use ATTR_MEDIA_SHUFFLING for service handler param
* Line too long fix
* fix tests
* add shuffle set to demo mediaplayer
* rename shuffle attribute
* - changed updater to only do updated if they succed and handle calls when tv is off better by only doing 1 remote call
- show all sources instead of only connected, to fix source selection when unit is powered off
- fixed sources so they can launch apps and select sources
* fixed lint errors
* show all sources and apps if no custom options are defined in the conf
* fixed indentation for lint
* set _current_source when state is off and fixed timeout exception