{"action":"created","issue":{"url":"https://api.github.com/repos/home-assistant/homebridge-homeassistant/issues/192","repository_url":"https://api.github.com/repos/home-assistant/homebridge-homeassistant","labels_url":"https://api.github.com/repos/home-assistant/homebridge-homeassistant/issues/192/labels{/name}","comments_url":"https://api.github.com/repos/home-assistant/homebridge-homeassistant/issues/192/comments","events_url":"https://api.github.com/repos/home-assistant/homebridge-homeassistant/issues/192/events","html_url":"https://github.com/home-assistant/homebridge-homeassistant/issues/192","id":244226097,"number":192,"title":"after update to 2.2.1 homebridge crashes when reloading automations","user":{"login":"rbflurry","id":22154114,"avatar_url":"https://avatars0.githubusercontent.com/u/22154114?v=4","gravatar_id":"","url":"https://api.github.com/users/rbflurry","html_url":"https://github.com/rbflurry","followers_url":"https://api.github.com/users/rbflurry/followers","following_url":"https://api.github.com/users/rbflurry/following{/other_user}","gists_url":"https://api.github.com/users/rbflurry/gists{/gist_id}","starred_url":"https://api.github.com/users/rbflurry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbflurry/subscriptions","organizations_url":"https://api.github.com/users/rbflurry/orgs","repos_url":"https://api.github.com/users/rbflurry/repos","events_url":"https://api.github.com/users/rbflurry/events{/privacy}","received_events_url":"https://api.github.com/users/rbflurry/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-07-20T02:16:43Z","updated_at":"2017-08-02T14:16:24Z","closed_at":null,"body":"I get the following error in the log.\r\n\r\n```\r\nThu, 20 Jul 2017 00:58:33 GMT EventedHTTPServer Server listening on port 51826\r\n/usr/lib/node_modules/homebridge-homeassistant/accessories/switch.js:26\r\n        .setValue(newState.state === 'on', null, 'internal');\r\n                          ^\r\n\r\nTypeError: Cannot read property 'state' of null\r\n    at Object.onEvent (/usr/lib/node_modules/homebridge-homeassistant/accessories/switch.js:26:27)\r\n    at EventSource.<anonymous> (/usr/lib/node_modules/homebridge-homeassistant/index.js:58:19)\r\n    at emitOne (events.js:77:13)\r\n    at EventSource.emit (events.js:169:7)\r\n    at _emit (/usr/lib/node_modules/homebridge-homeassistant/node_modules/eventsource/lib/eventsource.js:186:17)\r\n    at parseEventStreamLine (/usr/lib/node_modules/homebridge-homeassistant/node_modules/eventsource/lib/eventsource.js:201:9)\r\n    at IncomingMessage.<anonymous> (/usr/lib/node_modules/homebridge-homeassistant/node_modules/eventsource/lib/eventsource.js:164:11)\r\n    at emitOne (events.js:77:13)\r\n    at IncomingMessage.emit (events.js:169:7)\r\n    at readableAddChunk (_stream_readable.js:153:18)\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/home-assistant/homebridge-homeassistant/issues/comments/319685855","html_url":"https://github.com/home-assistant/homebridge-homeassistant/issues/192#issuecomment-319685855","issue_url":"https://api.github.com/repos/home-assistant/homebridge-homeassistant/issues/192","id":319685855,"user":{"login":"rbflurry","id":22154114,"avatar_url":"https://avatars0.githubusercontent.com/u/22154114?v=4","gravatar_id":"","url":"https://api.github.com/users/rbflurry","html_url":"https://github.com/rbflurry","followers_url":"https://api.github.com/users/rbflurry/followers","following_url":"https://api.github.com/users/rbflurry/following{/other_user}","gists_url":"https://api.github.com/users/rbflurry/gists{/gist_id}","starred_url":"https://api.github.com/users/rbflurry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbflurry/subscriptions","organizations_url":"https://api.github.com/users/rbflurry/orgs","repos_url":"https://api.github.com/users/rbflurry/repos","events_url":"https://api.github.com/users/rbflurry/events{/privacy}","received_events_url":"https://api.github.com/users/rbflurry/received_events","type":"User","site_admin":false},"created_at":"2017-08-02T14:16:24Z","updated_at":"2017-08-02T14:16:24Z","body":"This also seems to happen when groups are reloaded. Anyone else setting this?"}}
{"actor":{"display_login":"rbflurry"}}