Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump androidtv to 0.0.11 #22025

Merged
merged 1 commit into from
Mar 14, 2019

Conversation

JeffLIrion
Copy link
Contributor

Description:

This fixes the volume level for the androidtv integration (for Android TV devices).

Related issue (if applicable): fixes #22019

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

If the code communicates with devices, web services, or third-party tools:

  • New dependencies have been added to the REQUIREMENTS variable ([example][ex-requir]).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.

@ghost ghost added the in progress label Mar 14, 2019
Copy link
Member

@rohankapoorcom rohankapoorcom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@rohankapoorcom rohankapoorcom merged commit 6381242 into home-assistant:dev Mar 14, 2019
@ghost ghost removed the in progress label Mar 14, 2019
@bieniu
Copy link
Member

bieniu commented Mar 15, 2019

I have a lot errors with this PR:

Fri Mar 15 2019 09:34:01 GMT+0100 (czas środkowoeuropejski standardowy)
Update for media_player.mibox fails
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 220, in async_update_ha_state
    await self.async_device_update()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 348, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/androidtv/media_player.py", line 186, in _adb_exception_catcher
    return func(self, *args, **kwargs)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/androidtv/media_player.py", line 342, in update
    self.aftv.update()
  File "/srv/homeassistant/lib/python3.7/site-packages/androidtv/androidtv.py", line 100, in update
    screen_on, awake, wake_lock_size, media_session_state, _current_app, audio_state, device, muted, volume_level = self.get_properties(lazy=True)
  File "/srv/homeassistant/lib/python3.7/site-packages/androidtv/androidtv.py", line 374, in get_properties
    if not self.max_volume_level:
AttributeError: 'AndroidTV' object has no attribute 'max_volume_level'

My configuration:

- platform: androidtv
  host: !secret androidtv_hostname
  adb_server_ip: 127.0.0.1
  name: MiBox
  apps:
    'amazon': 'Amazon Prime Video'
    'youtube': 'YouTube'
    'hbogo': 'HBO GO'
    'vimeo': 'Vimeo'
    'videostar': 'WP Pilot'

Device: Xiaomi Mi Box 3

@JeffLIrion
Copy link
Contributor Author

@bieniu please try replacing /srv/homeassistant/lib/python3.7/site-packages/androidtv/__init__.pywith https://raw.githubusercontent.com/JeffLIrion/python-androidtv/fix-setup/androidtv/__init__.py and let me know if that works.

BTW, for your apps configuration entry you need the full app IDs, not just a substring.

@MartinHjelmare
Copy link
Member

Please open an issue if you suspect a bug.

If you want to suggest an enhancement please open a feature request in the Feature Requests section of our community forum.

Merged PRs should not be used for enhancement discussion or bug reports. If you've found a bug it's ok to make a review with inline comments and link to an issue that reports the bug.

Thanks!

@home-assistant home-assistant locked as resolved and limited conversation to collaborators Mar 15, 2019
@balloob balloob added this to the 0.90.0 milestone Mar 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Volume is wrongly computed for the Android TV component
6 participants