{"action":"created","comment":{"url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/comments/169850009","pull_request_review_id":98442776,"id":169850009,"diff_hunk":"@@ -0,0 +1,342 @@\n+\"\"\"\r\n+Calculates the weighted average of a sensor's historical numeric values.\r\n+\r\n+For more details about this platform, please refer to the documentation at\r\n+https://home-assistant.io/components/sensor.history_average/\r\n+\"\"\"\r\n+import asyncio\r\n+from operator import attrgetter\r\n+from collections import defaultdict\r\n+import logging\r\n+import voluptuous as vol\r\n+\r\n+from homeassistant.core import callback\r\n+import homeassistant.components.history as history\r\n+from homeassistant.components.sensor import PLATFORM_SCHEMA\r\n+from homeassistant.const import (\r\n+    CONF_NAME, CONF_ENTITY_ID, CONF_UNIT_OF_MEASUREMENT,\r\n+    EVENT_HOMEASSISTANT_START)\r\n+from homeassistant.exceptions import TemplateError\r\n+import homeassistant.helpers.config_validation as cv\r\n+from homeassistant.helpers.entity import Entity\r\n+from homeassistant.helpers.event import async_track_state_change\r\n+import homeassistant.util.dt as dt_util\r\n+\r\n+_LOGGER = logging.getLogger(__name__)\r\n+\r\n+DOMAIN = 'history_average'\r\n+DEPENDENCIES = ['history']\r\n+\r\n+CONF_START = 'start'\r\n+CONF_END = 'end'\r\n+CONF_DURATION = 'duration'\r\n+CONF_PERIOD_KEYS = [CONF_START, CONF_END, CONF_DURATION]\r\n+\r\n+DEFAULT_NAME = 'unnamed average'\r\n+ICON = 'mdi:chart-line'\r\n+\r\n+ATTR_DURATION = 'duration'\r\n+\r\n+\r\n+def exactly_two_period_keys(conf):\r\n+    \"\"\"Ensure exactly 2 of CONF_PERIOD_KEYS are provided.\"\"\"\r\n+    provided = 0\r\n+\r\n+    for param in CONF_PERIOD_KEYS:\r\n+        if param in conf and conf[param] is not None:\r\n+            provided += 1\r\n+\r\n+    if provided != 2:\r\n+        raise vol.Invalid('You must provide exactly 2 of the following:'\r\n+                          ' start, end, duration')\r\n+    return conf\r\n+\r\n+\r\n+PLATFORM_SCHEMA = vol.All(PLATFORM_SCHEMA.extend({\r\n+    vol.Required(CONF_ENTITY_ID): cv.entity_id,\r\n+    vol.Optional(CONF_START, default=None): cv.template,\r\n+    vol.Optional(CONF_END, default=None): cv.template,\r\n+    vol.Optional(CONF_DURATION, default=None): cv.time_period,\r\n+    vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,\r\n+    vol.Optional(CONF_UNIT_OF_MEASUREMENT, default=''): cv.string,\r\n+}), exactly_two_period_keys)\r\n+\r\n+\r\n+@asyncio.coroutine\r\n+def async_setup_platform(hass, config, async_add_devices,\r\n+                         discovery_info=None):\r\n+    \"\"\"Set up the HistoryAverage sensor.\"\"\"\r\n+    entity_id = config.get(CONF_ENTITY_ID)\r\n+    start = config.get(CONF_START)\r\n+    end = config.get(CONF_END)\r\n+    duration = config.get(CONF_DURATION)\r\n+    name = config.get(CONF_NAME)\r\n+    unit = config.get(CONF_UNIT_OF_MEASUREMENT)\r\n+\r\n+    for template in [start, end]:\r\n+        if template is not None:\r\n+            template.hass = hass\r\n+\r\n+    async_add_devices(\r\n+        [HistoryAverageSensor(hass, entity_id, start, end, duration,\r\n+                              name, unit)])\r\n+    return True\r\n+\r\n+\r\n+class HistoryAverageSensor(Entity):\r\n+    \"\"\"HistoryAverage sensor which calculates time weighted averages.\"\"\"\r\n+\r\n+    @asyncio.coroutine\r\n+    def async_get_history(self):\r\n+        \"\"\"Pull states from recorder history.\"\"\"\r\n+        yield from self.async_update_period()\r\n+        start, _end = self._period\r\n+\r\n+        self._history = []\r\n+\r\n+        # get state changes history between start and now\r\n+        states = history.state_changes_during_period(\r\n+            self._hass, start, None, self._entity_id)\r\n+        states = states.get(self._entity_id)\r\n+        if states:\r\n+            self._history.extend(states)\r\n+\r\n+    @asyncio.coroutine\r\n+    def asysnc_trim_history(self):\r\n+        \"\"\"Remove items which are not relevent to the current period.\"\"\"\r\n+        yield from self.async_update_period()\r\n+        start, _end = self._period\r\n+        start_timestamp = dt_util.as_timestamp(start)\r\n+\r\n+        def after_start(state, timestamp):\r\n+            \"\"\"Test if the State last changed after the timestamp.\"\"\"\r\n+            return state.last_changed.timestamp() >= timestamp\r\n+\r\n+        # remove items before the current period's starting point,\r\n+        # keeping the first item before the starting period to enable\r\n+        # calculation of the state between start -> next state change\r\n+        for index, state in enumerate(self._history[:]):\r\n+            if after_start(state, start_timestamp):\r\n+                break\r\n+            else:\r\n+                # remove if the next item is also before start\r\n+                next_index = index + 1\r\n+                if (next_index < len(self._history) and\r\n+                        (not after_start(self._history[next_index],\r\n+                                         start_timestamp))):\r\n+                    del self._history[index]\r\n+\r\n+    def get_period(self):\r\n+        \"\"\"Return current period, used for testing.\"\"\"\r\n+        return self._period\r\n+\r\n+    def __init__(\r\n+            self, hass, entity_id, start, end, duration,\r\n+            name, unit):\r\n+        \"\"\"Initialize the HistoryAverage sensor.\"\"\"\r\n+        self._hass = hass\r\n+        self._entity_id = entity_id\r\n+        self._duration = duration\r\n+        self._start = start\r\n+        self._end = end\r\n+        self._name = name\r\n+        self._unit_of_measurement = unit\r\n+\r\n+        # set defaults at init\r\n+        now = dt_util.utcnow()\r\n+        self._period = (now, now)\r\n+        self._history = []\r\n+        self._state = 0\r\n+\r\n+    @asyncio.coroutine\r\n+    def async_added_to_hass(self):\r\n+        \"\"\"Initialize data and register callbacks.\"\"\"\r\n+        # load data from recorder and do initial calculation\r\n+        yield from self.async_get_history()\r\n+        yield from self.async_update()\r\n+\r\n+        @callback\r\n+        def state_listener(entity, old_state, new_state):\r\n+            \"\"\"Handle the sensor state changes.\"\"\"\r\n+            self._history.append(new_state)\r\n+            sorted(self._history, key=attrgetter('last_changed'))\r\n+            self._hass.async_add_job(self.async_update_ha_state(True))\r\n+\r\n+        @callback\r\n+        def sensor_startup(event):\r\n+            \"\"\"Update on startup.\"\"\"\r\n+            async_track_state_change(\r\n+                self._hass, self._entity_id, state_listener)\r\n+\r\n+            self._hass.async_add_job(self.async_update_ha_state(True))\r\n+\r\n+        self._hass.bus.async_listen_once(\r\n+            EVENT_HOMEASSISTANT_START, sensor_startup)\r\n+\r\n+    @property\r\n+    def name(self):\r\n+        \"\"\"Return the name of the sensor.\"\"\"\r\n+        return self._name\r\n+\r\n+    @property\r\n+    def state(self):\r\n+        \"\"\"Return the state of the sensor.\"\"\"\r\n+        return self._state\r\n+\r\n+    @property\r\n+    def unit_of_measurement(self):\r\n+        \"\"\"Return the unit the state is expressed in.\"\"\"\r\n+        return self._unit_of_measurement\r\n+\r\n+    @property\r\n+    def should_poll(self):\r\n+        \"\"\"Return the polling state.\"\"\"\r\n+        # Since the values can/do change with time, not just with\r\n+        # state changes, the sensor should poll\r\n+        return True\r\n+\r\n+    @property\r\n+    def device_state_attributes(self):\r\n+        \"\"\"Return the state attributes of the sensor.\"\"\"\r\n+        def period_in_seconds(period):\r","path":"homeassistant/components/sensor/history_average.py","position":201,"original_position":201,"commit_id":"ac800e48cccdb54571553deb3e8efd4c6877739e","original_commit_id":"62c6d31bd4fde92c571bfaebf2a999a3b785437f","user":{"login":"kmwoley","id":6120312,"avatar_url":"https://avatars0.githubusercontent.com/u/6120312?v=4","gravatar_id":"","url":"https://api.github.com/users/kmwoley","html_url":"https://github.com/kmwoley","followers_url":"https://api.github.com/users/kmwoley/followers","following_url":"https://api.github.com/users/kmwoley/following{/other_user}","gists_url":"https://api.github.com/users/kmwoley/gists{/gist_id}","starred_url":"https://api.github.com/users/kmwoley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmwoley/subscriptions","organizations_url":"https://api.github.com/users/kmwoley/orgs","repos_url":"https://api.github.com/users/kmwoley/repos","events_url":"https://api.github.com/users/kmwoley/events{/privacy}","received_events_url":"https://api.github.com/users/kmwoley/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2018-02-22T04:01:25Z","updated_at":"2018-02-22T04:01:25Z","html_url":"https://github.com/home-assistant/home-assistant/pull/10717#discussion_r169850009","pull_request_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/10717","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/comments/169850009"},"html":{"href":"https://github.com/home-assistant/home-assistant/pull/10717#discussion_r169850009"},"pull_request":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/10717"}},"in_reply_to_id":168941349},"pull_request":{"url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/10717","id":153803920,"html_url":"https://github.com/home-assistant/home-assistant/pull/10717","diff_url":"https://github.com/home-assistant/home-assistant/pull/10717.diff","patch_url":"https://github.com/home-assistant/home-assistant/pull/10717.patch","issue_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/10717","number":10717,"state":"open","locked":false,"title":"history_average sensor - time-weighted average of state values from history","user":{"login":"kmwoley","id":6120312,"avatar_url":"https://avatars0.githubusercontent.com/u/6120312?v=4","gravatar_id":"","url":"https://api.github.com/users/kmwoley","html_url":"https://github.com/kmwoley","followers_url":"https://api.github.com/users/kmwoley/followers","following_url":"https://api.github.com/users/kmwoley/following{/other_user}","gists_url":"https://api.github.com/users/kmwoley/gists{/gist_id}","starred_url":"https://api.github.com/users/kmwoley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmwoley/subscriptions","organizations_url":"https://api.github.com/users/kmwoley/orgs","repos_url":"https://api.github.com/users/kmwoley/repos","events_url":"https://api.github.com/users/kmwoley/events{/privacy}","received_events_url":"https://api.github.com/users/kmwoley/received_events","type":"User","site_admin":false},"body":"## Description:\r\nA sensor which reports the weighted average of a sensor's recorded value over a specified period of time.\r\n\r\nMotivation - `history_stats` and `statistics` didn't exactly meet the needs I had for a sensor - I wanted a sensor that could average my bathroom's humidity over the last day, so I could use it in an automation to kick on an exhaust fan when the relative humidity was a few % points above the recent average.\r\n\r\nUnlike the `statistics` sensor which samples a sensor's values to produce a mean (along with other stats), this sensor uses the history recorded in the database to calculate it's results. That allows the value to be useful across reboots, can leverage history to produce results over a much longer period of time, and doesn't rely upon picking a correct sampling interval for the data being averaged.\r\n\r\nUnlike `history_stats` sensor, this sensor doesn't look to count a specific discrete state, but averages the values of non-discrete states. Much of the inspiration, code for this sensor started with `history_stats`\r\n\r\nNote: \r\nI did look at just incorporating this into `history_stats`, but that sensor requires a `state` attribute. Incorporating this functionality into that sensor would require making that attribute optional, which didn't feel right. I'd be happy to combine this sensor with another if folks felt that was a better path.\r\n\r\n**Related issue (if applicable):** fixes #<home-assistant issue number goes here>\r\nn/a\r\n\r\n**Pull request in [home-assistant.github.io](https://github.com/home-assistant/home-assistant.github.io) with documentation (if applicable):** home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>\r\nTBD - assuming folks like this as a stand alone sensor, I'll write up the docs.\r\n\r\n## Example entry for `configuration.yaml` (if applicable):\r\n```\r\n- platform: history_average\r\n  name: Master Bathroom Average Relative Humidity\r\n  entity_id: sensor.master_bathroom_multisensor_relative_humidity\r\n  unit_of_measurement: '%'\r\n  end: '{{ as_timestamp(now()) }}'\r\n  duration:\r\n    hours: 12\r\n```\r\n\r\n## Checklist:\r\n\r\nIf user exposed functionality or configuration variables are added/changed:\r\n  - [ ] Documentation added/updated in [home-assistant.github.io](https://github.com/home-assistant/home-assistant.github.io)\r\n\r\nIf the code does not interact with devices:\r\n  - [x] Local tests with `tox` run successfully. **Your PR cannot be merged unless tests pass**\r\n  - [x] Tests have been added to verify that the new code works.\r\n\r\n[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard.py#L14\r\n[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard.py#L54\r\n","created_at":"2017-11-21T05:59:12Z","updated_at":"2018-02-22T04:01:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"32c0eda4c1ce0a55aa920fa95e13d1a9679833a6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":527871105,"url":"https://api.github.com/repos/home-assistant/home-assistant/labels/cla-signed","name":"cla-signed","color":"008000","default":false},{"id":451931292,"url":"https://api.github.com/repos/home-assistant/home-assistant/labels/core","name":"core","color":"c5def5","default":false},{"id":526146744,"url":"https://api.github.com/repos/home-assistant/home-assistant/labels/new-platform","name":"new-platform","color":"ededed","default":false},{"id":514133636,"url":"https://api.github.com/repos/home-assistant/home-assistant/labels/platform","name":"platform","color":"0e8a16","default":false},{"id":681845041,"url":"https://api.github.com/repos/home-assistant/home-assistant/labels/platform:%20sensor.history_average","name":"platform: sensor.history_average","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/10717/commits","review_comments_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/10717/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/10717/comments","statuses_url":"https://api.github.com/repos/home-assistant/home-assistant/statuses/ac800e48cccdb54571553deb3e8efd4c6877739e","head":{"label":"kmwoley:history_average","ref":"history_average","sha":"ac800e48cccdb54571553deb3e8efd4c6877739e","user":{"login":"kmwoley","id":6120312,"avatar_url":"https://avatars0.githubusercontent.com/u/6120312?v=4","gravatar_id":"","url":"https://api.github.com/users/kmwoley","html_url":"https://github.com/kmwoley","followers_url":"https://api.github.com/users/kmwoley/followers","following_url":"https://api.github.com/users/kmwoley/following{/other_user}","gists_url":"https://api.github.com/users/kmwoley/gists{/gist_id}","starred_url":"https://api.github.com/users/kmwoley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmwoley/subscriptions","organizations_url":"https://api.github.com/users/kmwoley/orgs","repos_url":"https://api.github.com/users/kmwoley/repos","events_url":"https://api.github.com/users/kmwoley/events{/privacy}","received_events_url":"https://api.github.com/users/kmwoley/received_events","type":"User","site_admin":false},"repo":{"id":96660432,"name":"home-assistant","full_name":"kmwoley/home-assistant","owner":{"login":"kmwoley","id":6120312,"avatar_url":"https://avatars0.githubusercontent.com/u/6120312?v=4","gravatar_id":"","url":"https://api.github.com/users/kmwoley","html_url":"https://github.com/kmwoley","followers_url":"https://api.github.com/users/kmwoley/followers","following_url":"https://api.github.com/users/kmwoley/following{/other_user}","gists_url":"https://api.github.com/users/kmwoley/gists{/gist_id}","starred_url":"https://api.github.com/users/kmwoley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmwoley/subscriptions","organizations_url":"https://api.github.com/users/kmwoley/orgs","repos_url":"https://api.github.com/users/kmwoley/repos","events_url":"https://api.github.com/users/kmwoley/events{/privacy}","received_events_url":"https://api.github.com/users/kmwoley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kmwoley/home-assistant","description":":house_with_garden: Open-source home automation platform running on Python 3","fork":true,"url":"https://api.github.com/repos/kmwoley/home-assistant","forks_url":"https://api.github.com/repos/kmwoley/home-assistant/forks","keys_url":"https://api.github.com/repos/kmwoley/home-assistant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kmwoley/home-assistant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kmwoley/home-assistant/teams","hooks_url":"https://api.github.com/repos/kmwoley/home-assistant/hooks","issue_events_url":"https://api.github.com/repos/kmwoley/home-assistant/issues/events{/number}","events_url":"https://api.github.com/repos/kmwoley/home-assistant/events","assignees_url":"https://api.github.com/repos/kmwoley/home-assistant/assignees{/user}","branches_url":"https://api.github.com/repos/kmwoley/home-assistant/branches{/branch}","tags_url":"https://api.github.com/repos/kmwoley/home-assistant/tags","blobs_url":"https://api.github.com/repos/kmwoley/home-assistant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kmwoley/home-assistant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kmwoley/home-assistant/git/refs{/sha}","trees_url":"https://api.github.com/repos/kmwoley/home-assistant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kmwoley/home-assistant/statuses/{sha}","languages_url":"https://api.github.com/repos/kmwoley/home-assistant/languages","stargazers_url":"https://api.github.com/repos/kmwoley/home-assistant/stargazers","contributors_url":"https://api.github.com/repos/kmwoley/home-assistant/contributors","subscribers_url":"https://api.github.com/repos/kmwoley/home-assistant/subscribers","subscription_url":"https://api.github.com/repos/kmwoley/home-assistant/subscription","commits_url":"https://api.github.com/repos/kmwoley/home-assistant/commits{/sha}","git_commits_url":"https://api.github.com/repos/kmwoley/home-assistant/git/commits{/sha}","comments_url":"https://api.github.com/repos/kmwoley/home-assistant/comments{/number}","issue_comment_url":"https://api.github.com/repos/kmwoley/home-assistant/issues/comments{/number}","contents_url":"https://api.github.com/repos/kmwoley/home-assistant/contents/{+path}","compare_url":"https://api.github.com/repos/kmwoley/home-assistant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kmwoley/home-assistant/merges","archive_url":"https://api.github.com/repos/kmwoley/home-assistant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kmwoley/home-assistant/downloads","issues_url":"https://api.github.com/repos/kmwoley/home-assistant/issues{/number}","pulls_url":"https://api.github.com/repos/kmwoley/home-assistant/pulls{/number}","milestones_url":"https://api.github.com/repos/kmwoley/home-assistant/milestones{/number}","notifications_url":"https://api.github.com/repos/kmwoley/home-assistant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kmwoley/home-assistant/labels{/name}","releases_url":"https://api.github.com/repos/kmwoley/home-assistant/releases{/id}","deployments_url":"https://api.github.com/repos/kmwoley/home-assistant/deployments","created_at":"2017-07-09T04:13:16Z","updated_at":"2017-07-09T04:13:23Z","pushed_at":"2018-02-22T03:24:23Z","git_url":"git://github.com/kmwoley/home-assistant.git","ssh_url":"git@github.com:kmwoley/home-assistant.git","clone_url":"https://github.com/kmwoley/home-assistant.git","svn_url":"https://github.com/kmwoley/home-assistant","homepage":"https://home-assistant.io","size":75718,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"home-assistant:dev","ref":"dev","sha":"c6480e46c45cc3ffa2b10bfcc74cc35c9faa162f","user":{"login":"home-assistant","id":13844975,"avatar_url":"https://avatars3.githubusercontent.com/u/13844975?v=4","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://avatars3.githubusercontent.com/u/13844975?v=4","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":"2018-02-22T03:49:31Z","pushed_at":"2018-02-22T03:45:33Z","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":78789,"stargazers_count":12684,"watchers_count":12684,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3669,"mirror_url":null,"archived":false,"open_issues_count":834,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":3669,"open_issues":834,"watchers":12684,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/10717"},"html":{"href":"https://github.com/home-assistant/home-assistant/pull/10717"},"issue":{"href":"https://api.github.com/repos/home-assistant/home-assistant/issues/10717"},"comments":{"href":"https://api.github.com/repos/home-assistant/home-assistant/issues/10717/comments"},"review_comments":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/10717/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/10717/commits"},"statuses":{"href":"https://api.github.com/repos/home-assistant/home-assistant/statuses/ac800e48cccdb54571553deb3e8efd4c6877739e"}},"author_association":"NONE"}}
{"actor":{"display_login":"kmwoley"}}