{"action":"created","issue":{"url":"https://api.github.com/repos/rytilahti/python-yeelightbt/issues/21","repository_url":"https://api.github.com/repos/rytilahti/python-yeelightbt","labels_url":"https://api.github.com/repos/rytilahti/python-yeelightbt/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/rytilahti/python-yeelightbt/issues/21/comments","events_url":"https://api.github.com/repos/rytilahti/python-yeelightbt/issues/21/events","html_url":"https://github.com/rytilahti/python-yeelightbt/issues/21","id":356671384,"node_id":"MDU6SXNzdWUzNTY2NzEzODQ=","number":21,"title":"Question about light temperature ","user":{"login":"pszafer","id":690510,"node_id":"MDQ6VXNlcjY5MDUxMA==","avatar_url":"https://avatars1.githubusercontent.com/u/690510?v=4","gravatar_id":"","url":"https://api.github.com/users/pszafer","html_url":"https://github.com/pszafer","followers_url":"https://api.github.com/users/pszafer/followers","following_url":"https://api.github.com/users/pszafer/following{/other_user}","gists_url":"https://api.github.com/users/pszafer/gists{/gist_id}","starred_url":"https://api.github.com/users/pszafer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pszafer/subscriptions","organizations_url":"https://api.github.com/users/pszafer/orgs","repos_url":"https://api.github.com/users/pszafer/repos","events_url":"https://api.github.com/users/pszafer/events{/privacy}","received_events_url":"https://api.github.com/users/pszafer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-04T06:38:50Z","updated_at":"2018-09-04T14:34:50Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI have Xiaomi Bedside lamp and your library after set colour is always returning \"temperature 0\".\r\nIf I set temp by app it returns proper light temp, at least looks like K.\r\nIs it some different unit or why is it 0?"},"comment":{"url":"https://api.github.com/repos/rytilahti/python-yeelightbt/issues/comments/418390405","html_url":"https://github.com/rytilahti/python-yeelightbt/issues/21#issuecomment-418390405","issue_url":"https://api.github.com/repos/rytilahti/python-yeelightbt/issues/21","id":418390405,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODM5MDQwNQ==","user":{"login":"pszafer","id":690510,"node_id":"MDQ6VXNlcjY5MDUxMA==","avatar_url":"https://avatars1.githubusercontent.com/u/690510?v=4","gravatar_id":"","url":"https://api.github.com/users/pszafer","html_url":"https://github.com/pszafer","followers_url":"https://api.github.com/users/pszafer/followers","following_url":"https://api.github.com/users/pszafer/following{/other_user}","gists_url":"https://api.github.com/users/pszafer/gists{/gist_id}","starred_url":"https://api.github.com/users/pszafer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pszafer/subscriptions","organizations_url":"https://api.github.com/users/pszafer/orgs","repos_url":"https://api.github.com/users/pszafer/repos","events_url":"https://api.github.com/users/pszafer/events{/privacy}","received_events_url":"https://api.github.com/users/pszafer/received_events","type":"User","site_admin":false},"created_at":"2018-09-04T14:34:50Z","updated_at":"2018-09-04T14:34:50Z","author_association":"NONE","body":"Bluetooth only, so first generation I think.\r\nI'm asking because for some reason google_assistant component in HA is trying to get light temperature, and if it is then I've got division by 0 error.\r\n\r\nI've changed it to somethink like this for now in _status_cb:\r\n```\r\n        else:\r\n            if self._dev.temperature > 0:\r\n                self._ct = int(kelvin_to_mired(self._dev.temperature))\r\n            else:\r\n                self._ct = int(kelvin_to_mired(2400))\r\n```\r\n\r\nbut for me it somehow no logical that I got temperature 0, it should always return some K temp in any light mode."}}
{"actor":{"display_login":"pszafer"}}