WIP : Add available property#18168
Merged
balloob merged 11 commits intohome-assistant:devfrom Nov 5, 2018
ehendrix23:Add-available-property
Merged
WIP : Add available property#18168balloob merged 11 commits intohome-assistant:devfrom ehendrix23:Add-available-property
balloob merged 11 commits intohome-assistant:devfrom
ehendrix23:Add-available-property
Conversation
Following enhancements have been made:
1. Added debug logging
2. Added ability to change channel using select_source service of the remote platform.
3. State will now show paused if a recorded program is paused, for live TV playing will always be returned.
4. Added the following attributes:
a. media_position: current position of the media (in seconds)
b. media_position_updated_at: timestamp when media_position was updated.
c. source: current source (channel).
d. media_isbeingrecorded: if current media is being recorded or not.
e. media_rating: TV/Movie rating of the media
f. media_recorded: if current media is recorded or live TV
g. media_starttime: Timestamp media was aired
Reordered properties to follow same order as how they are in __init__.py of remote platform.
Fixed an issue when determining if a program is recorded or not. Cleaned up some coding.
If a DTV device was configured before, then discovery would add this device again seperately if the name specified in the configuration is different from the name on the DTV. This issue is fixed now. Part of the fix also ensure to allow multiple "primary" devices on the network to be discovered. Further also added debug logging to the setup_platform.
Some additional improvements related to handling the DATA_DIRECTV in hass.data.
Fixed flake8 issue
Added available property
Replaced doing the request for getLocations with the get_locations() API from DirectPy instead.
Fix for checking if device is available and small update to debug log message.
Fixed lint issue with unused variable by adding ingore for it as this is for a enumerate
Updated tr/except having the except by the statement we're doing except on. Removed available, will be a different PR.
Add the available property to the entiry.
balloob
approved these changes
Nov 5, 2018
Member
|
This was WIP and based on another PR that is not merged. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Fixes issue where duplicate entities (devices) are created based on discovery when those devices have also been configured as a platform in the configuration.yaml file but with a different name.
Add the available property.
Checklist:
tox. Your PR cannot be merged unless tests pass