core: Emby entities not being updated after an error

The problem

When casting JellyFin to Chromecast HomeAssistant throws an error and no longer updates states.

Reboot does not resolve the issue.

Environment

  • Home Assistant Core release with the issue: 0.113.3
  • Last working Home Assistant Core release (if known): 0.107.7
  • Operating environment (OS/Container/Supervised/Core): Ubuntu 18.04/Docker/229/
  • Integration causing this issue: Emby
  • Link to integration documentation on our website:

Problem-relevant configuration.yaml

media_player:
  - platform: emby
    host: 192.168.1.100
    api_key: ***

Traceback/Error logs

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/pyemby/server.py", line 287, in socket_connection
    self.process_msg(msg.data)
  File "/usr/local/lib/python3.8/site-packages/pyemby/server.py", line 319, in process_msg
    self.update_device_list(self._sessions)
  File "/usr/local/lib/python3.8/site-packages/pyemby/server.py", line 342, in update_device_list
    dev_name, device['NowPlayingItem']['Type'],
TypeError: 'NoneType' object is not subscriptable

Additional information

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 23 (10 by maintainers)

Most upvoted comments

I’ll look into it when I get some time. Though it might be better to throw some more weight behind https://github.com/home-assistant/core/pull/44401 instead of trying to make the the Emby integration play nice with Jellyfin servers going forward. They’re sure to diverge more over time, though I don’t know how much feature overlap/difference the two methods have right now.

Do you think it makes sense to keep the Emby integration compatible with Jellyfin, or have the two projects diverged enough that they should have separate integrations?