{"action":"created","issue":{"url":"https://api.github.com/repos/domoticz/domoticz/issues/459","repository_url":"https://api.github.com/repos/domoticz/domoticz","labels_url":"https://api.github.com/repos/domoticz/domoticz/issues/459/labels{/name}","comments_url":"https://api.github.com/repos/domoticz/domoticz/issues/459/comments","events_url":"https://api.github.com/repos/domoticz/domoticz/issues/459/events","html_url":"https://github.com/domoticz/domoticz/issues/459","id":132660259,"number":459,"title":"expand json api for selector switch names","user":{"login":"nayrnet","id":3732081,"avatar_url":"https://avatars.githubusercontent.com/u/3732081?v=3","gravatar_id":"","url":"https://api.github.com/users/nayrnet","html_url":"https://github.com/nayrnet","followers_url":"https://api.github.com/users/nayrnet/followers","following_url":"https://api.github.com/users/nayrnet/following{/other_user}","gists_url":"https://api.github.com/users/nayrnet/gists{/gist_id}","starred_url":"https://api.github.com/users/nayrnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nayrnet/subscriptions","organizations_url":"https://api.github.com/users/nayrnet/orgs","repos_url":"https://api.github.com/users/nayrnet/repos","events_url":"https://api.github.com/users/nayrnet/events{/privacy}","received_events_url":"https://api.github.com/users/nayrnet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-02-10T10:28:21Z","updated_at":"2016-02-15T08:16:18Z","closed_at":null,"body":"this is an enhancement request to extend the API to include level names, for example the MQTT API publishes the following JSON for a selector switch change that includes the switch name and level, but no indication of what friendly name that level has configured.\r\n\r\n`{\"Battery\":255,\"RSSI\":12,\"dtype\":\"Light/Switch\",\"id\":\"000140E0\",\"idx\":145,\"name\":\"TV\",\"nvalue\":2,\"stype\":\"Selector Switch\",\"svalue1\":\"40\",\"switchType\":\"Selector\",\"unit\":1}`\r\n\r\nRequest it to be extended to include an element with levelName, as such:\r\n\r\n`{\"Battery\":255,\"RSSI\":12,\"dtype\":\"Light/Switch\",\"id\":\"000140E0\",\"idx\":145,\"name\":\"TV\",\"levelName\":\"Security Cameras\",\"nvalue\":2,\"stype\":\"Selector Switch\",\"svalue1\":\"40\",\"switchType\":\"Selector\",\"unit\":1}`\r\n\r\nFor example with my Pioneer AVR interface I include the level name in an array so I can have a friendly log name.. with the name exposed via JSON I could simply map that string to the input level and people can change the name alone through the UI.\r\n\r\nI imagine custom interfaces using the JSON API would like to know what the level names are instead of a numerical value."},"comment":{"url":"https://api.github.com/repos/domoticz/domoticz/issues/comments/184107845","html_url":"https://github.com/domoticz/domoticz/issues/459#issuecomment-184107845","issue_url":"https://api.github.com/repos/domoticz/domoticz/issues/459","id":184107845,"user":{"login":"nayrnet","id":3732081,"avatar_url":"https://avatars.githubusercontent.com/u/3732081?v=3","gravatar_id":"","url":"https://api.github.com/users/nayrnet","html_url":"https://github.com/nayrnet","followers_url":"https://api.github.com/users/nayrnet/followers","following_url":"https://api.github.com/users/nayrnet/following{/other_user}","gists_url":"https://api.github.com/users/nayrnet/gists{/gist_id}","starred_url":"https://api.github.com/users/nayrnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nayrnet/subscriptions","organizations_url":"https://api.github.com/users/nayrnet/orgs","repos_url":"https://api.github.com/users/nayrnet/repos","events_url":"https://api.github.com/users/nayrnet/events{/privacy}","received_events_url":"https://api.github.com/users/nayrnet/received_events","type":"User","site_admin":false},"created_at":"2016-02-15T08:16:18Z","updated_at":"2016-02-15T08:16:18Z","body":"thanks for adding this, I am trying to test it but my build is failing.. see: https://github.com/domoticz/domoticz/commit/297b11e62c1e285c54a6152bd8f6b7567b70c7a6#commitcomment-16089333"}}