{"action":"created","comment":{"url":"https://api.github.com/repos/aniceberg/homelit/pulls/comments/189244964","pull_request_review_id":121385913,"id":189244964,"diff_hunk":"@@ -66,31 +66,32 @@ def initialize() {\n // TODO: implement event handlers\n def startHandler() {\n \tlog.debug \"Bedtime enforcement started at $bedtime.\"\n-   \tdef scheduledRun = true\n-    switchOn()\n+   \tstate.scheduledRun = true\n+    switchOn(null)\n }\n \n def endHandler() {\n \tlog.debug \"Bedtime enforcement ended at $endBedtime.\"\n-    scheduledRun = false\n+    state.scheduledRun = false\n }\n \n-def switchOn() {\n-\tif (getAllOk) {\n+def switchOn(event) {\n+\tlog.debug \"switchOn(), getAllOk: \" + getAllOk()\n+\tif ( getAllOk() ) {\n     \tlog.debug \"$switches turning off.\"\n     \tswitches.off()\n \t}\n }\n \n // TODO - centralize somehow\n def getAllOk() {\n-\tgetModeOk && getDaysOk && scheduledRun","path":"smartapps/homelit/nite-nite.src/nite-nite.groovy","position":40,"original_position":40,"commit_id":"21a0d0e239aecdcb22bf8966f57b0d146347e5d3","original_commit_id":"21a0d0e239aecdcb22bf8966f57b0d146347e5d3","user":{"login":"vervallsweg","id":9498282,"avatar_url":"https://avatars2.githubusercontent.com/u/9498282?v=4","gravatar_id":"","url":"https://api.github.com/users/vervallsweg","html_url":"https://github.com/vervallsweg","followers_url":"https://api.github.com/users/vervallsweg/followers","following_url":"https://api.github.com/users/vervallsweg/following{/other_user}","gists_url":"https://api.github.com/users/vervallsweg/gists{/gist_id}","starred_url":"https://api.github.com/users/vervallsweg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vervallsweg/subscriptions","organizations_url":"https://api.github.com/users/vervallsweg/orgs","repos_url":"https://api.github.com/users/vervallsweg/repos","events_url":"https://api.github.com/users/vervallsweg/events{/privacy}","received_events_url":"https://api.github.com/users/vervallsweg/received_events","type":"User","site_admin":false},"body":"This is just a value you're creating. Need to do something with it.\r\nSince you're calling the method above and evaluate the result, you need to return this value.","created_at":"2018-05-18T11:56:08Z","updated_at":"2018-05-18T11:59:31Z","html_url":"https://github.com/aniceberg/homelit/pull/1#discussion_r189244964","pull_request_url":"https://api.github.com/repos/aniceberg/homelit/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/aniceberg/homelit/pulls/comments/189244964"},"html":{"href":"https://github.com/aniceberg/homelit/pull/1#discussion_r189244964"},"pull_request":{"href":"https://api.github.com/repos/aniceberg/homelit/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/aniceberg/homelit/pulls/1","id":189000568,"html_url":"https://github.com/aniceberg/homelit/pull/1","diff_url":"https://github.com/aniceberg/homelit/pull/1.diff","patch_url":"https://github.com/aniceberg/homelit/pull/1.patch","issue_url":"https://api.github.com/repos/aniceberg/homelit/issues/1","number":1,"state":"open","locked":false,"title":"Fixed subscriptions, scheduledRun and more!","user":{"login":"vervallsweg","id":9498282,"avatar_url":"https://avatars2.githubusercontent.com/u/9498282?v=4","gravatar_id":"","url":"https://api.github.com/users/vervallsweg","html_url":"https://github.com/vervallsweg","followers_url":"https://api.github.com/users/vervallsweg/followers","following_url":"https://api.github.com/users/vervallsweg/following{/other_user}","gists_url":"https://api.github.com/users/vervallsweg/gists{/gist_id}","starred_url":"https://api.github.com/users/vervallsweg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vervallsweg/subscriptions","organizations_url":"https://api.github.com/users/vervallsweg/orgs","repos_url":"https://api.github.com/users/vervallsweg/repos","events_url":"https://api.github.com/users/vervallsweg/events{/privacy}","received_events_url":"https://api.github.com/users/vervallsweg/received_events","type":"User","site_admin":false},"body":"Made it work. Didn't check for logic errors or performance improvements.","created_at":"2018-05-18T11:41:22Z","updated_at":"2018-05-18T11:59:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a93d22ab8688888903c289f982a3d5ac0d48a3a6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/aniceberg/homelit/pulls/1/commits","review_comments_url":"https://api.github.com/repos/aniceberg/homelit/pulls/1/comments","review_comment_url":"https://api.github.com/repos/aniceberg/homelit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aniceberg/homelit/issues/1/comments","statuses_url":"https://api.github.com/repos/aniceberg/homelit/statuses/21a0d0e239aecdcb22bf8966f57b0d146347e5d3","head":{"label":"vervallsweg:patch-1","ref":"patch-1","sha":"21a0d0e239aecdcb22bf8966f57b0d146347e5d3","user":{"login":"vervallsweg","id":9498282,"avatar_url":"https://avatars2.githubusercontent.com/u/9498282?v=4","gravatar_id":"","url":"https://api.github.com/users/vervallsweg","html_url":"https://github.com/vervallsweg","followers_url":"https://api.github.com/users/vervallsweg/followers","following_url":"https://api.github.com/users/vervallsweg/following{/other_user}","gists_url":"https://api.github.com/users/vervallsweg/gists{/gist_id}","starred_url":"https://api.github.com/users/vervallsweg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vervallsweg/subscriptions","organizations_url":"https://api.github.com/users/vervallsweg/orgs","repos_url":"https://api.github.com/users/vervallsweg/repos","events_url":"https://api.github.com/users/vervallsweg/events{/privacy}","received_events_url":"https://api.github.com/users/vervallsweg/received_events","type":"User","site_admin":false},"repo":{"id":133946434,"name":"homelit","full_name":"vervallsweg/homelit","owner":{"login":"vervallsweg","id":9498282,"avatar_url":"https://avatars2.githubusercontent.com/u/9498282?v=4","gravatar_id":"","url":"https://api.github.com/users/vervallsweg","html_url":"https://github.com/vervallsweg","followers_url":"https://api.github.com/users/vervallsweg/followers","following_url":"https://api.github.com/users/vervallsweg/following{/other_user}","gists_url":"https://api.github.com/users/vervallsweg/gists{/gist_id}","starred_url":"https://api.github.com/users/vervallsweg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vervallsweg/subscriptions","organizations_url":"https://api.github.com/users/vervallsweg/orgs","repos_url":"https://api.github.com/users/vervallsweg/repos","events_url":"https://api.github.com/users/vervallsweg/events{/privacy}","received_events_url":"https://api.github.com/users/vervallsweg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vervallsweg/homelit","description":"HomeLit","fork":true,"url":"https://api.github.com/repos/vervallsweg/homelit","forks_url":"https://api.github.com/repos/vervallsweg/homelit/forks","keys_url":"https://api.github.com/repos/vervallsweg/homelit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vervallsweg/homelit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vervallsweg/homelit/teams","hooks_url":"https://api.github.com/repos/vervallsweg/homelit/hooks","issue_events_url":"https://api.github.com/repos/vervallsweg/homelit/issues/events{/number}","events_url":"https://api.github.com/repos/vervallsweg/homelit/events","assignees_url":"https://api.github.com/repos/vervallsweg/homelit/assignees{/user}","branches_url":"https://api.github.com/repos/vervallsweg/homelit/branches{/branch}","tags_url":"https://api.github.com/repos/vervallsweg/homelit/tags","blobs_url":"https://api.github.com/repos/vervallsweg/homelit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vervallsweg/homelit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vervallsweg/homelit/git/refs{/sha}","trees_url":"https://api.github.com/repos/vervallsweg/homelit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vervallsweg/homelit/statuses/{sha}","languages_url":"https://api.github.com/repos/vervallsweg/homelit/languages","stargazers_url":"https://api.github.com/repos/vervallsweg/homelit/stargazers","contributors_url":"https://api.github.com/repos/vervallsweg/homelit/contributors","subscribers_url":"https://api.github.com/repos/vervallsweg/homelit/subscribers","subscription_url":"https://api.github.com/repos/vervallsweg/homelit/subscription","commits_url":"https://api.github.com/repos/vervallsweg/homelit/commits{/sha}","git_commits_url":"https://api.github.com/repos/vervallsweg/homelit/git/commits{/sha}","comments_url":"https://api.github.com/repos/vervallsweg/homelit/comments{/number}","issue_comment_url":"https://api.github.com/repos/vervallsweg/homelit/issues/comments{/number}","contents_url":"https://api.github.com/repos/vervallsweg/homelit/contents/{+path}","compare_url":"https://api.github.com/repos/vervallsweg/homelit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vervallsweg/homelit/merges","archive_url":"https://api.github.com/repos/vervallsweg/homelit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vervallsweg/homelit/downloads","issues_url":"https://api.github.com/repos/vervallsweg/homelit/issues{/number}","pulls_url":"https://api.github.com/repos/vervallsweg/homelit/pulls{/number}","milestones_url":"https://api.github.com/repos/vervallsweg/homelit/milestones{/number}","notifications_url":"https://api.github.com/repos/vervallsweg/homelit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vervallsweg/homelit/labels{/name}","releases_url":"https://api.github.com/repos/vervallsweg/homelit/releases{/id}","deployments_url":"https://api.github.com/repos/vervallsweg/homelit/deployments","created_at":"2018-05-18T11:37:39Z","updated_at":"2018-05-18T11:37:41Z","pushed_at":"2018-05-18T11:40:13Z","git_url":"git://github.com/vervallsweg/homelit.git","ssh_url":"git@github.com:vervallsweg/homelit.git","clone_url":"https://github.com/vervallsweg/homelit.git","svn_url":"https://github.com/vervallsweg/homelit","homepage":"","size":108,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"master"}},"base":{"label":"aniceberg:master","ref":"master","sha":"b845320483e0e1ddc4f0650f1304d5b9ad9b9639","user":{"login":"aniceberg","id":646958,"avatar_url":"https://avatars2.githubusercontent.com/u/646958?v=4","gravatar_id":"","url":"https://api.github.com/users/aniceberg","html_url":"https://github.com/aniceberg","followers_url":"https://api.github.com/users/aniceberg/followers","following_url":"https://api.github.com/users/aniceberg/following{/other_user}","gists_url":"https://api.github.com/users/aniceberg/gists{/gist_id}","starred_url":"https://api.github.com/users/aniceberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aniceberg/subscriptions","organizations_url":"https://api.github.com/users/aniceberg/orgs","repos_url":"https://api.github.com/users/aniceberg/repos","events_url":"https://api.github.com/users/aniceberg/events{/privacy}","received_events_url":"https://api.github.com/users/aniceberg/received_events","type":"User","site_admin":false},"repo":{"id":128087506,"name":"homelit","full_name":"aniceberg/homelit","owner":{"login":"aniceberg","id":646958,"avatar_url":"https://avatars2.githubusercontent.com/u/646958?v=4","gravatar_id":"","url":"https://api.github.com/users/aniceberg","html_url":"https://github.com/aniceberg","followers_url":"https://api.github.com/users/aniceberg/followers","following_url":"https://api.github.com/users/aniceberg/following{/other_user}","gists_url":"https://api.github.com/users/aniceberg/gists{/gist_id}","starred_url":"https://api.github.com/users/aniceberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aniceberg/subscriptions","organizations_url":"https://api.github.com/users/aniceberg/orgs","repos_url":"https://api.github.com/users/aniceberg/repos","events_url":"https://api.github.com/users/aniceberg/events{/privacy}","received_events_url":"https://api.github.com/users/aniceberg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aniceberg/homelit","description":"HomeLit","fork":false,"url":"https://api.github.com/repos/aniceberg/homelit","forks_url":"https://api.github.com/repos/aniceberg/homelit/forks","keys_url":"https://api.github.com/repos/aniceberg/homelit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aniceberg/homelit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aniceberg/homelit/teams","hooks_url":"https://api.github.com/repos/aniceberg/homelit/hooks","issue_events_url":"https://api.github.com/repos/aniceberg/homelit/issues/events{/number}","events_url":"https://api.github.com/repos/aniceberg/homelit/events","assignees_url":"https://api.github.com/repos/aniceberg/homelit/assignees{/user}","branches_url":"https://api.github.com/repos/aniceberg/homelit/branches{/branch}","tags_url":"https://api.github.com/repos/aniceberg/homelit/tags","blobs_url":"https://api.github.com/repos/aniceberg/homelit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aniceberg/homelit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aniceberg/homelit/git/refs{/sha}","trees_url":"https://api.github.com/repos/aniceberg/homelit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aniceberg/homelit/statuses/{sha}","languages_url":"https://api.github.com/repos/aniceberg/homelit/languages","stargazers_url":"https://api.github.com/repos/aniceberg/homelit/stargazers","contributors_url":"https://api.github.com/repos/aniceberg/homelit/contributors","subscribers_url":"https://api.github.com/repos/aniceberg/homelit/subscribers","subscription_url":"https://api.github.com/repos/aniceberg/homelit/subscription","commits_url":"https://api.github.com/repos/aniceberg/homelit/commits{/sha}","git_commits_url":"https://api.github.com/repos/aniceberg/homelit/git/commits{/sha}","comments_url":"https://api.github.com/repos/aniceberg/homelit/comments{/number}","issue_comment_url":"https://api.github.com/repos/aniceberg/homelit/issues/comments{/number}","contents_url":"https://api.github.com/repos/aniceberg/homelit/contents/{+path}","compare_url":"https://api.github.com/repos/aniceberg/homelit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aniceberg/homelit/merges","archive_url":"https://api.github.com/repos/aniceberg/homelit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aniceberg/homelit/downloads","issues_url":"https://api.github.com/repos/aniceberg/homelit/issues{/number}","pulls_url":"https://api.github.com/repos/aniceberg/homelit/pulls{/number}","milestones_url":"https://api.github.com/repos/aniceberg/homelit/milestones{/number}","notifications_url":"https://api.github.com/repos/aniceberg/homelit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aniceberg/homelit/labels{/name}","releases_url":"https://api.github.com/repos/aniceberg/homelit/releases{/id}","deployments_url":"https://api.github.com/repos/aniceberg/homelit/deployments","created_at":"2018-04-04T16:08:02Z","updated_at":"2018-05-17T02:04:04Z","pushed_at":"2018-05-18T11:41:22Z","git_url":"git://github.com/aniceberg/homelit.git","ssh_url":"git@github.com:aniceberg/homelit.git","clone_url":"https://github.com/aniceberg/homelit.git","svn_url":"https://github.com/aniceberg/homelit","homepage":"","size":108,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aniceberg/homelit/pulls/1"},"html":{"href":"https://github.com/aniceberg/homelit/pull/1"},"issue":{"href":"https://api.github.com/repos/aniceberg/homelit/issues/1"},"comments":{"href":"https://api.github.com/repos/aniceberg/homelit/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/aniceberg/homelit/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/aniceberg/homelit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aniceberg/homelit/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/aniceberg/homelit/statuses/21a0d0e239aecdcb22bf8966f57b0d146347e5d3"}},"author_association":"NONE"}}
{"actor":{"display_login":"vervallsweg"}}