{"action":"created","issue":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/4473","repository_url":"https://api.github.com/repos/home-assistant/home-assistant","labels_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/4473/labels{/name}","comments_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/4473/comments","events_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/4473/events","html_url":"https://github.com/home-assistant/home-assistant/pull/4473","id":190535528,"number":4473,"title":"LiteJet: Unit tests and new trigger options held_more_than and held_less_than.","user":{"login":"joncar","id":11139263,"avatar_url":"https://avatars.githubusercontent.com/u/11139263?v=3","gravatar_id":"","url":"https://api.github.com/users/joncar","html_url":"https://github.com/joncar","followers_url":"https://api.github.com/users/joncar/followers","following_url":"https://api.github.com/users/joncar/following{/other_user}","gists_url":"https://api.github.com/users/joncar/gists{/gist_id}","starred_url":"https://api.github.com/users/joncar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joncar/subscriptions","organizations_url":"https://api.github.com/users/joncar/orgs","repos_url":"https://api.github.com/users/joncar/repos","events_url":"https://api.github.com/users/joncar/events{/privacy}","received_events_url":"https://api.github.com/users/joncar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"balloob","id":1444314,"avatar_url":"https://avatars.githubusercontent.com/u/1444314?v=3","gravatar_id":"","url":"https://api.github.com/users/balloob","html_url":"https://github.com/balloob","followers_url":"https://api.github.com/users/balloob/followers","following_url":"https://api.github.com/users/balloob/following{/other_user}","gists_url":"https://api.github.com/users/balloob/gists{/gist_id}","starred_url":"https://api.github.com/users/balloob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balloob/subscriptions","organizations_url":"https://api.github.com/users/balloob/orgs","repos_url":"https://api.github.com/users/balloob/repos","events_url":"https://api.github.com/users/balloob/events{/privacy}","received_events_url":"https://api.github.com/users/balloob/received_events","type":"User","site_admin":false},"assignees":[{"login":"balloob","id":1444314,"avatar_url":"https://avatars.githubusercontent.com/u/1444314?v=3","gravatar_id":"","url":"https://api.github.com/users/balloob","html_url":"https://github.com/balloob","followers_url":"https://api.github.com/users/balloob/followers","following_url":"https://api.github.com/users/balloob/following{/other_user}","gists_url":"https://api.github.com/users/balloob/gists{/gist_id}","starred_url":"https://api.github.com/users/balloob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balloob/subscriptions","organizations_url":"https://api.github.com/users/balloob/orgs","repos_url":"https://api.github.com/users/balloob/repos","events_url":"https://api.github.com/users/balloob/events{/privacy}","received_events_url":"https://api.github.com/users/balloob/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2016-11-20T02:49:17Z","updated_at":"2016-11-24T07:48:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/4473","html_url":"https://github.com/home-assistant/home-assistant/pull/4473","diff_url":"https://github.com/home-assistant/home-assistant/pull/4473.diff","patch_url":"https://github.com/home-assistant/home-assistant/pull/4473.patch"},"body":"**Description:**\r\nLiteJet: Unit tests and new trigger options held_more_than and held_less_than.\r\n\r\n* Unit tests for the LiteJet component and associated platforms. Coverage is almost 100% -- just misses one line.\r\n* The automation LiteJet trigger returns an empty \"removal\" function to ensure the automation base is happy with it. The pylitejet library doesn't actually support a real removal.\r\n* The automation LiteJet trigger can detect hold time and act appropriately to support things like short tap or long hold.\r\n\r\n**Related issue (if applicable):** none\r\n\r\n**Pull request in [home-assistant.github.io](https://github.com/home-assistant/home-assistant.github.io) with documentation (if applicable):** home-assistant/home-assistant.github.io#1463\r\n\r\n**Example entry for `configuration.yaml` (if applicable):**\r\n```yaml\r\nautomation:\r\n- trigger:\r\n    platform: litejet\r\n    number: 55\r\n    held_more_than:\r\n      milliseconds: 1000\r\n    held_less_than:\r\n      milliseconds: 2000\r\n  ...\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.github.io](https://github.com/home-assistant/home-assistant.github.io)\r\n\r\nIf the code communicates with devices, web services, or third-party tools:\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\nIf the code does not interact with devices:\r\n  - [ ] Local tests with `tox` run successfully. **Your PR cannot be merged unless tests pass**\r\n  - [ ] Tests have been added to verify that the new code works.\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/262711015","html_url":"https://github.com/home-assistant/home-assistant/pull/4473#issuecomment-262711015","issue_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/4473","id":262711015,"user":{"login":"joncar","id":11139263,"avatar_url":"https://avatars.githubusercontent.com/u/11139263?v=3","gravatar_id":"","url":"https://api.github.com/users/joncar","html_url":"https://github.com/joncar","followers_url":"https://api.github.com/users/joncar/followers","following_url":"https://api.github.com/users/joncar/following{/other_user}","gists_url":"https://api.github.com/users/joncar/gists{/gist_id}","starred_url":"https://api.github.com/users/joncar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joncar/subscriptions","organizations_url":"https://api.github.com/users/joncar/orgs","repos_url":"https://api.github.com/users/joncar/repos","events_url":"https://api.github.com/users/joncar/events{/privacy}","received_events_url":"https://api.github.com/users/joncar/received_events","type":"User","site_admin":false},"created_at":"2016-11-24T07:48:55Z","updated_at":"2016-11-24T07:48:55Z","body":"Whoops, my bad on the 3.5 tests. A number of other test modules are unreliable on the VM that I use for running the test suite and I only looked at the 3.4 failures in detail to make sure none were mine.\r\n\r\nIt should be all fixed up now with my latest changes. You are right that the latest discovery changes made `block_till_done` sufficient for my tests to pass so I was able to remove those hacks."}}
{"actor":{"display_login":"joncar"}}