{"action":"created","issue":{"url":"https://api.github.com/repos/pnbruckner/homeassistant-config/issues/1","repository_url":"https://api.github.com/repos/pnbruckner/homeassistant-config","labels_url":"https://api.github.com/repos/pnbruckner/homeassistant-config/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/pnbruckner/homeassistant-config/issues/1/comments","events_url":"https://api.github.com/repos/pnbruckner/homeassistant-config/issues/1/events","html_url":"https://github.com/pnbruckner/homeassistant-config/issues/1","id":344461629,"node_id":"MDU6SXNzdWUzNDQ0NjE2Mjk=","number":1,"title":"Philips Hue - color_temp","user":{"login":"colonelmattyman","id":12750307,"node_id":"MDQ6VXNlcjEyNzUwMzA3","avatar_url":"https://avatars1.githubusercontent.com/u/12750307?v=4","gravatar_id":"","url":"https://api.github.com/users/colonelmattyman","html_url":"https://github.com/colonelmattyman","followers_url":"https://api.github.com/users/colonelmattyman/followers","following_url":"https://api.github.com/users/colonelmattyman/following{/other_user}","gists_url":"https://api.github.com/users/colonelmattyman/gists{/gist_id}","starred_url":"https://api.github.com/users/colonelmattyman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colonelmattyman/subscriptions","organizations_url":"https://api.github.com/users/colonelmattyman/orgs","repos_url":"https://api.github.com/users/colonelmattyman/repos","events_url":"https://api.github.com/users/colonelmattyman/events{/privacy}","received_events_url":"https://api.github.com/users/colonelmattyman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-25T14:13:03Z","updated_at":"2018-08-08T14:56:36Z","closed_at":null,"author_association":"NONE","body":"Dude this is awesome.  Although I came across an issue where if the lights colour had been set by HA's color_temp slider, only the brightness value was saved because when this slider is used the RGB/hs_color values are left empty.   I'm using Philips Hue so it might be different with other lights?\r\n\r\nEssentially to fix this, I added the color_temp field to the attributes. \r\n \r\nI changed line 13 from\r\n```\r\nLIGHT_ATTRS = [ATTR_BRIGHTNESS, ATTR_HS_COLOR]\r\n```\r\nto\r\n```\r\nATTR_HS_COLORTEMP = \"color_temp\"\r\nLIGHT_ATTRS = [ATTR_BRIGHTNESS, ATTR_HS_COLOR, ATTR_HS_COLORTEMP]\r\n```\r\n\r\nI've adjusted your script below and have linked it:\r\n[light_store.txt](https://github.com/pnbruckner/homeassistant-config/files/2228157/light_store.txt)\r\n"},"comment":{"url":"https://api.github.com/repos/pnbruckner/homeassistant-config/issues/comments/411435920","html_url":"https://github.com/pnbruckner/homeassistant-config/issues/1#issuecomment-411435920","issue_url":"https://api.github.com/repos/pnbruckner/homeassistant-config/issues/1","id":411435920,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTQzNTkyMA==","user":{"login":"pnbruckner","id":36015321,"node_id":"MDQ6VXNlcjM2MDE1MzIx","avatar_url":"https://avatars2.githubusercontent.com/u/36015321?v=4","gravatar_id":"","url":"https://api.github.com/users/pnbruckner","html_url":"https://github.com/pnbruckner","followers_url":"https://api.github.com/users/pnbruckner/followers","following_url":"https://api.github.com/users/pnbruckner/following{/other_user}","gists_url":"https://api.github.com/users/pnbruckner/gists{/gist_id}","starred_url":"https://api.github.com/users/pnbruckner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pnbruckner/subscriptions","organizations_url":"https://api.github.com/users/pnbruckner/orgs","repos_url":"https://api.github.com/users/pnbruckner/repos","events_url":"https://api.github.com/users/pnbruckner/events{/privacy}","received_events_url":"https://api.github.com/users/pnbruckner/received_events","type":"User","site_admin":false},"created_at":"2018-08-08T14:56:36Z","updated_at":"2018-08-08T14:56:36Z","author_association":"OWNER","body":"Sorry, didn't see this. I didn't get an e-mail from github; I thought I would. Hmm.\r\n\r\nAnyway, thanks. And, yes, it seems some light platforms provide different color attributes than hs_color. Some I've even seen provide more than one color attribute - but they don't agree! And I've seen in recent releases that the light component is treating these various color attributes differently. So I'm not sure what the best long term solution is. E.g., if the script saves any and all color attributes that a light entity provides, but those disagree, what happens when the restore operation tries to set them all?"}}
{"actor":{"display_login":"pnbruckner"}}