{"action":"created","comment":{"url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/comments/85276384","pull_request_review_id":6000288,"id":85276384,"diff_hunk":"@@ -0,0 +1,271 @@\n+\"\"\"\n+Platform for the garadget cover component.\n+\n+For more details about this platform, please refer to the documentation\n+https://home-assistant.io/components/garadget/\n+\"\"\"\n+import logging\n+\n+import voluptuous as vol\n+\n+import requests\n+\n+from homeassistant.components.cover import CoverDevice, PLATFORM_SCHEMA\n+from homeassistant.helpers.event import track_utc_time_change\n+from homeassistant.const import CONF_DEVICE, CONF_USERNAME, CONF_PASSWORD,\\\n+    CONF_ACCESS_TOKEN, CONF_NAME, STATE_UNKNOWN, STATE_CLOSED, STATE_OPEN,\\\n+    CONF_COVERS, ATTR_HIDDEN\n+import homeassistant.helpers.config_validation as cv\n+\n+DEFAULT_NAME = 'Garadget'\n+\n+ATTR_SIGNAL_STRENGTH = \"wifi signal strength (dB)\"\n+ATTR_TIME_IN_STATE = \"time in state\"\n+ATTR_SENSOR_STRENGTH = \"sensor reflection rate\"\n+\n+STATE_OPENING = \"opening\"\n+STATE_CLOSING = \"closing\"\n+STATE_STOPPED = \"stopped\"\n+STATE_OFFLINE = \"offline\"\n+\n+STATES_MAP = {\n+    \"open\": STATE_OPEN,\n+    \"opening\": STATE_OPENING,\n+    \"closed\": STATE_CLOSED,\n+    \"closing\": STATE_CLOSING,\n+    \"stopped\": STATE_STOPPED\n+}\n+\n+\n+# Validation of the user's configuration\n+PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({\n+    vol.Required(CONF_DEVICE): cv.string,\n+    vol.Optional(CONF_USERNAME): cv.string,\n+    vol.Optional(CONF_PASSWORD): cv.string,\n+    vol.Optional(CONF_ACCESS_TOKEN): cv.string,\n+    vol.Optional(CONF_NAME): cv.string\n+})\n+\n+_LOGGER = logging.getLogger(__name__)\n+\n+\n+def setup_platform(hass, config, add_devices, discovery_info=None):\n+    \"\"\"Setup the Demo covers.\"\"\"\n+    covers = []\n+    covers_conf = config.get(CONF_COVERS)\n+\n+    for cover in covers_conf:\n+        args = {\n+            \"name\": cover.get(CONF_NAME),\n+            \"device_id\": cover.get(CONF_DEVICE),\n+            \"username\": cover.get(CONF_USERNAME),\n+            \"password\": cover.get(CONF_PASSWORD),\n+            \"access_token\": cover.get(CONF_ACCESS_TOKEN)\n+        }\n+\n+        covers.append(GaradgetCover(hass, args))\n+\n+    add_devices(covers)\n+\n+\n+class GaradgetCover(CoverDevice):\n+    \"\"\"Representation of a demo cover.\"\"\"\n+\n+    # pylint: disable=no-self-use, too-many-instance-attributes\n+    def __init__(self, hass, args):\n+        \"\"\"Initialize the cover.\"\"\"\n+        self.particle_url = 'https://api.particle.io'\n+        self.hass = hass\n+        self._name = args['name']\n+        self.device_id = args['device_id']\n+        self.access_token = args['access_token']\n+        self.obtained_token = False\n+        self._username = args['username']\n+        self._password = args['password']\n+        self._state = STATE_UNKNOWN\n+        self.time_in_state = None\n+        self.signal = None\n+        self.sensor = None\n+        self._unsub_listener_cover = None\n+        self._hidden = False\n+\n+        if self.access_token is None:\n+            self.access_token = self.get_token()\n+            self._obtained_token = True\n+\n+        # Lets try to get the configured name if not provided.\n+        try:\n+            if self._name is None:\n+                doorconfig = self._get_variable(\"doorConfig\")\n+                if doorconfig[\"nme\"] is not None:\n+                    self._name = doorconfig[\"nme\"]\n+            self.update()\n+        except requests.exceptions.ConnectionError as ex:\n+            _LOGGER.error('Unable to connect to server: %(reason)s',\n+                          dict(reason=ex))\n+            self._state = STATE_OFFLINE\n+            self._hidden = True\n+            self._name = DEFAULT_NAME\n+        except KeyError as ex:\n+            _LOGGER.warning('Garadget device %(device)s seems to be offline',\n+                            dict(device=self.device_id))\n+            self._name = DEFAULT_NAME\n+            self._state = STATE_OFFLINE\n+            self._hidden = True\n+\n+    def __del__(self):\n+        \"\"\"Try to remove token.\"\"\"\n+        if self._obtained_token is True:\n+            if self.access_token is not None:\n+                self.remove_token()\n+\n+    @property\n+    def name(self):\n+        \"\"\"Return the name of the cover.\"\"\"\n+        return self._name\n+\n+    @property\n+    def should_poll(self):\n+        \"\"\"No polling needed for a demo cover.\"\"\"\n+        return True\n+\n+    @property\n+    def device_state_attributes(self):\n+        \"\"\"Return the device state attributes.\"\"\"\n+        data = {}\n+\n+        if self.signal is not None:\n+            data[ATTR_SIGNAL_STRENGTH] = self.signal\n+\n+        if self.time_in_state is not None:\n+            data[ATTR_TIME_IN_STATE] = self.time_in_state\n+\n+        if self.sensor is not None:\n+            data[ATTR_SENSOR_STRENGTH] = self.sensor\n+\n+        if self._hidden is not None:\n+            data[ATTR_HIDDEN] = self._hidden\n+\n+        if self.access_token is not None:\n+            data[CONF_ACCESS_TOKEN] = self.access_token\n+\n+        return data\n+\n+    @property\n+    def is_closed(self):\n+        \"\"\"Return if the cover is closed.\"\"\"\n+        if self._state == STATE_UNKNOWN:\n+            return None\n+        else:\n+            return self._state == STATE_CLOSED\n+\n+    def get_token(self):\n+        \"\"\"Get new token for usage during this session.\"\"\"\n+        args = {\n+            'grant_type': 'password',\n+            'username': self._username,\n+            'password': self._password\n+        }\n+        url = '{}/oauth/token'.format(self.particle_url)\n+        ret = requests.post(url,\n+                            auth=('particle', 'particle'),\n+                            data=args)\n+\n+        return ret.json()['access_token']\n+\n+    def remove_token(self):\n+        \"\"\"Remove authorization token from API.\"\"\"\n+        ret = requests.delete('{}/v1/access_tokens/{}'.format(\n+            self.particle_url,\n+            self.access_token),\n+                              auth=(self._username, self._password))\n+        return ret.text\n+\n+    def _start_watcher(self, command):\n+        \"\"\"Start watcher.\"\"\"\n+        _LOGGER.debug(\"Starting Watcher for command: %s \", command)\n+        if self._unsub_listener_cover is None:\n+            self._unsub_listener_cover = track_utc_time_change(\n+                self.hass, self._check_state)\n+\n+    def _check_state(self, now):\n+        \"\"\"Check the state of the service during an operation.\"\"\"\n+        self.update()\n+        self.update_ha_state()\n+\n+    def close_cover(self):\n+        \"\"\"Close the cover.\"\"\"\n+        if self._state not in [\"close\", \"closing\"]:\n+            ret = self._put_command(\"setState\", \"close\")\n+            self._start_watcher('close')\n+            return ret.get('return_value') == 1\n+        return","path":"homeassistant/components/cover/garadget.py","position":202,"original_position":202,"commit_id":"4ef6e2f009cb887bdf9a911412234f6f2446f243","original_commit_id":"4ef6e2f009cb887bdf9a911412234f6f2446f243","user":{"login":"balloob","id":1444314,"avatar_url":"https://avatars.githubusercontent.com/u/1444314?v=3","gravatar_id":"","url":"https://api.github.com/users/balloob","html_url":"https://github.com/balloob","followers_url":"https://api.github.com/users/balloob/followers","following_url":"https://api.github.com/users/balloob/following{/other_user}","gists_url":"https://api.github.com/users/balloob/gists{/gist_id}","starred_url":"https://api.github.com/users/balloob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balloob/subscriptions","organizations_url":"https://api.github.com/users/balloob/orgs","repos_url":"https://api.github.com/users/balloob/repos","events_url":"https://api.github.com/users/balloob/events{/privacy}","received_events_url":"https://api.github.com/users/balloob/received_events","type":"User","site_admin":false},"body":"All these final returns are not needed.","created_at":"2016-10-27T07:01:22Z","updated_at":"2016-10-27T07:02:24Z","html_url":"https://github.com/home-assistant/home-assistant/pull/4031#discussion_r85276384","pull_request_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/4031","_links":{"self":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/comments/85276384"},"html":{"href":"https://github.com/home-assistant/home-assistant/pull/4031#discussion_r85276384"},"pull_request":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/4031"}}},"pull_request":{"url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/4031","id":90670507,"html_url":"https://github.com/home-assistant/home-assistant/pull/4031","diff_url":"https://github.com/home-assistant/home-assistant/pull/4031.diff","patch_url":"https://github.com/home-assistant/home-assistant/pull/4031.patch","issue_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/4031","number":4031,"state":"open","locked":false,"title":"Garadget","user":{"login":"JasonCarter80","id":667127,"avatar_url":"https://avatars.githubusercontent.com/u/667127?v=3","gravatar_id":"","url":"https://api.github.com/users/JasonCarter80","html_url":"https://github.com/JasonCarter80","followers_url":"https://api.github.com/users/JasonCarter80/followers","following_url":"https://api.github.com/users/JasonCarter80/following{/other_user}","gists_url":"https://api.github.com/users/JasonCarter80/gists{/gist_id}","starred_url":"https://api.github.com/users/JasonCarter80/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JasonCarter80/subscriptions","organizations_url":"https://api.github.com/users/JasonCarter80/orgs","repos_url":"https://api.github.com/users/JasonCarter80/repos","events_url":"https://api.github.com/users/JasonCarter80/events{/privacy}","received_events_url":"https://api.github.com/users/JasonCarter80/received_events","type":"User","site_admin":false},"body":"**Description:**\r\nAdd the Garadget Component\r\n\r\n**Pull request in [home-assistant.github.io](https://github.com/home-assistant/home-assistant.github.io) with documentation (if applicable):** Pending\r\n\r\n**Example entry for `configuration.yaml` (if applicable):**\r\n```yaml\r\ncover:\r\n  platform: garadget\r\n  covers:\r\n      - device: 190028001947343412342341\r\n        username:  UseYourLogin@garadget.com\r\n        password:  abc123\r\n        name:  Left Garage Door\r\n      - device: 4c003f001151353432134214\r\n        access_token: df4cc785ff818f2b01396c44142342fccdef\r\n```\r\n\r\n**Checklist:**\r\n\r\nIf user exposed functionality or configuration variables are added/changed:\r\n  - [X] Documentation added/updated in [home-assistant.github.io](https://github.com/home-assistant/home-assistant.github.io)\r\n\r\nIf the code communicates with devices, web services, or third-party tools:\r\n  - [X] Local tests with `tox` run successfully. **Your PR cannot be merged unless tests pass**\r\n  - [ ] New dependencies have been added to the `REQUIREMENTS` variable ([example][ex-requir]).\r\n  - [ ] New dependencies are only imported inside functions that use them ([example][ex-import]).\r\n  - [ ] New dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.\r\n  - [X] New files were added to `.coveragerc`.\r\n\r\nIf the code does not interact with devices:\r\n  - [ ] Local tests with `tox` run successfully. **Your PR cannot be merged unless tests pass**\r\n  - [ ] Tests have been added to verify that the new code works.\r\n\r\n","created_at":"2016-10-24T18:51:18Z","updated_at":"2016-10-27T07:02:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fa0cfffb027a91b1a45471b40c62f7ef189c8b2b","assignee":{"login":"balloob","id":1444314,"avatar_url":"https://avatars.githubusercontent.com/u/1444314?v=3","gravatar_id":"","url":"https://api.github.com/users/balloob","html_url":"https://github.com/balloob","followers_url":"https://api.github.com/users/balloob/followers","following_url":"https://api.github.com/users/balloob/following{/other_user}","gists_url":"https://api.github.com/users/balloob/gists{/gist_id}","starred_url":"https://api.github.com/users/balloob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balloob/subscriptions","organizations_url":"https://api.github.com/users/balloob/orgs","repos_url":"https://api.github.com/users/balloob/repos","events_url":"https://api.github.com/users/balloob/events{/privacy}","received_events_url":"https://api.github.com/users/balloob/received_events","type":"User","site_admin":false},"assignees":[{"login":"balloob","id":1444314,"avatar_url":"https://avatars.githubusercontent.com/u/1444314?v=3","gravatar_id":"","url":"https://api.github.com/users/balloob","html_url":"https://github.com/balloob","followers_url":"https://api.github.com/users/balloob/followers","following_url":"https://api.github.com/users/balloob/following{/other_user}","gists_url":"https://api.github.com/users/balloob/gists{/gist_id}","starred_url":"https://api.github.com/users/balloob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balloob/subscriptions","organizations_url":"https://api.github.com/users/balloob/orgs","repos_url":"https://api.github.com/users/balloob/repos","events_url":"https://api.github.com/users/balloob/events{/privacy}","received_events_url":"https://api.github.com/users/balloob/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/4031/commits","review_comments_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/4031/comments","review_comment_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/comments{/number}","comments_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/4031/comments","statuses_url":"https://api.github.com/repos/home-assistant/home-assistant/statuses/4ef6e2f009cb887bdf9a911412234f6f2446f243","head":{"label":"JasonCarter80:garadget","ref":"garadget","sha":"4ef6e2f009cb887bdf9a911412234f6f2446f243","user":{"login":"JasonCarter80","id":667127,"avatar_url":"https://avatars.githubusercontent.com/u/667127?v=3","gravatar_id":"","url":"https://api.github.com/users/JasonCarter80","html_url":"https://github.com/JasonCarter80","followers_url":"https://api.github.com/users/JasonCarter80/followers","following_url":"https://api.github.com/users/JasonCarter80/following{/other_user}","gists_url":"https://api.github.com/users/JasonCarter80/gists{/gist_id}","starred_url":"https://api.github.com/users/JasonCarter80/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JasonCarter80/subscriptions","organizations_url":"https://api.github.com/users/JasonCarter80/orgs","repos_url":"https://api.github.com/users/JasonCarter80/repos","events_url":"https://api.github.com/users/JasonCarter80/events{/privacy}","received_events_url":"https://api.github.com/users/JasonCarter80/received_events","type":"User","site_admin":false},"repo":{"id":70719190,"name":"home-assistant","full_name":"JasonCarter80/home-assistant","owner":{"login":"JasonCarter80","id":667127,"avatar_url":"https://avatars.githubusercontent.com/u/667127?v=3","gravatar_id":"","url":"https://api.github.com/users/JasonCarter80","html_url":"https://github.com/JasonCarter80","followers_url":"https://api.github.com/users/JasonCarter80/followers","following_url":"https://api.github.com/users/JasonCarter80/following{/other_user}","gists_url":"https://api.github.com/users/JasonCarter80/gists{/gist_id}","starred_url":"https://api.github.com/users/JasonCarter80/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JasonCarter80/subscriptions","organizations_url":"https://api.github.com/users/JasonCarter80/orgs","repos_url":"https://api.github.com/users/JasonCarter80/repos","events_url":"https://api.github.com/users/JasonCarter80/events{/privacy}","received_events_url":"https://api.github.com/users/JasonCarter80/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JasonCarter80/home-assistant","description":":house_with_garden: Open-source home automation platform running on Python 3","fork":true,"url":"https://api.github.com/repos/JasonCarter80/home-assistant","forks_url":"https://api.github.com/repos/JasonCarter80/home-assistant/forks","keys_url":"https://api.github.com/repos/JasonCarter80/home-assistant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JasonCarter80/home-assistant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JasonCarter80/home-assistant/teams","hooks_url":"https://api.github.com/repos/JasonCarter80/home-assistant/hooks","issue_events_url":"https://api.github.com/repos/JasonCarter80/home-assistant/issues/events{/number}","events_url":"https://api.github.com/repos/JasonCarter80/home-assistant/events","assignees_url":"https://api.github.com/repos/JasonCarter80/home-assistant/assignees{/user}","branches_url":"https://api.github.com/repos/JasonCarter80/home-assistant/branches{/branch}","tags_url":"https://api.github.com/repos/JasonCarter80/home-assistant/tags","blobs_url":"https://api.github.com/repos/JasonCarter80/home-assistant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JasonCarter80/home-assistant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JasonCarter80/home-assistant/git/refs{/sha}","trees_url":"https://api.github.com/repos/JasonCarter80/home-assistant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JasonCarter80/home-assistant/statuses/{sha}","languages_url":"https://api.github.com/repos/JasonCarter80/home-assistant/languages","stargazers_url":"https://api.github.com/repos/JasonCarter80/home-assistant/stargazers","contributors_url":"https://api.github.com/repos/JasonCarter80/home-assistant/contributors","subscribers_url":"https://api.github.com/repos/JasonCarter80/home-assistant/subscribers","subscription_url":"https://api.github.com/repos/JasonCarter80/home-assistant/subscription","commits_url":"https://api.github.com/repos/JasonCarter80/home-assistant/commits{/sha}","git_commits_url":"https://api.github.com/repos/JasonCarter80/home-assistant/git/commits{/sha}","comments_url":"https://api.github.com/repos/JasonCarter80/home-assistant/comments{/number}","issue_comment_url":"https://api.github.com/repos/JasonCarter80/home-assistant/issues/comments{/number}","contents_url":"https://api.github.com/repos/JasonCarter80/home-assistant/contents/{+path}","compare_url":"https://api.github.com/repos/JasonCarter80/home-assistant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JasonCarter80/home-assistant/merges","archive_url":"https://api.github.com/repos/JasonCarter80/home-assistant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JasonCarter80/home-assistant/downloads","issues_url":"https://api.github.com/repos/JasonCarter80/home-assistant/issues{/number}","pulls_url":"https://api.github.com/repos/JasonCarter80/home-assistant/pulls{/number}","milestones_url":"https://api.github.com/repos/JasonCarter80/home-assistant/milestones{/number}","notifications_url":"https://api.github.com/repos/JasonCarter80/home-assistant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JasonCarter80/home-assistant/labels{/name}","releases_url":"https://api.github.com/repos/JasonCarter80/home-assistant/releases{/id}","deployments_url":"https://api.github.com/repos/JasonCarter80/home-assistant/deployments","created_at":"2016-10-12T16:29:24Z","updated_at":"2016-10-12T16:29:28Z","pushed_at":"2016-10-26T10:46:14Z","git_url":"git://github.com/JasonCarter80/home-assistant.git","ssh_url":"git@github.com:JasonCarter80/home-assistant.git","clone_url":"https://github.com/JasonCarter80/home-assistant.git","svn_url":"https://github.com/JasonCarter80/home-assistant","homepage":"https://home-assistant.io","size":42316,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"home-assistant:dev","ref":"dev","sha":"4833e992fb931d236d98dd90e40480e83c50bd92","user":{"login":"home-assistant","id":13844975,"avatar_url":"https://avatars.githubusercontent.com/u/13844975?v=3","gravatar_id":"","url":"https://api.github.com/users/home-assistant","html_url":"https://github.com/home-assistant","followers_url":"https://api.github.com/users/home-assistant/followers","following_url":"https://api.github.com/users/home-assistant/following{/other_user}","gists_url":"https://api.github.com/users/home-assistant/gists{/gist_id}","starred_url":"https://api.github.com/users/home-assistant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/home-assistant/subscriptions","organizations_url":"https://api.github.com/users/home-assistant/orgs","repos_url":"https://api.github.com/users/home-assistant/repos","events_url":"https://api.github.com/users/home-assistant/events{/privacy}","received_events_url":"https://api.github.com/users/home-assistant/received_events","type":"Organization","site_admin":false},"repo":{"id":12888993,"name":"home-assistant","full_name":"home-assistant/home-assistant","owner":{"login":"home-assistant","id":13844975,"avatar_url":"https://avatars.githubusercontent.com/u/13844975?v=3","gravatar_id":"","url":"https://api.github.com/users/home-assistant","html_url":"https://github.com/home-assistant","followers_url":"https://api.github.com/users/home-assistant/followers","following_url":"https://api.github.com/users/home-assistant/following{/other_user}","gists_url":"https://api.github.com/users/home-assistant/gists{/gist_id}","starred_url":"https://api.github.com/users/home-assistant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/home-assistant/subscriptions","organizations_url":"https://api.github.com/users/home-assistant/orgs","repos_url":"https://api.github.com/users/home-assistant/repos","events_url":"https://api.github.com/users/home-assistant/events{/privacy}","received_events_url":"https://api.github.com/users/home-assistant/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/home-assistant/home-assistant","description":":house_with_garden: Open-source home automation platform running on Python 3","fork":false,"url":"https://api.github.com/repos/home-assistant/home-assistant","forks_url":"https://api.github.com/repos/home-assistant/home-assistant/forks","keys_url":"https://api.github.com/repos/home-assistant/home-assistant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/home-assistant/home-assistant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/home-assistant/home-assistant/teams","hooks_url":"https://api.github.com/repos/home-assistant/home-assistant/hooks","issue_events_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/events{/number}","events_url":"https://api.github.com/repos/home-assistant/home-assistant/events","assignees_url":"https://api.github.com/repos/home-assistant/home-assistant/assignees{/user}","branches_url":"https://api.github.com/repos/home-assistant/home-assistant/branches{/branch}","tags_url":"https://api.github.com/repos/home-assistant/home-assistant/tags","blobs_url":"https://api.github.com/repos/home-assistant/home-assistant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/home-assistant/home-assistant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/home-assistant/home-assistant/git/refs{/sha}","trees_url":"https://api.github.com/repos/home-assistant/home-assistant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/home-assistant/home-assistant/statuses/{sha}","languages_url":"https://api.github.com/repos/home-assistant/home-assistant/languages","stargazers_url":"https://api.github.com/repos/home-assistant/home-assistant/stargazers","contributors_url":"https://api.github.com/repos/home-assistant/home-assistant/contributors","subscribers_url":"https://api.github.com/repos/home-assistant/home-assistant/subscribers","subscription_url":"https://api.github.com/repos/home-assistant/home-assistant/subscription","commits_url":"https://api.github.com/repos/home-assistant/home-assistant/commits{/sha}","git_commits_url":"https://api.github.com/repos/home-assistant/home-assistant/git/commits{/sha}","comments_url":"https://api.github.com/repos/home-assistant/home-assistant/comments{/number}","issue_comment_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/comments{/number}","contents_url":"https://api.github.com/repos/home-assistant/home-assistant/contents/{+path}","compare_url":"https://api.github.com/repos/home-assistant/home-assistant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/home-assistant/home-assistant/merges","archive_url":"https://api.github.com/repos/home-assistant/home-assistant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/home-assistant/home-assistant/downloads","issues_url":"https://api.github.com/repos/home-assistant/home-assistant/issues{/number}","pulls_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls{/number}","milestones_url":"https://api.github.com/repos/home-assistant/home-assistant/milestones{/number}","notifications_url":"https://api.github.com/repos/home-assistant/home-assistant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/home-assistant/home-assistant/labels{/name}","releases_url":"https://api.github.com/repos/home-assistant/home-assistant/releases{/id}","deployments_url":"https://api.github.com/repos/home-assistant/home-assistant/deployments","created_at":"2013-09-17T07:29:48Z","updated_at":"2016-10-27T00:19:29Z","pushed_at":"2016-10-27T06:56:52Z","git_url":"git://github.com/home-assistant/home-assistant.git","ssh_url":"git@github.com:home-assistant/home-assistant.git","clone_url":"https://github.com/home-assistant/home-assistant.git","svn_url":"https://github.com/home-assistant/home-assistant","homepage":"https://home-assistant.io","size":84091,"stargazers_count":4418,"watchers_count":4418,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1145,"mirror_url":null,"open_issues_count":312,"forks":1145,"open_issues":312,"watchers":4418,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/4031"},"html":{"href":"https://github.com/home-assistant/home-assistant/pull/4031"},"issue":{"href":"https://api.github.com/repos/home-assistant/home-assistant/issues/4031"},"comments":{"href":"https://api.github.com/repos/home-assistant/home-assistant/issues/4031/comments"},"review_comments":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/4031/comments"},"review_comment":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/4031/commits"},"statuses":{"href":"https://api.github.com/repos/home-assistant/home-assistant/statuses/4ef6e2f009cb887bdf9a911412234f6f2446f243"}}}}
{"actor":{"display_login":"balloob"}}