{"action":"created","issue":{"url":"https://api.github.com/repos/i8beef/HomeAutio.Mqtt.GoogleHome/issues/30","repository_url":"https://api.github.com/repos/i8beef/HomeAutio.Mqtt.GoogleHome","labels_url":"https://api.github.com/repos/i8beef/HomeAutio.Mqtt.GoogleHome/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/i8beef/HomeAutio.Mqtt.GoogleHome/issues/30/comments","events_url":"https://api.github.com/repos/i8beef/HomeAutio.Mqtt.GoogleHome/issues/30/events","html_url":"https://github.com/i8beef/HomeAutio.Mqtt.GoogleHome/issues/30","id":393769764,"node_id":"MDU6SXNzdWUzOTM3Njk3NjQ=","number":30,"title":"ColorSetting trait, HSV colorModel","user":{"login":"shady2k","id":3366415,"node_id":"MDQ6VXNlcjMzNjY0MTU=","avatar_url":"https://avatars2.githubusercontent.com/u/3366415?v=4","gravatar_id":"","url":"https://api.github.com/users/shady2k","html_url":"https://github.com/shady2k","followers_url":"https://api.github.com/users/shady2k/followers","following_url":"https://api.github.com/users/shady2k/following{/other_user}","gists_url":"https://api.github.com/users/shady2k/gists{/gist_id}","starred_url":"https://api.github.com/users/shady2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shady2k/subscriptions","organizations_url":"https://api.github.com/users/shady2k/orgs","repos_url":"https://api.github.com/users/shady2k/repos","events_url":"https://api.github.com/users/shady2k/events{/privacy}","received_events_url":"https://api.github.com/users/shady2k/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-12-23T18:06:24Z","updated_at":"2018-12-25T07:36:44Z","closed_at":null,"author_association":"NONE","body":"In the template \"action.devices.traits.ColorSetting\" trait:\r\n```\r\n{\r\n  \"action.devices.commands.ColorAbsolute\": {\r\n    \"color.spectrumHSV.hue\": \"MQTT_COMMAND_TOPIC\",\r\n    \"color.spectrumHSV.saturation\": \"MQTT_COMMAND_TOPIC\",\r\n    \"color.spectrumHSV.value\": \"MQTT_COMMAND_TOPIC\"\r\n  }\r\n}\r\n```\r\nBut from Google we received:\r\n![image](https://user-images.githubusercontent.com/3366415/50386377-01987180-06f6-11e9-97d0-c647bff0492e.png)\r\n\r\nTemplate needs to be like:\r\n```\r\n{\r\n  \"action.devices.commands.ColorAbsolute\": {\r\n    \"color.spectrumHSV\": {\r\n      \"hue\": \"MQTT_COMMAND_TOPIC\",\r\n      \"saturation\": \"MQTT_COMMAND_TOPIC\",\r\n      \"value\": \"MQTT_COMMAND_TOPIC\"\r\n    }\r\n  }\r\n}\r\n```\r\nIt's right? If use template, MQTT commands does not sent, because condition does not true on line 162 MqttService.cs:\r\n`if (deviceSupportedCommandParams.ContainsKey(parameter.Key))`\r\n\r\nSame problem with state in template:\r\n```\r\n{\r\n  \"color.spectrumHSV.hue\": {\r\n    \"topic\": \"MQTT_COMMAND_TOPIC\",\r\n    \"googleType\": \"numeric\",\r\n    \"valueMap\": null\r\n  },\r\n  \"color.spectrumHSV.saturation\": {\r\n    \"topic\": \"MQTT_COMMAND_TOPIC\",\r\n    \"googleType\": \"numeric\",\r\n    \"valueMap\": null\r\n  },\r\n  \"color.spectrumHSV.value\": {\r\n    \"topic\": \"MQTT_COMMAND_TOPIC\",\r\n    \"googleType\": \"numeric\",\r\n    \"valueMap\": null\r\n  }\r\n}\r\n```\r\n\r\nBut it throw error in Device.cs on line 77:\r\n```\r\n                    // Parameter is a cmplex object\r\n                    var complexParameterParts = stateParam.Key.Split('.');\r\n                    if (complexParameterParts.Count() > 2)\r\n                        throw new System.Exception(\"Status key contained more than one '.'\");\r\n```\r\n\r\nBecause complexParameterParts contains:\r\n | complexParameterParts | {string[3]} | string[]\r\n  | [0] | \"color\" | string\r\n  | [1] | \"spectrumHSV\" | string\r\n  | [2] | \"hue\" | string"},"comment":{"url":"https://api.github.com/repos/i8beef/HomeAutio.Mqtt.GoogleHome/issues/comments/449817579","html_url":"https://github.com/i8beef/HomeAutio.Mqtt.GoogleHome/issues/30#issuecomment-449817579","issue_url":"https://api.github.com/repos/i8beef/HomeAutio.Mqtt.GoogleHome/issues/30","id":449817579,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTgxNzU3OQ==","user":{"login":"shady2k","id":3366415,"node_id":"MDQ6VXNlcjMzNjY0MTU=","avatar_url":"https://avatars2.githubusercontent.com/u/3366415?v=4","gravatar_id":"","url":"https://api.github.com/users/shady2k","html_url":"https://github.com/shady2k","followers_url":"https://api.github.com/users/shady2k/followers","following_url":"https://api.github.com/users/shady2k/following{/other_user}","gists_url":"https://api.github.com/users/shady2k/gists{/gist_id}","starred_url":"https://api.github.com/users/shady2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shady2k/subscriptions","organizations_url":"https://api.github.com/users/shady2k/orgs","repos_url":"https://api.github.com/users/shady2k/repos","events_url":"https://api.github.com/users/shady2k/events{/privacy}","received_events_url":"https://api.github.com/users/shady2k/received_events","type":"User","site_admin":false},"created_at":"2018-12-25T07:36:44Z","updated_at":"2018-12-25T07:36:44Z","author_association":"NONE","body":"You are right. Maybe program won't send state queries to Home Graph, until state cache does not have all items? Otherwise message will be invalid."}}
{"actor":{"display_login":"shady2k"}}