{"action":"created","comment":{"url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/pulls/comments/101328464","pull_request_review_id":22053580,"id":101328464,"diff_hunk":"@@ -0,0 +1,104 @@\n+<link rel='import' href='../../bower_components/polymer/polymer.html'>\n+<link rel=\"import\" href=\"../../bower_components/iron-flex-layout/iron-flex-layout-classes.html\">\n+<link rel=\"import\" href=\"../../bower_components/paper-icon-button/paper-icon-button.html\">\n+\n+\n+<dom-module id=\"ha-climate-control\">\n+  <template>\n+    <style is=\"custom-style\" include=\"iron-flex iron-flex-alignment\"></style>\n+    <style>\n+      :host {\n+        display: flex;\n+      }\n+      /* local DOM styles go here */\n+      .container-ha-climate-control {\n+        width: 100%;\n+        @apply(--layout-flex);\n+        @apply(--layout-horizontal);\n+        @apply(--layout-justified);\n+      }\n+      iron-icon {\n+        fill: var(--ha-climate-control-color, rgba(0,0,0,0));\n+        stroke: var(--ha-climate-control-outline-color, currentcolor);\n+      }\n+      .target-temperature {\n+        @apply(--layout-self-center);\n+        font-size: 200%;\n+      }\n+      .control-buttons {\n+        font-size: 200%;\n+        text-align: right;\n+      }\n+      :host([pressed]) iron-icon {\n+        fill: var(--ha-climate-control-pressed-color, currentcolor);\n+      }\n+\n+      paper-icon-button {\n+        height: 48px;\n+        width: 48px;\n+      }\n+    </style>\n+\n+    <!-- local DOM goes here -->\n+    <div class=\"container-ha-climate-control\">\n+      <div class=\"target-temperature\">\n+        [[value]] [[units]]\n+      </div>\n+      <div class=\"control-buttons\">\n+        <div>\n+          <paper-icon-button icon=\"mdi:chevron-up\" on-tap=\"incrementValue\"></paper-icon-button>\n+        </div>\n+        <div>\n+          <paper-icon-button icon=\"mdi:chevron-down\" on-tap=\"decrementValue\"></paper-icon-button>\n+        </div>\n+      </div>\n+    </div>\n+  </template>\n+  <script>\n+    Polymer({\n+      is: 'ha-climate-control',\n+      properties: {\n+        value: {\n+          type: Number,\n+          notify: true,\n+          reflectToAttribute: true,\n+          observer: 'valueChanged'\n+        },\n+        units: {\n+          type: String,\n+          reflectToAttribute: true,\n+        },\n+        min: {\n+          type: Number,\n+          reflectToAttribute: true,\n+        },\n+        max: {\n+          type: Number,\n+          reflectToAttribute: true,\n+        },\n+        step: {\n+          type: Number,\n+          value: 1,\n+          reflectToAttribute: true,\n+        },\n+      },\n+      incrementValue: function () {\n+        var newval = this.value + this.step;\n+        if (newval <= this.max) {\n+          this.value = newval;\n+        }\n+      },\n+      decrementValue: function () {\n+        var newval = this.value - this.step;\n+        if (newval >= this.min) {\n+          this.value = newval;\n+        }\n+      },\n+      valueChanged: function () {","path":"src/components/ha-climate-control.html","position":97,"original_position":97,"commit_id":"8cac18e515dd193f6d8d4ac0fc5280625dc94296","original_commit_id":"8cac18e515dd193f6d8d4ac0fc5280625dc94296","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":"Since you set `notify: true`, you won't need to also add a change event.","created_at":"2017-02-15T17:05:21Z","updated_at":"2017-02-15T17:05:22Z","html_url":"https://github.com/home-assistant/home-assistant-polymer/pull/212#discussion_r101328464","pull_request_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/pulls/212","_links":{"self":{"href":"https://api.github.com/repos/home-assistant/home-assistant-polymer/pulls/comments/101328464"},"html":{"href":"https://github.com/home-assistant/home-assistant-polymer/pull/212#discussion_r101328464"},"pull_request":{"href":"https://api.github.com/repos/home-assistant/home-assistant-polymer/pulls/212"}}},"pull_request":{"url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/pulls/212","id":106302597,"html_url":"https://github.com/home-assistant/home-assistant-polymer/pull/212","diff_url":"https://github.com/home-assistant/home-assistant-polymer/pull/212.diff","patch_url":"https://github.com/home-assistant/home-assistant-polymer/pull/212.patch","issue_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/issues/212","number":212,"state":"open","locked":false,"title":"ha-climate-control polymer widget","user":{"login":"sdague","id":14367,"avatar_url":"https://avatars.githubusercontent.com/u/14367?v=3","gravatar_id":"","url":"https://api.github.com/users/sdague","html_url":"https://github.com/sdague","followers_url":"https://api.github.com/users/sdague/followers","following_url":"https://api.github.com/users/sdague/following{/other_user}","gists_url":"https://api.github.com/users/sdague/gists{/gist_id}","starred_url":"https://api.github.com/users/sdague/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdague/subscriptions","organizations_url":"https://api.github.com/users/sdague/orgs","repos_url":"https://api.github.com/users/sdague/repos","events_url":"https://api.github.com/users/sdague/events{/privacy}","received_events_url":"https://api.github.com/users/sdague/received_events","type":"User","site_admin":false},"body":"This replaces the climate paper-slider with a new control which is a\r\nnumerical display plus up/down buttons. The paper-slider control\r\nreally needs a fine pointer like a mouse or a stylus to function well,\r\nand in my use case the most often time I want to quick manually adjust\r\nthe temperature is on a mobile device, where using the paper-slider is\r\nextremely problematic.\r\n\r\nThe stepsize is now computed based on the units. 0.5 for C, 1.0 for F,\r\nwhich provides about the same granularity for both.\r\n\r\nThe ha-climate-control widget is actually pretty generic, and could be\r\nused in other places if anyone has suggestions on a good generic name.","created_at":"2017-02-15T12:41:52Z","updated_at":"2017-02-15T17:05:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b6a98ed86f5d3079f294e8e163b80f3105957f4d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/pulls/212/commits","review_comments_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/pulls/212/comments","review_comment_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/issues/212/comments","statuses_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/statuses/8cac18e515dd193f6d8d4ac0fc5280625dc94296","head":{"label":"sdague:climate","ref":"climate","sha":"8cac18e515dd193f6d8d4ac0fc5280625dc94296","user":{"login":"sdague","id":14367,"avatar_url":"https://avatars.githubusercontent.com/u/14367?v=3","gravatar_id":"","url":"https://api.github.com/users/sdague","html_url":"https://github.com/sdague","followers_url":"https://api.github.com/users/sdague/followers","following_url":"https://api.github.com/users/sdague/following{/other_user}","gists_url":"https://api.github.com/users/sdague/gists{/gist_id}","starred_url":"https://api.github.com/users/sdague/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdague/subscriptions","organizations_url":"https://api.github.com/users/sdague/orgs","repos_url":"https://api.github.com/users/sdague/repos","events_url":"https://api.github.com/users/sdague/events{/privacy}","received_events_url":"https://api.github.com/users/sdague/received_events","type":"User","site_admin":false},"repo":{"id":50216631,"name":"home-assistant-polymer","full_name":"sdague/home-assistant-polymer","owner":{"login":"sdague","id":14367,"avatar_url":"https://avatars.githubusercontent.com/u/14367?v=3","gravatar_id":"","url":"https://api.github.com/users/sdague","html_url":"https://github.com/sdague","followers_url":"https://api.github.com/users/sdague/followers","following_url":"https://api.github.com/users/sdague/following{/other_user}","gists_url":"https://api.github.com/users/sdague/gists{/gist_id}","starred_url":"https://api.github.com/users/sdague/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdague/subscriptions","organizations_url":"https://api.github.com/users/sdague/orgs","repos_url":"https://api.github.com/users/sdague/repos","events_url":"https://api.github.com/users/sdague/events{/privacy}","received_events_url":"https://api.github.com/users/sdague/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sdague/home-assistant-polymer","description":"Polymer frontend for Home Assistant","fork":true,"url":"https://api.github.com/repos/sdague/home-assistant-polymer","forks_url":"https://api.github.com/repos/sdague/home-assistant-polymer/forks","keys_url":"https://api.github.com/repos/sdague/home-assistant-polymer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sdague/home-assistant-polymer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sdague/home-assistant-polymer/teams","hooks_url":"https://api.github.com/repos/sdague/home-assistant-polymer/hooks","issue_events_url":"https://api.github.com/repos/sdague/home-assistant-polymer/issues/events{/number}","events_url":"https://api.github.com/repos/sdague/home-assistant-polymer/events","assignees_url":"https://api.github.com/repos/sdague/home-assistant-polymer/assignees{/user}","branches_url":"https://api.github.com/repos/sdague/home-assistant-polymer/branches{/branch}","tags_url":"https://api.github.com/repos/sdague/home-assistant-polymer/tags","blobs_url":"https://api.github.com/repos/sdague/home-assistant-polymer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sdague/home-assistant-polymer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sdague/home-assistant-polymer/git/refs{/sha}","trees_url":"https://api.github.com/repos/sdague/home-assistant-polymer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sdague/home-assistant-polymer/statuses/{sha}","languages_url":"https://api.github.com/repos/sdague/home-assistant-polymer/languages","stargazers_url":"https://api.github.com/repos/sdague/home-assistant-polymer/stargazers","contributors_url":"https://api.github.com/repos/sdague/home-assistant-polymer/contributors","subscribers_url":"https://api.github.com/repos/sdague/home-assistant-polymer/subscribers","subscription_url":"https://api.github.com/repos/sdague/home-assistant-polymer/subscription","commits_url":"https://api.github.com/repos/sdague/home-assistant-polymer/commits{/sha}","git_commits_url":"https://api.github.com/repos/sdague/home-assistant-polymer/git/commits{/sha}","comments_url":"https://api.github.com/repos/sdague/home-assistant-polymer/comments{/number}","issue_comment_url":"https://api.github.com/repos/sdague/home-assistant-polymer/issues/comments{/number}","contents_url":"https://api.github.com/repos/sdague/home-assistant-polymer/contents/{+path}","compare_url":"https://api.github.com/repos/sdague/home-assistant-polymer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sdague/home-assistant-polymer/merges","archive_url":"https://api.github.com/repos/sdague/home-assistant-polymer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sdague/home-assistant-polymer/downloads","issues_url":"https://api.github.com/repos/sdague/home-assistant-polymer/issues{/number}","pulls_url":"https://api.github.com/repos/sdague/home-assistant-polymer/pulls{/number}","milestones_url":"https://api.github.com/repos/sdague/home-assistant-polymer/milestones{/number}","notifications_url":"https://api.github.com/repos/sdague/home-assistant-polymer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sdague/home-assistant-polymer/labels{/name}","releases_url":"https://api.github.com/repos/sdague/home-assistant-polymer/releases{/id}","deployments_url":"https://api.github.com/repos/sdague/home-assistant-polymer/deployments","created_at":"2016-01-23T00:47:08Z","updated_at":"2017-02-10T12:29:31Z","pushed_at":"2017-02-15T13:32:06Z","git_url":"git://github.com/sdague/home-assistant-polymer.git","ssh_url":"git@github.com:sdague/home-assistant-polymer.git","clone_url":"https://github.com/sdague/home-assistant-polymer.git","svn_url":"https://github.com/sdague/home-assistant-polymer","homepage":"https://home-assistant.io","size":1669,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"home-assistant:master","ref":"master","sha":"f396c9acde1b728a048583dea7c0d6ed90cbb689","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":38982731,"name":"home-assistant-polymer","full_name":"home-assistant/home-assistant-polymer","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-polymer","description":":lollipop: Polymer frontend for Home Assistant","fork":false,"url":"https://api.github.com/repos/home-assistant/home-assistant-polymer","forks_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/forks","keys_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/teams","hooks_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/hooks","issue_events_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/issues/events{/number}","events_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/events","assignees_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/assignees{/user}","branches_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/branches{/branch}","tags_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/tags","blobs_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/git/refs{/sha}","trees_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/statuses/{sha}","languages_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/languages","stargazers_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/stargazers","contributors_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/contributors","subscribers_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/subscribers","subscription_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/subscription","commits_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/commits{/sha}","git_commits_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/git/commits{/sha}","comments_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/comments{/number}","issue_comment_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/issues/comments{/number}","contents_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/contents/{+path}","compare_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/merges","archive_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/downloads","issues_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/issues{/number}","pulls_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/pulls{/number}","milestones_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/milestones{/number}","notifications_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/labels{/name}","releases_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/releases{/id}","deployments_url":"https://api.github.com/repos/home-assistant/home-assistant-polymer/deployments","created_at":"2015-07-12T23:58:06Z","updated_at":"2017-02-09T11:28:10Z","pushed_at":"2017-02-15T13:32:07Z","git_url":"git://github.com/home-assistant/home-assistant-polymer.git","ssh_url":"git@github.com:home-assistant/home-assistant-polymer.git","clone_url":"https://github.com/home-assistant/home-assistant-polymer.git","svn_url":"https://github.com/home-assistant/home-assistant-polymer","homepage":"https://home-assistant.io","size":1676,"stargazers_count":108,"watchers_count":108,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":106,"mirror_url":null,"open_issues_count":10,"forks":106,"open_issues":10,"watchers":108,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/home-assistant/home-assistant-polymer/pulls/212"},"html":{"href":"https://github.com/home-assistant/home-assistant-polymer/pull/212"},"issue":{"href":"https://api.github.com/repos/home-assistant/home-assistant-polymer/issues/212"},"comments":{"href":"https://api.github.com/repos/home-assistant/home-assistant-polymer/issues/212/comments"},"review_comments":{"href":"https://api.github.com/repos/home-assistant/home-assistant-polymer/pulls/212/comments"},"review_comment":{"href":"https://api.github.com/repos/home-assistant/home-assistant-polymer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/home-assistant/home-assistant-polymer/pulls/212/commits"},"statuses":{"href":"https://api.github.com/repos/home-assistant/home-assistant-polymer/statuses/8cac18e515dd193f6d8d4ac0fc5280625dc94296"}}}}
{"actor":{"display_login":"balloob"}}