Files
home-assistant-core/homeassistant/components
ehendrix23 deeb288daf Change source, add attributes, and improve state of DirecTV (#17536)
* Enhancements for DirecTV media player

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 error and cleaned up few items

Fixed an issue when determining if a program is recorded or not.
Cleaned up some coding.

* Attribute last position update only updated when position changed.

The attribute media_position_updated_at will only be updated if the position changed (thus media is playing for recorded or live TV).
Added assumed_state; will be set to False if in standby or when a recorded show is watched. For live TV it will be set to True.

* Added some empty lines for easier reading

Added some empty lines before returns to improve readability.

* Seperated words in constants

Seperated the words in constants.

* Fix _lastupdate to _last_update

Split words in _lastupdate to _last_update as I missed it.
2018-10-29 21:06:37 +01:00
..
2018-07-20 11:45:20 +03:00
2018-10-25 16:44:57 +02:00
2018-10-26 10:18:10 +02:00
2018-10-25 23:15:20 +03:00
2018-10-08 16:35:38 +02:00
2018-10-03 23:12:21 +02:00
2018-10-25 23:15:20 +03:00
2018-10-26 10:18:10 +02:00
2018-10-08 20:50:24 +02:00
2018-10-26 10:17:40 +02:00
2018-10-14 17:11:39 +02:00
2018-10-26 10:18:10 +02:00
2018-10-11 10:55:38 +02:00
2018-10-21 20:34:28 +02:00
2018-10-25 16:44:57 +02:00
2018-10-26 10:18:10 +02:00
2018-10-26 10:18:10 +02:00
2018-10-01 08:52:42 +02:00
2018-10-26 10:18:10 +02:00
2018-10-26 10:18:10 +02:00
2018-10-23 14:09:08 +02:00
2018-10-26 10:18:10 +02:00
2018-10-26 10:18:10 +02:00
2018-10-26 10:18:10 +02:00
2018-10-24 14:13:07 +02:00
2018-10-23 14:04:25 +02:00
2018-10-26 10:18:10 +02:00
2018-10-21 20:34:28 +02:00
2018-10-26 15:45:57 +02:00
2018-10-01 08:52:42 +02:00
2018-09-26 18:02:05 +02:00
2018-10-26 10:18:10 +02:00
2018-10-24 22:56:14 +02:00
2018-10-15 11:48:36 +02:00
2018-10-17 14:12:41 +02:00
2018-10-26 10:18:10 +02:00
2018-07-20 11:45:20 +03:00
2018-10-01 08:52:42 +02:00
2018-10-02 07:32:03 +02:00
2018-07-20 11:45:20 +03:00
2018-10-21 19:54:51 +02:00
2018-10-23 14:09:08 +02:00
2018-07-20 11:45:20 +03:00
2018-07-20 11:45:20 +03:00
2018-07-20 11:45:20 +03:00
2018-07-20 11:45:20 +03:00
2018-07-20 11:45:20 +03:00
2018-10-01 08:52:42 +02:00
2018-07-20 11:45:20 +03:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
…
2018-07-20 11:45:20 +03:00
2018-09-16 01:17:47 +02:00
2018-07-23 14:05:38 +02:00
2018-10-03 06:28:08 +02:00
2018-08-13 10:39:48 -07:00
2018-10-02 10:23:37 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-07-20 11:45:20 +03:00
2018-10-14 23:51:15 +02:00
2018-10-01 08:52:42 +02:00
2018-07-20 11:45:20 +03:00
…
2018-10-01 08:52:42 +02:00
2018-10-01 08:59:45 +02:00
2018-10-01 08:59:45 +02:00
2018-10-01 08:59:45 +02:00
2018-08-23 22:56:18 +02:00
2018-10-01 08:52:42 +02:00
2018-10-02 11:03:09 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
…
2018-10-28 23:03:27 +01:00
2018-07-20 11:45:20 +03:00
…
2018-10-02 10:23:37 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-08-16 14:21:49 +02:00
2018-07-20 11:45:20 +03:00
2018-07-20 11:45:20 +03:00
2018-10-17 23:09:05 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-09-23 09:41:45 +02:00
2018-10-01 08:52:42 +02:00
…
2018-07-20 11:45:20 +03:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-10-28 13:57:44 +01:00
2018-10-01 08:52:42 +02:00
…
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-09-27 23:13:11 +02:00
2018-10-01 08:52:42 +02:00
2018-09-18 14:59:39 +02:00
2018-10-02 11:03:09 +02:00
2018-07-20 11:45:20 +03:00
2018-10-25 23:15:20 +03:00
2018-08-21 15:49:58 +02:00
…
2018-10-01 08:52:42 +02:00
…
2018-08-27 21:56:28 +02:00
2018-10-01 08:52:42 +02:00
…
2018-10-01 08:52:42 +02:00
2018-07-20 11:45:20 +03:00
2018-10-02 11:03:09 +02:00
2018-10-01 08:52:42 +02:00
2018-10-29 15:50:44 +01:00
2018-07-20 11:45:20 +03:00
2018-07-23 14:05:38 +02:00
2018-10-07 12:33:16 +02:00
2018-07-23 10:16:05 +02:00
2018-07-20 11:45:20 +03:00
2018-10-01 08:52:42 +02:00
…
2018-10-24 18:59:52 +02:00