Remove pycryptodome requirement for Android TV (#22552)
* Bump androidtv to 0.0.15 * Bump androidtv to 0.0.15 in manifest.json
This commit is contained in:
parent
6351c5c6ab
commit
a747eaa3ba
3 changed files with 14 additions and 14 deletions
|
@ -3,7 +3,7 @@
|
||||||
"name": "Androidtv",
|
"name": "Androidtv",
|
||||||
"documentation": "https://www.home-assistant.io/components/androidtv",
|
"documentation": "https://www.home-assistant.io/components/androidtv",
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"androidtv==0.0.14"
|
"androidtv==0.0.15"
|
||||||
],
|
],
|
||||||
"dependencies": [],
|
"dependencies": [],
|
||||||
"codeowners": []
|
"codeowners": []
|
||||||
|
|
|
@ -18,7 +18,7 @@ import homeassistant.helpers.config_validation as cv
|
||||||
|
|
||||||
ANDROIDTV_DOMAIN = 'androidtv'
|
ANDROIDTV_DOMAIN = 'androidtv'
|
||||||
|
|
||||||
REQUIREMENTS = ['androidtv==0.0.14']
|
REQUIREMENTS = ['androidtv==0.0.15']
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -294,12 +294,12 @@ class ADBDevice(MediaPlayerDevice):
|
||||||
@adb_decorator()
|
@adb_decorator()
|
||||||
def media_previous_track(self):
|
def media_previous_track(self):
|
||||||
"""Send previous track command (results in rewind)."""
|
"""Send previous track command (results in rewind)."""
|
||||||
self.aftv.media_previous()
|
self.aftv.media_previous_track()
|
||||||
|
|
||||||
@adb_decorator()
|
@adb_decorator()
|
||||||
def media_next_track(self):
|
def media_next_track(self):
|
||||||
"""Send next track command (results in fast-forward)."""
|
"""Send next track command (results in fast-forward)."""
|
||||||
self.aftv.media_next()
|
self.aftv.media_next_track()
|
||||||
|
|
||||||
@adb_decorator()
|
@adb_decorator()
|
||||||
def adb_command(self, cmd):
|
def adb_command(self, cmd):
|
||||||
|
@ -324,11 +324,11 @@ class AndroidTVDevice(ADBDevice):
|
||||||
turn_off_command)
|
turn_off_command)
|
||||||
|
|
||||||
self._device = None
|
self._device = None
|
||||||
self._muted = None
|
|
||||||
self._device_properties = self.aftv.device_properties
|
self._device_properties = self.aftv.device_properties
|
||||||
|
self._is_volume_muted = None
|
||||||
self._unique_id = 'androidtv-{}-{}'.format(
|
self._unique_id = 'androidtv-{}-{}'.format(
|
||||||
name, self._device_properties['serialno'])
|
name, self._device_properties['serialno'])
|
||||||
self._volume = None
|
self._volume_level = None
|
||||||
|
|
||||||
@adb_decorator(override_available=True)
|
@adb_decorator(override_available=True)
|
||||||
def update(self):
|
def update(self):
|
||||||
|
@ -345,16 +345,16 @@ class AndroidTVDevice(ADBDevice):
|
||||||
if not self._available:
|
if not self._available:
|
||||||
return
|
return
|
||||||
|
|
||||||
# Get the `state`, `current_app`, and `running_apps`.
|
# Get the updated state and attributes.
|
||||||
state, self._current_app, self._device, self._muted, self._volume = \
|
state, self._current_app, self._device, self._is_volume_muted, \
|
||||||
self.aftv.update()
|
self._volume_level = self.aftv.update()
|
||||||
|
|
||||||
self._state = ANDROIDTV_STATES[state]
|
self._state = ANDROIDTV_STATES[state]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_volume_muted(self):
|
def is_volume_muted(self):
|
||||||
"""Boolean if volume is currently muted."""
|
"""Boolean if volume is currently muted."""
|
||||||
return self._muted
|
return self._is_volume_muted
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def source(self):
|
def source(self):
|
||||||
|
@ -374,7 +374,7 @@ class AndroidTVDevice(ADBDevice):
|
||||||
@property
|
@property
|
||||||
def volume_level(self):
|
def volume_level(self):
|
||||||
"""Return the volume level."""
|
"""Return the volume level."""
|
||||||
return self._volume
|
return self._volume_level
|
||||||
|
|
||||||
@adb_decorator()
|
@adb_decorator()
|
||||||
def media_stop(self):
|
def media_stop(self):
|
||||||
|
@ -389,12 +389,12 @@ class AndroidTVDevice(ADBDevice):
|
||||||
@adb_decorator()
|
@adb_decorator()
|
||||||
def volume_down(self):
|
def volume_down(self):
|
||||||
"""Send volume down command."""
|
"""Send volume down command."""
|
||||||
self.aftv.volume_down()
|
self._volume_level = self.aftv.volume_down(self._volume_level)
|
||||||
|
|
||||||
@adb_decorator()
|
@adb_decorator()
|
||||||
def volume_up(self):
|
def volume_up(self):
|
||||||
"""Send volume up command."""
|
"""Send volume up command."""
|
||||||
self.aftv.volume_up()
|
self._volume_level = self.aftv.volume_up(self._volume_level)
|
||||||
|
|
||||||
|
|
||||||
class FireTVDevice(ADBDevice):
|
class FireTVDevice(ADBDevice):
|
||||||
|
|
|
@ -158,7 +158,7 @@ alpha_vantage==2.1.0
|
||||||
amcrest==1.3.0
|
amcrest==1.3.0
|
||||||
|
|
||||||
# homeassistant.components.androidtv
|
# homeassistant.components.androidtv
|
||||||
androidtv==0.0.14
|
androidtv==0.0.15
|
||||||
|
|
||||||
# homeassistant.components.anel_pwrctrl
|
# homeassistant.components.anel_pwrctrl
|
||||||
anel_pwrctrl-homeassistant==0.0.1.dev2
|
anel_pwrctrl-homeassistant==0.0.1.dev2
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue