{"action":"created","comment":{"url":"https://api.github.com/repos/openhab/openhab2/pulls/comments/45445295","id":45445295,"diff_hunk":"@@ -0,0 +1,186 @@\n+/**\n+ * Copyright (c) 2014 openHAB UG (haftungsbeschraenkt) and others.\n+ * All rights reserved. This program and the accompanying materials\n+ * are made available under the terms of the Eclipse Public License v1.0\n+ * which accompanies this distribution, and is available at\n+ * http://www.eclipse.org/legal/epl-v10.html\n+ */\n+package org.openhab.binding.miele.handler;\n+\n+import java.lang.reflect.InvocationTargetException;\n+import java.lang.reflect.Method;\n+import java.text.SimpleDateFormat;\n+import java.util.Date;\n+import java.util.Map.Entry;\n+import java.util.TimeZone;\n+\n+import org.eclipse.smarthome.core.library.types.DateTimeType;\n+import org.eclipse.smarthome.core.library.types.OnOffType;\n+import org.eclipse.smarthome.core.library.types.OpenClosedType;\n+import org.eclipse.smarthome.core.library.types.StringType;\n+import org.eclipse.smarthome.core.types.State;\n+import org.eclipse.smarthome.core.types.Type;\n+import org.eclipse.smarthome.core.types.UnDefType;\n+import org.openhab.binding.miele.handler.MieleBridgeHandler.DeviceMetaData;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+import com.google.gson.JsonElement;\n+\n+/**\n+ * The {@link ApplianceChannelSelector} for dishwashers\n+ *\n+ * @author Karel Goderis - Initial contribution\n+ */\n+public enum DishwasherChannelSelector implements ApplianceChannelSelector {\n+\n+    PRODUCT_TYPE(\"productTypeId\", \"productType\", StringType.class, true),\n+    DEVICE_TYPE(\"mieleDeviceType\", \"deviceType\", StringType.class, true),\n+    STATE(\"state\", \"state\", StringType.class, false),\n+    PROGRAMID(\"programId\", \"program\", StringType.class, false),\n+    PROGRAMPHASE(\"phase\", \"phase\", StringType.class, false),\n+    START_TIME(\"startTime\", \"start\", StringType.class, false),\n+    DURATION(\"duration\", \"duration\", DateTimeType.class, false) {\n+        @Override\n+        public State getState(String s, DeviceMetaData dmd) {\n+            Date date = new Date();\n+            SimpleDateFormat DATE_FORMATTER = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\");","path":"addons/binding/org.openhab.binding.miele/src/main/java/org/openhab/binding/miele/handler/DishwasherChannelSelector.java","position":47,"original_position":47,"commit_id":"d554b252e8a5ab8badccc8509b19bce80233aeb2","original_commit_id":"d554b252e8a5ab8badccc8509b19bce80233aeb2","user":{"login":"kgoderis","id":5459062,"avatar_url":"https://avatars.githubusercontent.com/u/5459062?v=3","gravatar_id":"","url":"https://api.github.com/users/kgoderis","html_url":"https://github.com/kgoderis","followers_url":"https://api.github.com/users/kgoderis/followers","following_url":"https://api.github.com/users/kgoderis/following{/other_user}","gists_url":"https://api.github.com/users/kgoderis/gists{/gist_id}","starred_url":"https://api.github.com/users/kgoderis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kgoderis/subscriptions","organizations_url":"https://api.github.com/users/kgoderis/orgs","repos_url":"https://api.github.com/users/kgoderis/repos","events_url":"https://api.github.com/users/kgoderis/events{/privacy}","received_events_url":"https://api.github.com/users/kgoderis/received_events","type":"User","site_admin":false},"body":"I tried to stay away from external libs as much as possible... If I am not mistaken, some time ago, we did a clean-up in other parts of openHAB/ESH with respect to Joda.","created_at":"2015-11-20T08:29:00Z","updated_at":"2015-11-20T08:29:00Z","html_url":"https://github.com/openhab/openhab2/pull/347#discussion_r45445295","pull_request_url":"https://api.github.com/repos/openhab/openhab2/pulls/347","_links":{"self":{"href":"https://api.github.com/repos/openhab/openhab2/pulls/comments/45445295"},"html":{"href":"https://github.com/openhab/openhab2/pull/347#discussion_r45445295"},"pull_request":{"href":"https://api.github.com/repos/openhab/openhab2/pulls/347"}}},"pull_request":{"url":"https://api.github.com/repos/openhab/openhab2/pulls/347","id":42815682,"html_url":"https://github.com/openhab/openhab2/pull/347","diff_url":"https://github.com/openhab/openhab2/pull/347.diff","patch_url":"https://github.com/openhab/openhab2/pull/347.patch","issue_url":"https://api.github.com/repos/openhab/openhab2/issues/347","number":347,"state":"open","locked":false,"title":"Initial contribution of the Miele binding that supports the Miele@Hom…","user":{"login":"kgoderis","id":5459062,"avatar_url":"https://avatars.githubusercontent.com/u/5459062?v=3","gravatar_id":"","url":"https://api.github.com/users/kgoderis","html_url":"https://github.com/kgoderis","followers_url":"https://api.github.com/users/kgoderis/followers","following_url":"https://api.github.com/users/kgoderis/following{/other_user}","gists_url":"https://api.github.com/users/kgoderis/gists{/gist_id}","starred_url":"https://api.github.com/users/kgoderis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kgoderis/subscriptions","organizations_url":"https://api.github.com/users/kgoderis/orgs","repos_url":"https://api.github.com/users/kgoderis/repos","events_url":"https://api.github.com/users/kgoderis/events{/privacy}","received_events_url":"https://api.github.com/users/kgoderis/received_events","type":"User","site_admin":false},"body":"…e appliances. It is based on the JSON-RPC protocol exposed by the Miele XGW3000 ZigBee gateway.\r\n\r\n\r\n\r\nSigned-off-by: Karel Goderis <karel.goderis@me.com> (+8 squashed commits)","created_at":"2015-08-19T13:44:40Z","updated_at":"2015-11-20T08:29:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a5bba7a398a99b5775805e958a14937899d70aaf","assignee":{"login":"kaikreuzer","id":3244965,"avatar_url":"https://avatars.githubusercontent.com/u/3244965?v=3","gravatar_id":"","url":"https://api.github.com/users/kaikreuzer","html_url":"https://github.com/kaikreuzer","followers_url":"https://api.github.com/users/kaikreuzer/followers","following_url":"https://api.github.com/users/kaikreuzer/following{/other_user}","gists_url":"https://api.github.com/users/kaikreuzer/gists{/gist_id}","starred_url":"https://api.github.com/users/kaikreuzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaikreuzer/subscriptions","organizations_url":"https://api.github.com/users/kaikreuzer/orgs","repos_url":"https://api.github.com/users/kaikreuzer/repos","events_url":"https://api.github.com/users/kaikreuzer/events{/privacy}","received_events_url":"https://api.github.com/users/kaikreuzer/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/openhab/openhab2/pulls/347/commits","review_comments_url":"https://api.github.com/repos/openhab/openhab2/pulls/347/comments","review_comment_url":"https://api.github.com/repos/openhab/openhab2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openhab/openhab2/issues/347/comments","statuses_url":"https://api.github.com/repos/openhab/openhab2/statuses/d554b252e8a5ab8badccc8509b19bce80233aeb2","head":{"label":"kgoderis:miele","ref":"miele","sha":"d554b252e8a5ab8badccc8509b19bce80233aeb2","user":{"login":"kgoderis","id":5459062,"avatar_url":"https://avatars.githubusercontent.com/u/5459062?v=3","gravatar_id":"","url":"https://api.github.com/users/kgoderis","html_url":"https://github.com/kgoderis","followers_url":"https://api.github.com/users/kgoderis/followers","following_url":"https://api.github.com/users/kgoderis/following{/other_user}","gists_url":"https://api.github.com/users/kgoderis/gists{/gist_id}","starred_url":"https://api.github.com/users/kgoderis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kgoderis/subscriptions","organizations_url":"https://api.github.com/users/kgoderis/orgs","repos_url":"https://api.github.com/users/kgoderis/repos","events_url":"https://api.github.com/users/kgoderis/events{/privacy}","received_events_url":"https://api.github.com/users/kgoderis/received_events","type":"User","site_admin":false},"repo":{"id":23461615,"name":"openhab2","full_name":"kgoderis/openhab2","owner":{"login":"kgoderis","id":5459062,"avatar_url":"https://avatars.githubusercontent.com/u/5459062?v=3","gravatar_id":"","url":"https://api.github.com/users/kgoderis","html_url":"https://github.com/kgoderis","followers_url":"https://api.github.com/users/kgoderis/followers","following_url":"https://api.github.com/users/kgoderis/following{/other_user}","gists_url":"https://api.github.com/users/kgoderis/gists{/gist_id}","starred_url":"https://api.github.com/users/kgoderis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kgoderis/subscriptions","organizations_url":"https://api.github.com/users/kgoderis/orgs","repos_url":"https://api.github.com/users/kgoderis/repos","events_url":"https://api.github.com/users/kgoderis/events{/privacy}","received_events_url":"https://api.github.com/users/kgoderis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kgoderis/openhab2","description":"The next-generation open Home Automation Bus (openHAB)","fork":true,"url":"https://api.github.com/repos/kgoderis/openhab2","forks_url":"https://api.github.com/repos/kgoderis/openhab2/forks","keys_url":"https://api.github.com/repos/kgoderis/openhab2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kgoderis/openhab2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kgoderis/openhab2/teams","hooks_url":"https://api.github.com/repos/kgoderis/openhab2/hooks","issue_events_url":"https://api.github.com/repos/kgoderis/openhab2/issues/events{/number}","events_url":"https://api.github.com/repos/kgoderis/openhab2/events","assignees_url":"https://api.github.com/repos/kgoderis/openhab2/assignees{/user}","branches_url":"https://api.github.com/repos/kgoderis/openhab2/branches{/branch}","tags_url":"https://api.github.com/repos/kgoderis/openhab2/tags","blobs_url":"https://api.github.com/repos/kgoderis/openhab2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kgoderis/openhab2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kgoderis/openhab2/git/refs{/sha}","trees_url":"https://api.github.com/repos/kgoderis/openhab2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kgoderis/openhab2/statuses/{sha}","languages_url":"https://api.github.com/repos/kgoderis/openhab2/languages","stargazers_url":"https://api.github.com/repos/kgoderis/openhab2/stargazers","contributors_url":"https://api.github.com/repos/kgoderis/openhab2/contributors","subscribers_url":"https://api.github.com/repos/kgoderis/openhab2/subscribers","subscription_url":"https://api.github.com/repos/kgoderis/openhab2/subscription","commits_url":"https://api.github.com/repos/kgoderis/openhab2/commits{/sha}","git_commits_url":"https://api.github.com/repos/kgoderis/openhab2/git/commits{/sha}","comments_url":"https://api.github.com/repos/kgoderis/openhab2/comments{/number}","issue_comment_url":"https://api.github.com/repos/kgoderis/openhab2/issues/comments{/number}","contents_url":"https://api.github.com/repos/kgoderis/openhab2/contents/{+path}","compare_url":"https://api.github.com/repos/kgoderis/openhab2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kgoderis/openhab2/merges","archive_url":"https://api.github.com/repos/kgoderis/openhab2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kgoderis/openhab2/downloads","issues_url":"https://api.github.com/repos/kgoderis/openhab2/issues{/number}","pulls_url":"https://api.github.com/repos/kgoderis/openhab2/pulls{/number}","milestones_url":"https://api.github.com/repos/kgoderis/openhab2/milestones{/number}","notifications_url":"https://api.github.com/repos/kgoderis/openhab2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kgoderis/openhab2/labels{/name}","releases_url":"https://api.github.com/repos/kgoderis/openhab2/releases{/id}","created_at":"2014-08-29T11:11:25Z","updated_at":"2015-05-04T19:08:44Z","pushed_at":"2015-11-19T20:04:14Z","git_url":"git://github.com/kgoderis/openhab2.git","ssh_url":"git@github.com:kgoderis/openhab2.git","clone_url":"https://github.com/kgoderis/openhab2.git","svn_url":"https://github.com/kgoderis/openhab2","homepage":null,"size":12114,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"master"}},"base":{"label":"openhab:master","ref":"master","sha":"7cd83b8a74f71aed4f61345555d31fd719f4672c","user":{"login":"openhab","id":1007353,"avatar_url":"https://avatars.githubusercontent.com/u/1007353?v=3","gravatar_id":"","url":"https://api.github.com/users/openhab","html_url":"https://github.com/openhab","followers_url":"https://api.github.com/users/openhab/followers","following_url":"https://api.github.com/users/openhab/following{/other_user}","gists_url":"https://api.github.com/users/openhab/gists{/gist_id}","starred_url":"https://api.github.com/users/openhab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openhab/subscriptions","organizations_url":"https://api.github.com/users/openhab/orgs","repos_url":"https://api.github.com/users/openhab/repos","events_url":"https://api.github.com/users/openhab/events{/privacy}","received_events_url":"https://api.github.com/users/openhab/received_events","type":"Organization","site_admin":false},"repo":{"id":19753195,"name":"openhab2","full_name":"openhab/openhab2","owner":{"login":"openhab","id":1007353,"avatar_url":"https://avatars.githubusercontent.com/u/1007353?v=3","gravatar_id":"","url":"https://api.github.com/users/openhab","html_url":"https://github.com/openhab","followers_url":"https://api.github.com/users/openhab/followers","following_url":"https://api.github.com/users/openhab/following{/other_user}","gists_url":"https://api.github.com/users/openhab/gists{/gist_id}","starred_url":"https://api.github.com/users/openhab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openhab/subscriptions","organizations_url":"https://api.github.com/users/openhab/orgs","repos_url":"https://api.github.com/users/openhab/repos","events_url":"https://api.github.com/users/openhab/events{/privacy}","received_events_url":"https://api.github.com/users/openhab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openhab/openhab2","description":"The next-generation open Home Automation Bus (openHAB)","fork":false,"url":"https://api.github.com/repos/openhab/openhab2","forks_url":"https://api.github.com/repos/openhab/openhab2/forks","keys_url":"https://api.github.com/repos/openhab/openhab2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openhab/openhab2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openhab/openhab2/teams","hooks_url":"https://api.github.com/repos/openhab/openhab2/hooks","issue_events_url":"https://api.github.com/repos/openhab/openhab2/issues/events{/number}","events_url":"https://api.github.com/repos/openhab/openhab2/events","assignees_url":"https://api.github.com/repos/openhab/openhab2/assignees{/user}","branches_url":"https://api.github.com/repos/openhab/openhab2/branches{/branch}","tags_url":"https://api.github.com/repos/openhab/openhab2/tags","blobs_url":"https://api.github.com/repos/openhab/openhab2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openhab/openhab2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openhab/openhab2/git/refs{/sha}","trees_url":"https://api.github.com/repos/openhab/openhab2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openhab/openhab2/statuses/{sha}","languages_url":"https://api.github.com/repos/openhab/openhab2/languages","stargazers_url":"https://api.github.com/repos/openhab/openhab2/stargazers","contributors_url":"https://api.github.com/repos/openhab/openhab2/contributors","subscribers_url":"https://api.github.com/repos/openhab/openhab2/subscribers","subscription_url":"https://api.github.com/repos/openhab/openhab2/subscription","commits_url":"https://api.github.com/repos/openhab/openhab2/commits{/sha}","git_commits_url":"https://api.github.com/repos/openhab/openhab2/git/commits{/sha}","comments_url":"https://api.github.com/repos/openhab/openhab2/comments{/number}","issue_comment_url":"https://api.github.com/repos/openhab/openhab2/issues/comments{/number}","contents_url":"https://api.github.com/repos/openhab/openhab2/contents/{+path}","compare_url":"https://api.github.com/repos/openhab/openhab2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openhab/openhab2/merges","archive_url":"https://api.github.com/repos/openhab/openhab2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openhab/openhab2/downloads","issues_url":"https://api.github.com/repos/openhab/openhab2/issues{/number}","pulls_url":"https://api.github.com/repos/openhab/openhab2/pulls{/number}","milestones_url":"https://api.github.com/repos/openhab/openhab2/milestones{/number}","notifications_url":"https://api.github.com/repos/openhab/openhab2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openhab/openhab2/labels{/name}","releases_url":"https://api.github.com/repos/openhab/openhab2/releases{/id}","created_at":"2014-05-13T19:41:58Z","updated_at":"2015-11-18T22:12:42Z","pushed_at":"2015-11-19T20:04:30Z","git_url":"git://github.com/openhab/openhab2.git","ssh_url":"git@github.com:openhab/openhab2.git","clone_url":"https://github.com/openhab/openhab2.git","svn_url":"https://github.com/openhab/openhab2","homepage":null,"size":174434,"stargazers_count":298,"watchers_count":298,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":454,"mirror_url":null,"open_issues_count":37,"forks":454,"open_issues":37,"watchers":298,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openhab/openhab2/pulls/347"},"html":{"href":"https://github.com/openhab/openhab2/pull/347"},"issue":{"href":"https://api.github.com/repos/openhab/openhab2/issues/347"},"comments":{"href":"https://api.github.com/repos/openhab/openhab2/issues/347/comments"},"review_comments":{"href":"https://api.github.com/repos/openhab/openhab2/pulls/347/comments"},"review_comment":{"href":"https://api.github.com/repos/openhab/openhab2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openhab/openhab2/pulls/347/commits"},"statuses":{"href":"https://api.github.com/repos/openhab/openhab2/statuses/d554b252e8a5ab8badccc8509b19bce80233aeb2"}}}}