{"action":"created","comment":{"url":"https://api.github.com/repos/XKNX/xknx/pulls/comments/93878833","pull_request_review_id":14411788,"id":93878833,"diff_hunk":"@@ -0,0 +1,90 @@\n+from datetime import time, date, datetime, timedelta\n+from .colors import Colors\n+from enum import Enum\n+\n+class xKNXCouldNotConvert(Exception):\n+    def __init__(self):\n+        pass\n+\n+    def __str__(self):\n+        return \"CouldNotConvert\"\n+\n+class DPT():\n+    def __init__(self, type = \"\", name = \"\", valuerange= (0,100), unit=\"\", bitlength = 1):\t\n+\t    self._type = type\n+\t    self._name = name\n+\t    self._valuerange = valuerange\n+\t    self._unit  = unit\n+\t    self._bitlength = bitlength\n+    @property\n+    def type(self):\n+\t    \"\"\"Return the type\"\"\"\n+\t    return _type\t\t\n+    @property\n+    def name(self):\n+\t    \"\"\"Return the name\"\"\"\n+\t    return _name\t\n+    @property\n+    def valuerange(self):\n+\t    \"\"\"Return the valuerange\"\"\"\n+\t    return _valuerange\t\n+    @property\n+    def unit(self):\n+\t    \"\"\"Return the unit\"\"\"\n+\t    return _unit\t\n+    @property\n+    def bitlength(self):\n+\t    \"\"\"Return the unit\"\"\"\n+\t    return _bitlength\t\t\t\n+\t\t\n+class DPTTypes(Enum):","path":"xknx/conversion.py","position":40,"original_position":40,"commit_id":"22367d41ee7d184b307d935cf7e268528d94cb5b","original_commit_id":"22367d41ee7d184b307d935cf7e268528d94cb5b","user":{"login":"Julius2342","id":2248357,"avatar_url":"https://avatars.githubusercontent.com/u/2248357?v=3","gravatar_id":"","url":"https://api.github.com/users/Julius2342","html_url":"https://github.com/Julius2342","followers_url":"https://api.github.com/users/Julius2342/followers","following_url":"https://api.github.com/users/Julius2342/following{/other_user}","gists_url":"https://api.github.com/users/Julius2342/gists{/gist_id}","starred_url":"https://api.github.com/users/Julius2342/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Julius2342/subscriptions","organizations_url":"https://api.github.com/users/Julius2342/orgs","repos_url":"https://api.github.com/users/Julius2342/repos","events_url":"https://api.github.com/users/Julius2342/events{/privacy}","received_events_url":"https://api.github.com/users/Julius2342/received_events","type":"User","site_admin":false},"body":"````\r\nclass DPT_1_Switch(DTP):\r\n    def __init__(self):\r\n        DPT.__init__(\"1.001\", \"Switch\", (0, 1), \"\", 1)\r\n````\r\n\r\nWobei ich nicht genau weiß, ob das so viel schöner ist :)","created_at":"2016-12-26T17:38:46Z","updated_at":"2016-12-26T17:38:49Z","html_url":"https://github.com/XKNX/xknx/pull/23#discussion_r93878833","pull_request_url":"https://api.github.com/repos/XKNX/xknx/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/XKNX/xknx/pulls/comments/93878833"},"html":{"href":"https://github.com/XKNX/xknx/pull/23#discussion_r93878833"},"pull_request":{"href":"https://api.github.com/repos/XKNX/xknx/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/XKNX/xknx/pulls/23","id":99378528,"html_url":"https://github.com/XKNX/xknx/pull/23","diff_url":"https://github.com/XKNX/xknx/pull/23.diff","patch_url":"https://github.com/XKNX/xknx/pull/23.patch","issue_url":"https://api.github.com/repos/XKNX/xknx/issues/23","number":23,"state":"open","locked":false,"title":"Create conversion.py","user":{"login":"twistermcneal","id":2677629,"avatar_url":"https://avatars.githubusercontent.com/u/2677629?v=3","gravatar_id":"","url":"https://api.github.com/users/twistermcneal","html_url":"https://github.com/twistermcneal","followers_url":"https://api.github.com/users/twistermcneal/followers","following_url":"https://api.github.com/users/twistermcneal/following{/other_user}","gists_url":"https://api.github.com/users/twistermcneal/gists{/gist_id}","starred_url":"https://api.github.com/users/twistermcneal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twistermcneal/subscriptions","organizations_url":"https://api.github.com/users/twistermcneal/orgs","repos_url":"https://api.github.com/users/twistermcneal/repos","events_url":"https://api.github.com/users/twistermcneal/events{/privacy}","received_events_url":"https://api.github.com/users/twistermcneal/received_events","type":"User","site_admin":false},"body":"Adding conversion class for DPT Types","created_at":"2016-12-26T15:56:06Z","updated_at":"2016-12-26T17:38:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a798a094839aadcf8ad4ecb54e5e1ecaa128be29","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/XKNX/xknx/pulls/23/commits","review_comments_url":"https://api.github.com/repos/XKNX/xknx/pulls/23/comments","review_comment_url":"https://api.github.com/repos/XKNX/xknx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/XKNX/xknx/issues/23/comments","statuses_url":"https://api.github.com/repos/XKNX/xknx/statuses/22367d41ee7d184b307d935cf7e268528d94cb5b","head":{"label":"twistermcneal:patch-5","ref":"patch-5","sha":"22367d41ee7d184b307d935cf7e268528d94cb5b","user":{"login":"twistermcneal","id":2677629,"avatar_url":"https://avatars.githubusercontent.com/u/2677629?v=3","gravatar_id":"","url":"https://api.github.com/users/twistermcneal","html_url":"https://github.com/twistermcneal","followers_url":"https://api.github.com/users/twistermcneal/followers","following_url":"https://api.github.com/users/twistermcneal/following{/other_user}","gists_url":"https://api.github.com/users/twistermcneal/gists{/gist_id}","starred_url":"https://api.github.com/users/twistermcneal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twistermcneal/subscriptions","organizations_url":"https://api.github.com/users/twistermcneal/orgs","repos_url":"https://api.github.com/users/twistermcneal/repos","events_url":"https://api.github.com/users/twistermcneal/events{/privacy}","received_events_url":"https://api.github.com/users/twistermcneal/received_events","type":"User","site_admin":false},"repo":{"id":76753851,"name":"xknx","full_name":"twistermcneal/xknx","owner":{"login":"twistermcneal","id":2677629,"avatar_url":"https://avatars.githubusercontent.com/u/2677629?v=3","gravatar_id":"","url":"https://api.github.com/users/twistermcneal","html_url":"https://github.com/twistermcneal","followers_url":"https://api.github.com/users/twistermcneal/followers","following_url":"https://api.github.com/users/twistermcneal/following{/other_user}","gists_url":"https://api.github.com/users/twistermcneal/gists{/gist_id}","starred_url":"https://api.github.com/users/twistermcneal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twistermcneal/subscriptions","organizations_url":"https://api.github.com/users/twistermcneal/orgs","repos_url":"https://api.github.com/users/twistermcneal/repos","events_url":"https://api.github.com/users/twistermcneal/events{/privacy}","received_events_url":"https://api.github.com/users/twistermcneal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/twistermcneal/xknx","description":"Python wrapper around KNX protocol","fork":true,"url":"https://api.github.com/repos/twistermcneal/xknx","forks_url":"https://api.github.com/repos/twistermcneal/xknx/forks","keys_url":"https://api.github.com/repos/twistermcneal/xknx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twistermcneal/xknx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twistermcneal/xknx/teams","hooks_url":"https://api.github.com/repos/twistermcneal/xknx/hooks","issue_events_url":"https://api.github.com/repos/twistermcneal/xknx/issues/events{/number}","events_url":"https://api.github.com/repos/twistermcneal/xknx/events","assignees_url":"https://api.github.com/repos/twistermcneal/xknx/assignees{/user}","branches_url":"https://api.github.com/repos/twistermcneal/xknx/branches{/branch}","tags_url":"https://api.github.com/repos/twistermcneal/xknx/tags","blobs_url":"https://api.github.com/repos/twistermcneal/xknx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twistermcneal/xknx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twistermcneal/xknx/git/refs{/sha}","trees_url":"https://api.github.com/repos/twistermcneal/xknx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twistermcneal/xknx/statuses/{sha}","languages_url":"https://api.github.com/repos/twistermcneal/xknx/languages","stargazers_url":"https://api.github.com/repos/twistermcneal/xknx/stargazers","contributors_url":"https://api.github.com/repos/twistermcneal/xknx/contributors","subscribers_url":"https://api.github.com/repos/twistermcneal/xknx/subscribers","subscription_url":"https://api.github.com/repos/twistermcneal/xknx/subscription","commits_url":"https://api.github.com/repos/twistermcneal/xknx/commits{/sha}","git_commits_url":"https://api.github.com/repos/twistermcneal/xknx/git/commits{/sha}","comments_url":"https://api.github.com/repos/twistermcneal/xknx/comments{/number}","issue_comment_url":"https://api.github.com/repos/twistermcneal/xknx/issues/comments{/number}","contents_url":"https://api.github.com/repos/twistermcneal/xknx/contents/{+path}","compare_url":"https://api.github.com/repos/twistermcneal/xknx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twistermcneal/xknx/merges","archive_url":"https://api.github.com/repos/twistermcneal/xknx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twistermcneal/xknx/downloads","issues_url":"https://api.github.com/repos/twistermcneal/xknx/issues{/number}","pulls_url":"https://api.github.com/repos/twistermcneal/xknx/pulls{/number}","milestones_url":"https://api.github.com/repos/twistermcneal/xknx/milestones{/number}","notifications_url":"https://api.github.com/repos/twistermcneal/xknx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twistermcneal/xknx/labels{/name}","releases_url":"https://api.github.com/repos/twistermcneal/xknx/releases{/id}","deployments_url":"https://api.github.com/repos/twistermcneal/xknx/deployments","created_at":"2016-12-17T23:55:07Z","updated_at":"2016-12-17T23:55:07Z","pushed_at":"2016-12-26T15:47:36Z","git_url":"git://github.com/twistermcneal/xknx.git","ssh_url":"git@github.com:twistermcneal/xknx.git","clone_url":"https://github.com/twistermcneal/xknx.git","svn_url":"https://github.com/twistermcneal/xknx","homepage":null,"size":103,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"XKNX:master","ref":"master","sha":"615bc2699c0409d130e97a67e9bfb5ee3178811a","user":{"login":"XKNX","id":24768090,"avatar_url":"https://avatars.githubusercontent.com/u/24768090?v=3","gravatar_id":"","url":"https://api.github.com/users/XKNX","html_url":"https://github.com/XKNX","followers_url":"https://api.github.com/users/XKNX/followers","following_url":"https://api.github.com/users/XKNX/following{/other_user}","gists_url":"https://api.github.com/users/XKNX/gists{/gist_id}","starred_url":"https://api.github.com/users/XKNX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XKNX/subscriptions","organizations_url":"https://api.github.com/users/XKNX/orgs","repos_url":"https://api.github.com/users/XKNX/repos","events_url":"https://api.github.com/users/XKNX/events{/privacy}","received_events_url":"https://api.github.com/users/XKNX/received_events","type":"Organization","site_admin":false},"repo":{"id":51259458,"name":"xknx","full_name":"XKNX/xknx","owner":{"login":"XKNX","id":24768090,"avatar_url":"https://avatars.githubusercontent.com/u/24768090?v=3","gravatar_id":"","url":"https://api.github.com/users/XKNX","html_url":"https://github.com/XKNX","followers_url":"https://api.github.com/users/XKNX/followers","following_url":"https://api.github.com/users/XKNX/following{/other_user}","gists_url":"https://api.github.com/users/XKNX/gists{/gist_id}","starred_url":"https://api.github.com/users/XKNX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XKNX/subscriptions","organizations_url":"https://api.github.com/users/XKNX/orgs","repos_url":"https://api.github.com/users/XKNX/repos","events_url":"https://api.github.com/users/XKNX/events{/privacy}","received_events_url":"https://api.github.com/users/XKNX/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/XKNX/xknx","description":"XKNX - An eXtended KNX library written in Python","fork":false,"url":"https://api.github.com/repos/XKNX/xknx","forks_url":"https://api.github.com/repos/XKNX/xknx/forks","keys_url":"https://api.github.com/repos/XKNX/xknx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/XKNX/xknx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/XKNX/xknx/teams","hooks_url":"https://api.github.com/repos/XKNX/xknx/hooks","issue_events_url":"https://api.github.com/repos/XKNX/xknx/issues/events{/number}","events_url":"https://api.github.com/repos/XKNX/xknx/events","assignees_url":"https://api.github.com/repos/XKNX/xknx/assignees{/user}","branches_url":"https://api.github.com/repos/XKNX/xknx/branches{/branch}","tags_url":"https://api.github.com/repos/XKNX/xknx/tags","blobs_url":"https://api.github.com/repos/XKNX/xknx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/XKNX/xknx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/XKNX/xknx/git/refs{/sha}","trees_url":"https://api.github.com/repos/XKNX/xknx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/XKNX/xknx/statuses/{sha}","languages_url":"https://api.github.com/repos/XKNX/xknx/languages","stargazers_url":"https://api.github.com/repos/XKNX/xknx/stargazers","contributors_url":"https://api.github.com/repos/XKNX/xknx/contributors","subscribers_url":"https://api.github.com/repos/XKNX/xknx/subscribers","subscription_url":"https://api.github.com/repos/XKNX/xknx/subscription","commits_url":"https://api.github.com/repos/XKNX/xknx/commits{/sha}","git_commits_url":"https://api.github.com/repos/XKNX/xknx/git/commits{/sha}","comments_url":"https://api.github.com/repos/XKNX/xknx/comments{/number}","issue_comment_url":"https://api.github.com/repos/XKNX/xknx/issues/comments{/number}","contents_url":"https://api.github.com/repos/XKNX/xknx/contents/{+path}","compare_url":"https://api.github.com/repos/XKNX/xknx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/XKNX/xknx/merges","archive_url":"https://api.github.com/repos/XKNX/xknx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/XKNX/xknx/downloads","issues_url":"https://api.github.com/repos/XKNX/xknx/issues{/number}","pulls_url":"https://api.github.com/repos/XKNX/xknx/pulls{/number}","milestones_url":"https://api.github.com/repos/XKNX/xknx/milestones{/number}","notifications_url":"https://api.github.com/repos/XKNX/xknx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/XKNX/xknx/labels{/name}","releases_url":"https://api.github.com/repos/XKNX/xknx/releases{/id}","deployments_url":"https://api.github.com/repos/XKNX/xknx/deployments","created_at":"2016-02-07T18:29:39Z","updated_at":"2016-12-25T22:35:03Z","pushed_at":"2016-12-26T15:56:07Z","git_url":"git://github.com/XKNX/xknx.git","ssh_url":"git@github.com:XKNX/xknx.git","clone_url":"https://github.com/XKNX/xknx.git","svn_url":"https://github.com/XKNX/xknx","homepage":"","size":122,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":12,"forks":1,"open_issues":12,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/XKNX/xknx/pulls/23"},"html":{"href":"https://github.com/XKNX/xknx/pull/23"},"issue":{"href":"https://api.github.com/repos/XKNX/xknx/issues/23"},"comments":{"href":"https://api.github.com/repos/XKNX/xknx/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/XKNX/xknx/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/XKNX/xknx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/XKNX/xknx/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/XKNX/xknx/statuses/22367d41ee7d184b307d935cf7e268528d94cb5b"}}}}
{"actor":{"display_login":"Julius2342"}}