{"action":"opened","issue":{"url":"https://api.github.com/repos/letscontrolit/ESPEasy/issues/993","repository_url":"https://api.github.com/repos/letscontrolit/ESPEasy","labels_url":"https://api.github.com/repos/letscontrolit/ESPEasy/issues/993/labels{/name}","comments_url":"https://api.github.com/repos/letscontrolit/ESPEasy/issues/993/comments","events_url":"https://api.github.com/repos/letscontrolit/ESPEasy/issues/993/events","html_url":"https://github.com/letscontrolit/ESPEasy/issues/993","id":301918757,"number":993,"title":"Add %unit% variable in MQTT subscribe topic","user":{"login":"kluszczyn","id":5705847,"avatar_url":"https://avatars1.githubusercontent.com/u/5705847?v=4","gravatar_id":"","url":"https://api.github.com/users/kluszczyn","html_url":"https://github.com/kluszczyn","followers_url":"https://api.github.com/users/kluszczyn/followers","following_url":"https://api.github.com/users/kluszczyn/following{/other_user}","gists_url":"https://api.github.com/users/kluszczyn/gists{/gist_id}","starred_url":"https://api.github.com/users/kluszczyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kluszczyn/subscriptions","organizations_url":"https://api.github.com/users/kluszczyn/orgs","repos_url":"https://api.github.com/users/kluszczyn/repos","events_url":"https://api.github.com/users/kluszczyn/events{/privacy}","received_events_url":"https://api.github.com/users/kluszczyn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-02T22:00:07Z","updated_at":"2018-03-02T22:00:07Z","closed_at":null,"author_association":"NONE","body":"**NOTE: This is not a support forum! For questions and support go here: https://www.letscontrolit.com/forum/viewforum.php?f=1**\r\n\r\n### Steps to reproduce\r\nChange default subscribe MQTT topics (tested with OpenHAB controller) from /%sysname%/# to /%unit%/#. Variable %unit% will not be resolved to a unit number.\r\n\r\n### Expected behavior\r\nParse variable %unit%  in MQTT _subscribe topic_. \r\n\r\n### Actual behavior\r\nCurrently, only %sysname% in MQTT _subscribe topic_ is parsed into variable value.\r\nOther sys variables are not parsed. \r\n\r\nParsing %unit% variable (or maybe other sys variables also, like %ip% or %mac%) would add flexibility for manipulating MQTT messages in controllers like OpenHAB. Changing unit name would not require changes in OpenHAB items definitions.\r\n\r\n### System configuration\r\n\r\nHardware:\r\nESP12F\r\n\r\nSoftware or git version:\r\nESPEasy_mega-20180224 precompiled image\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"kluszczyn"}}