core: Apple TV State Not Updating

The problem

I’ve been using the ATV Beta custom_component for some time but after speaking to Postlund on Discord he recommended when 2020.12 is released it’s best to move over to the core ATV Integration.

The Apple TV state when not playing content should be ‘idle’. When I play movies it changes to ‘playing’ and when stopping the movie it changes back to ‘idle’. When I call the service ‘camera.play_stream’ to play my camera the state succesfully changes to ‘playing’ but when I press home on my ATV remote and the ATV goes back to the main menu then state does not change to ‘idle’. If I then try and play a movie the state remains as ‘playing’ and when I exit it remains as ‘playing’. The only way to fix it is to reboot the ATV

Environment

  • Home Assistant Core release with the issue: 2020.12.1
  • Last working Home Assistant Core release (if known): n/a
  • Operating environment (OS/Container/Supervised/Core): Supervised
  • Integration causing this issue: Apple TV
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/apple_tv/

Problem-relevant configuration.yaml

Nothing in YAML

Traceback/Error logs

Nothing in logs

Additional information

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (5 by maintainers)

Most upvoted comments

Awesome news! Thank you for your work @postlund, it’s really appreciated!

I was actually quite surprised hearing that HA 2021.1 solved the problem as it didn’t contain any bug fixes of magnitude. However, I do believe it’s fixed on master. I have some other bugs I’m working on, after that I will make a new release of pyatv and include a bump in the next HA release. Hopefully I can make a bump in the beta repo, so you can test it there. It all depends on how much time I manage to find.

@sira87 Since I don’t have any logs to look at, I can’t tell for sure. But since this appears to be a general issue now, it’s likely that it at least relates.

I believe this is the same issue I’ve been rambling about in https://github.com/postlund/pyatv/issues/905. Will start working on a fix for that.

I don’t think it’s related to tvOS version as i’m still on 14.0.2