{"action":"created","issue":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/6877","repository_url":"https://api.github.com/repos/home-assistant/home-assistant","labels_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/6877/labels{/name}","comments_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/6877/comments","events_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/6877/events","html_url":"https://github.com/home-assistant/home-assistant/issues/6877","id":218690500,"number":6877,"title":"Plex update sessions errors","user":{"login":"Tommatheussen","id":13683094,"avatar_url":"https://avatars1.githubusercontent.com/u/13683094?v=3","gravatar_id":"","url":"https://api.github.com/users/Tommatheussen","html_url":"https://github.com/Tommatheussen","followers_url":"https://api.github.com/users/Tommatheussen/followers","following_url":"https://api.github.com/users/Tommatheussen/following{/other_user}","gists_url":"https://api.github.com/users/Tommatheussen/gists{/gist_id}","starred_url":"https://api.github.com/users/Tommatheussen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tommatheussen/subscriptions","organizations_url":"https://api.github.com/users/Tommatheussen/orgs","repos_url":"https://api.github.com/users/Tommatheussen/repos","events_url":"https://api.github.com/users/Tommatheussen/events{/privacy}","received_events_url":"https://api.github.com/users/Tommatheussen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-01T11:43:34Z","updated_at":"2017-05-25T15:01:55Z","closed_at":null,"body":"**Home Assistant release (`hass --version`):**\r\n0.41\r\n\r\n**Python release (`python3 --version`):**\r\n3.4.3\r\n\r\n**Component/platform:**\r\nMedia_player: plex\r\n\r\n**Description of problem:**\r\nI'm getting a lot of errors in my logs.\r\n\r\n**Expected:**\r\nNo errors regarding this component\r\n\r\n**Problem-relevant `configuration.yaml` entries and steps to reproduce:**\r\n```yaml\r\nmedia_player:\r\n  - platform: plex\r\n```\r\n\r\n1. Enable some devices\r\n2. Play some media\r\n\r\n**Traceback (if applicable):**\r\n```bash\r\n17-04-01 10:46:07 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.plexmediaplayer fails\r\nTraceback (most recent call last):\r\n  File \"/PlexMediaServer/hass/lib/python3.4/site-packages/homeassistant/helpers/entity.py\", line 225, in async_update_ha_state\r\n    None, self.update)\r\n  File \"/usr/lib/python3.4/asyncio/futures.py\", line 386, in __iter__\r\n    yield self  # This tells Task to wait for completion.\r\n  File \"/usr/lib/python3.4/asyncio/tasks.py\", line 287, in _wakeup\r\n    value = future.result()\r\n  File \"/usr/lib/python3.4/asyncio/futures.py\", line 275, in result\r\n    raise self._exception\r\n  File \"/usr/lib/python3.4/concurrent/futures/thread.py\", line 54, in run\r\n    result = self.fn(*self.args, **self.kwargs)\r\n  File \"/PlexMediaServer/hass/lib/python3.4/site-packages/homeassistant/components/media_player/plex.py\", line 538, in update\r\n    self.update_sessions(no_throttle=True)\r\n  File \"/PlexMediaServer/hass/lib/python3.4/site-packages/homeassistant/util/__init__.py\", line 296, in wrapper\r\n    result = method(*args, **kwargs)\r\n  File \"/PlexMediaServer/hass/lib/python3.4/site-packages/homeassistant/util/__init__.py\", line 296, in wrapper\r\n    result = method(*args, **kwargs)\r\n  File \"/PlexMediaServer/hass/lib/python3.4/site-packages/homeassistant/components/media_player/plex.py\", line 214, in update_sessions\r\n    session.player.machineIdentifier is not None):\r\nAttributeError: '_NA' object has no attribute 'machineIdentifier'\r\n```\r\n\r\n**Additional info:**\r\nThis seems to be happening for all my devices, also not at defined intervals. It just seems to happen at random. It also doesn't happen right after I start/stop watching something.\r\nFurthermore, I'm not sure if it might be related, but my [OpenPHT](https://github.com/RasPlex/OpenPHT) keeps the last watched thing actively shown, until I start something else.\r\n"},"comment":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/comments/304032882","html_url":"https://github.com/home-assistant/home-assistant/issues/6877#issuecomment-304032882","issue_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/6877","id":304032882,"user":{"login":"riemers","id":682041,"avatar_url":"https://avatars0.githubusercontent.com/u/682041?v=3","gravatar_id":"","url":"https://api.github.com/users/riemers","html_url":"https://github.com/riemers","followers_url":"https://api.github.com/users/riemers/followers","following_url":"https://api.github.com/users/riemers/following{/other_user}","gists_url":"https://api.github.com/users/riemers/gists{/gist_id}","starred_url":"https://api.github.com/users/riemers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riemers/subscriptions","organizations_url":"https://api.github.com/users/riemers/orgs","repos_url":"https://api.github.com/users/riemers/repos","events_url":"https://api.github.com/users/riemers/events{/privacy}","received_events_url":"https://api.github.com/users/riemers/received_events","type":"User","site_admin":false},"created_at":"2017-05-25T15:01:55Z","updated_at":"2017-05-25T15:01:55Z","body":"Just linking this to https://community.home-assistant.io/t/plexdevices-custom-media-player-component/11246/284 where the last watched show is also actively shown. Can't see much on the last commits to the file https://github.com/home-assistant/home-assistant/commits/dev/homeassistant/components/media_player/plex.py perhaps someone else does."}}
{"actor":{"display_login":"riemers"}}