Skip to content

Commit

Permalink
Fix Android TV icon when screencap option is disabled (#35710)
Browse files Browse the repository at this point in the history
* Don't return a media image hash if the screencap config option is False

* 1-liner
  • Loading branch information
JeffLIrion authored May 27, 2020
1 parent ca1e643 commit 6a06d64
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions homeassistant/components/androidtv/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,11 @@ def device_state_attributes(self):
"""Provide the last ADB command's response as an attribute."""
return {"adb_response": self._adb_response}

@property
def media_image_hash(self):
"""Hash value for media image."""
return f"{datetime.now().timestamp()}" if self._screencap else None

@property
def name(self):
"""Return the device name."""
Expand Down Expand Up @@ -497,11 +502,6 @@ def get_raw_media_data(self):
"""Raw image data."""
return self.aftv.adb_screencap()

@property
def media_image_hash(self):
"""Hash value for media image."""
return f"{datetime.now().timestamp()}"

@adb_decorator()
def media_play(self):
"""Send play command."""
Expand Down

0 comments on commit 6a06d64

Please sign in to comment.