{"action":"created","issue":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/2949","repository_url":"https://api.github.com/repos/home-assistant/home-assistant","labels_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/2949/labels{/name}","comments_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/2949/comments","events_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/2949/events","html_url":"https://github.com/home-assistant/home-assistant/pull/2949","id":172817321,"number":2949,"title":"SleepIQ component with sensor and binary sensor platforms","user":{"login":"technicalpickles","id":159,"avatar_url":"https://avatars.githubusercontent.com/u/159?v=3","gravatar_id":"","url":"https://api.github.com/users/technicalpickles","html_url":"https://github.com/technicalpickles","followers_url":"https://api.github.com/users/technicalpickles/followers","following_url":"https://api.github.com/users/technicalpickles/following{/other_user}","gists_url":"https://api.github.com/users/technicalpickles/gists{/gist_id}","starred_url":"https://api.github.com/users/technicalpickles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/technicalpickles/subscriptions","organizations_url":"https://api.github.com/users/technicalpickles/orgs","repos_url":"https://api.github.com/users/technicalpickles/repos","events_url":"https://api.github.com/users/technicalpickles/events{/privacy}","received_events_url":"https://api.github.com/users/technicalpickles/received_events","type":"User","site_admin":true},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-08-23T21:56:21Z","updated_at":"2016-09-03T23:41:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/2949","html_url":"https://github.com/home-assistant/home-assistant/pull/2949","diff_url":"https://github.com/home-assistant/home-assistant/pull/2949.diff","patch_url":"https://github.com/home-assistant/home-assistant/pull/2949.patch"},"body":"**Description:**\r\n\r\nMy bed has an API, so obviously I want to integrate it into homeassistant :D SleepNumber beds have an addon called [SleepIQ](http://www.sleepnumber.com/sn/en/sleepiq-sleep-tracker). It tracks sleep over time, and in particular, it does know if you are in bed or not, and it knows your 'SleepNumber' (firmness of the mattress). There are controls for changing the incline of the frame, and firmness, but it requires using bluetooth near the bed, and doesn't seem to be exposed by the API (I wrote the library sleepyq for interacting it, and made some notes: https://github.com/technicalpickles/sleepyq).\r\n\r\nThis is my first component, and my first real python, so definitely looking for feedback both in terms of style & implementation details. I started discussion about this over in https://community.home-assistant.io/t/feedback-on-component-for-sleepiq-beds/3132\r\n\r\n\r\n**Pull request in [home-assistant.io](https://github.com/home-assistant/home-assistant.io) with documentation (if applicable):** https://github.com/home-assistant/home-assistant/pull/2949\r\n\r\n**Example entry for `configuration.yaml` (if applicable):**\r\n```yaml\r\nsleepiq:\r\n  login: !secret sleepiq_login\r\n  password: !secret sleepiq_password\r\n```\r\n\r\n**Checklist:**\r\n\r\nIf user exposed functionality or configuration variables are added/changed:\r\n  - [x] Documentation added/updated in [home-assistant.io](https://github.com/home-assistant/home-assistant.io)\r\n\r\nIf code communicates with devices, web services, or a:\r\n  - [x] Local tests with `tox` run successfully. **Your PR cannot be merged unless tests pass**\r\n  - [x] New dependencies have been added to the `REQUIREMENTS` variable ([example][ex-requir]).\r\n  - [x] New dependencies are only imported inside functions that use them ([example][ex-import]).\r\n  - [x] New dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.\r\n  - [x] New files were added to `.coveragerc`.\r\n\r\n\r\n[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard.py#L16\r\n[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard.py#L51\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/comments/244575928","html_url":"https://github.com/home-assistant/home-assistant/pull/2949#issuecomment-244575928","issue_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/2949","id":244575928,"user":{"login":"robbiet480","id":18516,"avatar_url":"https://avatars.githubusercontent.com/u/18516?v=3","gravatar_id":"","url":"https://api.github.com/users/robbiet480","html_url":"https://github.com/robbiet480","followers_url":"https://api.github.com/users/robbiet480/followers","following_url":"https://api.github.com/users/robbiet480/following{/other_user}","gists_url":"https://api.github.com/users/robbiet480/gists{/gist_id}","starred_url":"https://api.github.com/users/robbiet480/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robbiet480/subscriptions","organizations_url":"https://api.github.com/users/robbiet480/orgs","repos_url":"https://api.github.com/users/robbiet480/repos","events_url":"https://api.github.com/users/robbiet480/events{/privacy}","received_events_url":"https://api.github.com/users/robbiet480/received_events","type":"User","site_admin":false},"created_at":"2016-09-03T23:41:04Z","updated_at":"2016-09-03T23:41:04Z","body":"@technicalpickles This looks good to merge for me. However, I owe you a new `sensor_class`. Want to pick out an occupied and not occupied icon from [MDI](https://materialdesignicons.com) and i'll get it integrated into the frontend?"}}
{"actor":{"display_login":"robbiet480"}}