{"action":"created","issue":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/4487","repository_url":"https://api.github.com/repos/home-assistant/home-assistant","labels_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/4487/labels{/name}","comments_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/4487/comments","events_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/4487/events","html_url":"https://github.com/home-assistant/home-assistant/issues/4487","id":190572602,"number":4487,"title":"TP-Link broken","user":{"login":"dnuc","id":6204521,"avatar_url":"https://avatars.githubusercontent.com/u/6204521?v=3","gravatar_id":"","url":"https://api.github.com/users/dnuc","html_url":"https://github.com/dnuc","followers_url":"https://api.github.com/users/dnuc/followers","following_url":"https://api.github.com/users/dnuc/following{/other_user}","gists_url":"https://api.github.com/users/dnuc/gists{/gist_id}","starred_url":"https://api.github.com/users/dnuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnuc/subscriptions","organizations_url":"https://api.github.com/users/dnuc/orgs","repos_url":"https://api.github.com/users/dnuc/repos","events_url":"https://api.github.com/users/dnuc/events{/privacy}","received_events_url":"https://api.github.com/users/dnuc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-20T17:57:39Z","updated_at":"2016-11-21T02:41:31Z","closed_at":null,"body":"Make sure you are running the latest version of Home Assistant before reporting an issue.\r\n\r\nYou should only file an issue if you found a bug. Feature and enhancement requests should go in [the Feature Requests section](https://community.home-assistant.io/c/feature-requests) of our community forum:\r\n\r\n**Home Assistant release (`hass --version`):**\r\n0.33.0\r\n\r\n**Python release (`python3 --version`):**\r\nPython 3.4.2\r\n\r\n**Component/platform:**\r\nTPLink Switch\r\n\r\n**Description of problem:**\r\nTP-Link switches no longer work. This is comming from the log file:\r\n`16-11-20 18:47:30 homeassistant.components.switch: Error while setting up platform tplink\r\nTraceback (most recent call last):\r\n  File \"/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py\", line 150, in _async_setup_platform\r\n    entity_platform.add_entities, discovery_info\r\n  File \"/usr/lib/python3.4/asyncio/futures.py\", line 388, in __iter__\r\n    yield self  # This tells Task to wait for completion.\r\n  File \"/usr/lib/python3.4/asyncio/tasks.py\", line 286, in _wakeup\r\n    value = future.result()\r\n  File \"/usr/lib/python3.4/asyncio/futures.py\", line 277, 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 \"/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/switch/tplink.py\", line 43, in setup_platform\r\n    add_devices([SmartPlugSwitch(SmartPlug(host), name)], True)\r\n  File \"/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py\", line 299, in add_entities\r\n    entity.update()\r\n  File \"/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/switch/tplink.py\", line 101, in update\r\n    = \"%.2f kW\" % emeter_statics[int(time.strftime(\"%e\"))]\r\nKeyError: 20`\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/comments/261829400","html_url":"https://github.com/home-assistant/home-assistant/issues/4487#issuecomment-261829400","issue_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/4487","id":261829400,"user":{"login":"mweinelt","id":131599,"avatar_url":"https://avatars.githubusercontent.com/u/131599?v=3","gravatar_id":"","url":"https://api.github.com/users/mweinelt","html_url":"https://github.com/mweinelt","followers_url":"https://api.github.com/users/mweinelt/followers","following_url":"https://api.github.com/users/mweinelt/following{/other_user}","gists_url":"https://api.github.com/users/mweinelt/gists{/gist_id}","starred_url":"https://api.github.com/users/mweinelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mweinelt/subscriptions","organizations_url":"https://api.github.com/users/mweinelt/orgs","repos_url":"https://api.github.com/users/mweinelt/repos","events_url":"https://api.github.com/users/mweinelt/events{/privacy}","received_events_url":"https://api.github.com/users/mweinelt/received_events","type":"User","site_admin":false},"created_at":"2016-11-21T02:41:31Z","updated_at":"2016-11-21T02:41:31Z","body":"Same here. Taking a look now.\r\n\r\n```\r\nERROR:homeassistant.components.switch:Error while setting up platform tplink\r\nTraceback (most recent call last):\r\n  File \"/home/martin/home-assistant/env/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py\", line 150, in _async_setup_platform\r\n    entity_platform.add_entities, discovery_info\r\n  File \"/usr/lib64/python3.5/asyncio/futures.py\", line 361, in __iter__\r\n    yield self  # This tells Task to wait for completion.\r\n  File \"/usr/lib64/python3.5/asyncio/tasks.py\", line 296, in _wakeup\r\n    future.result()\r\n  File \"/usr/lib64/python3.5/asyncio/futures.py\", line 274, in result\r\n    raise self._exception\r\n  File \"/usr/lib64/python3.5/concurrent/futures/thread.py\", line 55, in run\r\n    result = self.fn(*self.args, **self.kwargs)\r\n  File \"/home/martin/home-assistant/env/lib/python3.5/site-packages/homeassistant/components/switch/tplink.py\", line 43, in setup_platform\r\n    add_devices([SmartPlugSwitch(SmartPlug(host), name)], True)\r\n  File \"/home/martin/home-assistant/env/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py\", line 299, in add_entities\r\n    entity.update()\r\n  File \"/home/martin/home-assistant/env/lib/python3.5/site-packages/homeassistant/components/switch/tplink.py\", line 101, in update\r\n    = \"%.2f kW\" % emeter_statics[int(time.strftime(\"%e\"))]\r\nKeyError: 21\r\n```"}}
{"actor":{"display_login":"mweinelt"}}