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

Idle state on Apple TV 4 #74

Closed
mKeRix opened this issue Mar 26, 2017 · 3 comments
Closed

Idle state on Apple TV 4 #74

mKeRix opened this issue Mar 26, 2017 · 3 comments

Comments

@mKeRix
Copy link

mKeRix commented Mar 26, 2017

Hey there,

I did some more digging regarding home-assistant/core#6293 (card flickering because image cannot be found). I saw that you utilize pyatv.const.PLAY_STATE_NO_MEDIA to tell HASS that the Apple TV is idle - however on my Apple TV 4 it actually never goes to this state. This is the state when nothing is playing (home menu):

state: paused
media_title: No title
media_duration: 0
entity_picture: /api/media_player_proxy/media_player.apple_tv?token=token&cache=cache
supported_features: 21427
media_position: 0
media_content_type: movie
media_position_updated_at: 2017-03-26T12:39:33.996764+00:00
hidden: true
friendly_name: Apple TV

This state causes HASS to think that there is artwork available (the artwork of the 'paused movie No Title'), causing the card to flicker while it tries to update and fails.

I think that this is something that can be fixed from this underlying library, however I am not quite sure where to start here. I haven't quite understood all of the inner workings of this library, so please correct me if I'm wrong!

@mKeRix mKeRix changed the title Play state idle on Apple TV 4 Idle state on Apple TV 4 Mar 26, 2017
@postlund
Copy link
Owner

Hi!

Yes, I think you are right and I have noticed similar behavior too (regarding state). The "no media" state can happen for short intervals, usually it passes by this state when starting a YouTube clip for instance. This is not a problem with pyatv per se, but a a change that should be made in Home Assistant to look at some other state.

I have some changes laying around locally that I will submit when I have some time. But I would like to finish of pairing support first and also verify button press support.

@postlund
Copy link
Owner

Hopefully fixed by home-assistant/core#7189. Will close once I get confirmation from some users.

@mKeRix
Copy link
Author

mKeRix commented Apr 24, 2017

Did the update last night - works great! Thank you so much for your work on this component again.

@mKeRix mKeRix closed this as completed Apr 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants