{"action":"created","comment":{"url":"https://api.github.com/repos/balloob/home-assistant/pulls/comments/54338835","id":54338835,"diff_hunk":"@@ -0,0 +1,123 @@\n+# -*- coding: utf-8 -*-\n+# @Author: Robert D. Cotey II <coteyr@coteyr.net>\n+# @Date:   2016-02-24 17:52:01\n+# @Last Modified by:   Robert D. Cotey II <coteyr@coteyr.net>\n+# @Last Modified time: 2016-02-26 22:28:05\n+\"\"\"\n+ZWave Thermostat.\n+\n+\"\"\"\n+DOMAIN = 'thermostat'\n+\n+CONF_NAME = 'name'\n+DEFAULT_NAME = 'ZWave Thermostat'\n+\n+from homeassistant.components.thermostat import DOMAIN\n+from homeassistant.components.thermostat import ThermostatDevice\n+from homeassistant.const import TEMP_CELCIUS, TEMP_FAHRENHEIT\n+from homeassistant.components.zwave import (\n+    ATTR_NODE_ID, ATTR_VALUE_ID, COMMAND_CLASS_ALARM, COMMAND_CLASS_METER,\n+    COMMAND_CLASS_SENSOR_MULTILEVEL, NETWORK, COMMAND_CLASS_THERMOSTAT_MODE,\n+    TYPE_DECIMAL, ZWaveDeviceEntity)\n+from homeassistant.helpers.entity import Entity\n+\n+\n+\n+def setup_platform(hass, config, add_devices, discovery_info=None):\n+    \"\"\"Setup the ZWave thermostats.\"\"\"\n+    if discovery_info is None or NETWORK is None:\n+      return\n+\n+    node = NETWORK.nodes[discovery_info[ATTR_NODE_ID]]\n+    value = node.values[discovery_info[ATTR_VALUE_ID]]\n+    value.set_change_verified(False)\n+   # if value.command_class == COMMAND_CLASS_THERMOSTAT_MODE:\n+    add_devices([ZWaveThermostat(value)])\n+\n+\n+# pylint: disable=too-many-arguments\n+class ZWaveThermostat(ZWaveDeviceEntity, ThermostatDevice, Entity):\n+    \"\"\"Represents a HeatControl thermostat.\"\"\"\n+    def __init__(self, value):\n+        from openzwave.network import ZWaveNetwork\n+        from pydispatch import dispatcher\n+        # ZWaveDeviceEntity.__init__(self, value, DOMAIN)\n+        ZWaveDeviceEntity.__init__(self, value, DOMAIN)\n+        self._current_temperature = 0\n+        self._target_temperature = 71\n+        self._unit_of_measurement = TEMP_FAHRENHEIT","path":"homeassistant/components/thermostat/zwave.py","position":48,"original_position":48,"commit_id":"3562d14e746423ed36630b2163f21de0859d22c4","original_commit_id":"3562d14e746423ed36630b2163f21de0859d22c4","user":{"login":"coteyr","id":73411,"avatar_url":"https://avatars.githubusercontent.com/u/73411?v=3","gravatar_id":"","url":"https://api.github.com/users/coteyr","html_url":"https://github.com/coteyr","followers_url":"https://api.github.com/users/coteyr/followers","following_url":"https://api.github.com/users/coteyr/following{/other_user}","gists_url":"https://api.github.com/users/coteyr/gists{/gist_id}","starred_url":"https://api.github.com/users/coteyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coteyr/subscriptions","organizations_url":"https://api.github.com/users/coteyr/orgs","repos_url":"https://api.github.com/users/coteyr/repos","events_url":"https://api.github.com/users/coteyr/events{/privacy}","received_events_url":"https://api.github.com/users/coteyr/received_events","type":"User","site_admin":false},"body":"So far I have not found a way to read it from the device. I thought about making it a setting, but I don't know how you would pass that from the config yaml as you don't actually setup any of these devices.","created_at":"2016-02-27T20:12:04Z","updated_at":"2016-02-27T20:12:04Z","html_url":"https://github.com/balloob/home-assistant/pull/1416#discussion_r54338835","pull_request_url":"https://api.github.com/repos/balloob/home-assistant/pulls/1416","_links":{"self":{"href":"https://api.github.com/repos/balloob/home-assistant/pulls/comments/54338835"},"html":{"href":"https://github.com/balloob/home-assistant/pull/1416#discussion_r54338835"},"pull_request":{"href":"https://api.github.com/repos/balloob/home-assistant/pulls/1416"}}},"pull_request":{"url":"https://api.github.com/repos/balloob/home-assistant/pulls/1416","id":60934469,"html_url":"https://github.com/balloob/home-assistant/pull/1416","diff_url":"https://github.com/balloob/home-assistant/pull/1416.diff","patch_url":"https://github.com/balloob/home-assistant/pull/1416.patch","issue_url":"https://api.github.com/repos/balloob/home-assistant/issues/1416","number":1416,"state":"open","locked":false,"title":"#1412 ZWave Thermostat support","user":{"login":"coteyr","id":73411,"avatar_url":"https://avatars.githubusercontent.com/u/73411?v=3","gravatar_id":"","url":"https://api.github.com/users/coteyr","html_url":"https://github.com/coteyr","followers_url":"https://api.github.com/users/coteyr/followers","following_url":"https://api.github.com/users/coteyr/following{/other_user}","gists_url":"https://api.github.com/users/coteyr/gists{/gist_id}","starred_url":"https://api.github.com/users/coteyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coteyr/subscriptions","organizations_url":"https://api.github.com/users/coteyr/orgs","repos_url":"https://api.github.com/users/coteyr/repos","events_url":"https://api.github.com/users/coteyr/events{/privacy}","received_events_url":"https://api.github.com/users/coteyr/received_events","type":"User","site_admin":false},"body":"It's rough and ugly right now, but it's a start and it works. There are some places where I would like to improve it.","created_at":"2016-02-27T03:34:18Z","updated_at":"2016-02-27T20:12:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"001e4c5c1049c209aed0d69a943cbd097c86401b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/balloob/home-assistant/pulls/1416/commits","review_comments_url":"https://api.github.com/repos/balloob/home-assistant/pulls/1416/comments","review_comment_url":"https://api.github.com/repos/balloob/home-assistant/pulls/comments{/number}","comments_url":"https://api.github.com/repos/balloob/home-assistant/issues/1416/comments","statuses_url":"https://api.github.com/repos/balloob/home-assistant/statuses/3562d14e746423ed36630b2163f21de0859d22c4","head":{"label":"coteyr:dev","ref":"dev","sha":"3562d14e746423ed36630b2163f21de0859d22c4","user":{"login":"coteyr","id":73411,"avatar_url":"https://avatars.githubusercontent.com/u/73411?v=3","gravatar_id":"","url":"https://api.github.com/users/coteyr","html_url":"https://github.com/coteyr","followers_url":"https://api.github.com/users/coteyr/followers","following_url":"https://api.github.com/users/coteyr/following{/other_user}","gists_url":"https://api.github.com/users/coteyr/gists{/gist_id}","starred_url":"https://api.github.com/users/coteyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coteyr/subscriptions","organizations_url":"https://api.github.com/users/coteyr/orgs","repos_url":"https://api.github.com/users/coteyr/repos","events_url":"https://api.github.com/users/coteyr/events{/privacy}","received_events_url":"https://api.github.com/users/coteyr/received_events","type":"User","site_admin":false},"repo":{"id":52627236,"name":"home-assistant","full_name":"coteyr/home-assistant","owner":{"login":"coteyr","id":73411,"avatar_url":"https://avatars.githubusercontent.com/u/73411?v=3","gravatar_id":"","url":"https://api.github.com/users/coteyr","html_url":"https://github.com/coteyr","followers_url":"https://api.github.com/users/coteyr/followers","following_url":"https://api.github.com/users/coteyr/following{/other_user}","gists_url":"https://api.github.com/users/coteyr/gists{/gist_id}","starred_url":"https://api.github.com/users/coteyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coteyr/subscriptions","organizations_url":"https://api.github.com/users/coteyr/orgs","repos_url":"https://api.github.com/users/coteyr/repos","events_url":"https://api.github.com/users/coteyr/events{/privacy}","received_events_url":"https://api.github.com/users/coteyr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/coteyr/home-assistant","description":":house_with_garden: Open-source home automation platform running on Python 3","fork":true,"url":"https://api.github.com/repos/coteyr/home-assistant","forks_url":"https://api.github.com/repos/coteyr/home-assistant/forks","keys_url":"https://api.github.com/repos/coteyr/home-assistant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coteyr/home-assistant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coteyr/home-assistant/teams","hooks_url":"https://api.github.com/repos/coteyr/home-assistant/hooks","issue_events_url":"https://api.github.com/repos/coteyr/home-assistant/issues/events{/number}","events_url":"https://api.github.com/repos/coteyr/home-assistant/events","assignees_url":"https://api.github.com/repos/coteyr/home-assistant/assignees{/user}","branches_url":"https://api.github.com/repos/coteyr/home-assistant/branches{/branch}","tags_url":"https://api.github.com/repos/coteyr/home-assistant/tags","blobs_url":"https://api.github.com/repos/coteyr/home-assistant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coteyr/home-assistant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coteyr/home-assistant/git/refs{/sha}","trees_url":"https://api.github.com/repos/coteyr/home-assistant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coteyr/home-assistant/statuses/{sha}","languages_url":"https://api.github.com/repos/coteyr/home-assistant/languages","stargazers_url":"https://api.github.com/repos/coteyr/home-assistant/stargazers","contributors_url":"https://api.github.com/repos/coteyr/home-assistant/contributors","subscribers_url":"https://api.github.com/repos/coteyr/home-assistant/subscribers","subscription_url":"https://api.github.com/repos/coteyr/home-assistant/subscription","commits_url":"https://api.github.com/repos/coteyr/home-assistant/commits{/sha}","git_commits_url":"https://api.github.com/repos/coteyr/home-assistant/git/commits{/sha}","comments_url":"https://api.github.com/repos/coteyr/home-assistant/comments{/number}","issue_comment_url":"https://api.github.com/repos/coteyr/home-assistant/issues/comments{/number}","contents_url":"https://api.github.com/repos/coteyr/home-assistant/contents/{+path}","compare_url":"https://api.github.com/repos/coteyr/home-assistant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coteyr/home-assistant/merges","archive_url":"https://api.github.com/repos/coteyr/home-assistant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coteyr/home-assistant/downloads","issues_url":"https://api.github.com/repos/coteyr/home-assistant/issues{/number}","pulls_url":"https://api.github.com/repos/coteyr/home-assistant/pulls{/number}","milestones_url":"https://api.github.com/repos/coteyr/home-assistant/milestones{/number}","notifications_url":"https://api.github.com/repos/coteyr/home-assistant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coteyr/home-assistant/labels{/name}","releases_url":"https://api.github.com/repos/coteyr/home-assistant/releases{/id}","deployments_url":"https://api.github.com/repos/coteyr/home-assistant/deployments","created_at":"2016-02-26T19:23:03Z","updated_at":"2016-02-26T19:23:05Z","pushed_at":"2016-02-27T03:31:28Z","git_url":"git://github.com/coteyr/home-assistant.git","ssh_url":"git@github.com:coteyr/home-assistant.git","clone_url":"https://github.com/coteyr/home-assistant.git","svn_url":"https://github.com/coteyr/home-assistant","homepage":"https://home-assistant.io","size":45297,"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":"balloob:dev","ref":"dev","sha":"2ec141b5d4e19145b63a1015bf6d374095a141fa","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},"repo":{"id":12888993,"name":"home-assistant","full_name":"balloob/home-assistant","owner":{"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},"private":false,"html_url":"https://github.com/balloob/home-assistant","description":":house_with_garden: Open-source home automation platform running on Python 3","fork":false,"url":"https://api.github.com/repos/balloob/home-assistant","forks_url":"https://api.github.com/repos/balloob/home-assistant/forks","keys_url":"https://api.github.com/repos/balloob/home-assistant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/balloob/home-assistant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/balloob/home-assistant/teams","hooks_url":"https://api.github.com/repos/balloob/home-assistant/hooks","issue_events_url":"https://api.github.com/repos/balloob/home-assistant/issues/events{/number}","events_url":"https://api.github.com/repos/balloob/home-assistant/events","assignees_url":"https://api.github.com/repos/balloob/home-assistant/assignees{/user}","branches_url":"https://api.github.com/repos/balloob/home-assistant/branches{/branch}","tags_url":"https://api.github.com/repos/balloob/home-assistant/tags","blobs_url":"https://api.github.com/repos/balloob/home-assistant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/balloob/home-assistant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/balloob/home-assistant/git/refs{/sha}","trees_url":"https://api.github.com/repos/balloob/home-assistant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/balloob/home-assistant/statuses/{sha}","languages_url":"https://api.github.com/repos/balloob/home-assistant/languages","stargazers_url":"https://api.github.com/repos/balloob/home-assistant/stargazers","contributors_url":"https://api.github.com/repos/balloob/home-assistant/contributors","subscribers_url":"https://api.github.com/repos/balloob/home-assistant/subscribers","subscription_url":"https://api.github.com/repos/balloob/home-assistant/subscription","commits_url":"https://api.github.com/repos/balloob/home-assistant/commits{/sha}","git_commits_url":"https://api.github.com/repos/balloob/home-assistant/git/commits{/sha}","comments_url":"https://api.github.com/repos/balloob/home-assistant/comments{/number}","issue_comment_url":"https://api.github.com/repos/balloob/home-assistant/issues/comments{/number}","contents_url":"https://api.github.com/repos/balloob/home-assistant/contents/{+path}","compare_url":"https://api.github.com/repos/balloob/home-assistant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/balloob/home-assistant/merges","archive_url":"https://api.github.com/repos/balloob/home-assistant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/balloob/home-assistant/downloads","issues_url":"https://api.github.com/repos/balloob/home-assistant/issues{/number}","pulls_url":"https://api.github.com/repos/balloob/home-assistant/pulls{/number}","milestones_url":"https://api.github.com/repos/balloob/home-assistant/milestones{/number}","notifications_url":"https://api.github.com/repos/balloob/home-assistant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/balloob/home-assistant/labels{/name}","releases_url":"https://api.github.com/repos/balloob/home-assistant/releases{/id}","deployments_url":"https://api.github.com/repos/balloob/home-assistant/deployments","created_at":"2013-09-17T07:29:48Z","updated_at":"2016-02-27T15:49:24Z","pushed_at":"2016-02-27T17:05:56Z","git_url":"git://github.com/balloob/home-assistant.git","ssh_url":"git@github.com:balloob/home-assistant.git","clone_url":"https://github.com/balloob/home-assistant.git","svn_url":"https://github.com/balloob/home-assistant","homepage":"https://home-assistant.io","size":46461,"stargazers_count":2779,"watchers_count":2779,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":472,"mirror_url":null,"open_issues_count":190,"forks":472,"open_issues":190,"watchers":2779,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/balloob/home-assistant/pulls/1416"},"html":{"href":"https://github.com/balloob/home-assistant/pull/1416"},"issue":{"href":"https://api.github.com/repos/balloob/home-assistant/issues/1416"},"comments":{"href":"https://api.github.com/repos/balloob/home-assistant/issues/1416/comments"},"review_comments":{"href":"https://api.github.com/repos/balloob/home-assistant/pulls/1416/comments"},"review_comment":{"href":"https://api.github.com/repos/balloob/home-assistant/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/balloob/home-assistant/pulls/1416/commits"},"statuses":{"href":"https://api.github.com/repos/balloob/home-assistant/statuses/3562d14e746423ed36630b2163f21de0859d22c4"}}}}