{"action":"created","issue":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/12924","repository_url":"https://api.github.com/repos/home-assistant/home-assistant","labels_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/12924/labels{/name}","comments_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/12924/comments","events_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/12924/events","html_url":"https://github.com/home-assistant/home-assistant/pull/12924","id":302377675,"number":12924,"title":"Expicitly send Zigbee \"Turn On\" command after \"move_to_level_with_on_off\" command","user":{"login":"Adminiuga","id":5826160,"avatar_url":"https://avatars1.githubusercontent.com/u/5826160?v=4","gravatar_id":"","url":"https://api.github.com/users/Adminiuga","html_url":"https://github.com/Adminiuga","followers_url":"https://api.github.com/users/Adminiuga/followers","following_url":"https://api.github.com/users/Adminiuga/following{/other_user}","gists_url":"https://api.github.com/users/Adminiuga/gists{/gist_id}","starred_url":"https://api.github.com/users/Adminiuga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Adminiuga/subscriptions","organizations_url":"https://api.github.com/users/Adminiuga/orgs","repos_url":"https://api.github.com/users/Adminiuga/repos","events_url":"https://api.github.com/users/Adminiuga/events{/privacy}","received_events_url":"https://api.github.com/users/Adminiuga/received_events","type":"User","site_admin":false},"labels":[{"id":527871105,"url":"https://api.github.com/repos/home-assistant/home-assistant/labels/cla-signed","name":"cla-signed","color":"008000","default":false},{"id":548457119,"url":"https://api.github.com/repos/home-assistant/home-assistant/labels/platform:%20light.zha","name":"platform: light.zha","color":"ededed","default":false},{"id":832964196,"url":"https://api.github.com/repos/home-assistant/home-assistant/labels/small-pr","name":"small-pr","color":"e5bd7e","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-03-05T16:52:32Z","updated_at":"2018-05-01T18:47:48Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/12924","html_url":"https://github.com/home-assistant/home-assistant/pull/12924","diff_url":"https://github.com/home-assistant/home-assistant/pull/12924.diff","patch_url":"https://github.com/home-assistant/home-assistant/pull/12924.patch"},"body":"## Description:\r\nCurrently, light.turn_on service turns on dimmable ZHA lights by issuing \"move_to_level_with_on_off\" command to cluster 0x0008 -- Level Control. Per [ZCL Specs](http://www.zigbee.org/~zigbeeor/wp-content/uploads/2014/10/07-5123-06-zigbee-cluster-library-specification.pdf) section 3.10.2.4.5, the light is supposed to turn on, if the brightness level is increased. Some dimmable lights ignore this provision and turn on the light upon receiving \"move_to_level_with_on_off\" regardless of the new level, but not [45857GE Zigbee in-wall smart dimmer](https://byjasco.com/products/ge-zigbee-wall-smart-dimmer), which will switch on the lights with \"move_to_level_with_on_off\" only if the new level is greater than the current/last one. \r\n\r\nThis commit changes behavior, so light.turn_on service always sends \"on\" command for dimmable lights/switches, after issuing \"move_to_level_with_on_off\" command. For dimmable lights which switch on with \"move_to_level_with_on_off\" regardless of the level, this change effectively does nothing, since the light will be already on. For dimmable lights which won't switch on upon \"move_to_level_with_on_off\" (45857GE) it switches the light on specifically after setting the desired level.\r\n\r\n**Related issue (if applicable):** fixes #12813\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#<home-assistant.github.io PR number goes here>\r\n\r\n## Example entry for `configuration.yaml` (if applicable):\r\n```yaml\r\n\r\n```\r\n\r\n## Checklist:\r\n  - [X] The code change is tested and works locally.\r\n\r\nIf user exposed functionality or configuration variables are added/changed:\r\n  - [ ] 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  - [ ] Local tests with `tox` run successfully. **Your PR cannot be merged unless tests pass**\r\n  - [n/a] New dependencies have been added to the `REQUIREMENTS` variable ([example][ex-requir]).\r\n  - [n/a] New dependencies are only imported inside functions that use them ([example][ex-import]).\r\n  - [n/a] New dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.\r\n  - [n/a] 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#L14\r\n[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard.py#L54\r\n"},"comment":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/comments/385754470","html_url":"https://github.com/home-assistant/home-assistant/pull/12924#issuecomment-385754470","issue_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/12924","id":385754470,"user":{"login":"balloob","id":1444314,"avatar_url":"https://avatars3.githubusercontent.com/u/1444314?v=4","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},"created_at":"2018-05-01T18:47:48Z","updated_at":"2018-05-01T18:47:48Z","author_association":"OWNER","body":"@rcloran could you make a decision if we should move forward or close this PR?"}}
{"actor":{"display_login":"balloob"}}