{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse/smarthome/issues/886","repository_url":"https://api.github.com/repos/eclipse/smarthome","labels_url":"https://api.github.com/repos/eclipse/smarthome/issues/886/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/smarthome/issues/886/comments","events_url":"https://api.github.com/repos/eclipse/smarthome/issues/886/events","html_url":"https://github.com/eclipse/smarthome/issues/886","id":127406454,"number":886,"title":"event condition never satisfied","user":{"login":"maggu2810","id":204670,"avatar_url":"https://avatars.githubusercontent.com/u/204670?v=3","gravatar_id":"","url":"https://api.github.com/users/maggu2810","html_url":"https://github.com/maggu2810","followers_url":"https://api.github.com/users/maggu2810/followers","following_url":"https://api.github.com/users/maggu2810/following{/other_user}","gists_url":"https://api.github.com/users/maggu2810/gists{/gist_id}","starred_url":"https://api.github.com/users/maggu2810/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maggu2810/subscriptions","organizations_url":"https://api.github.com/users/maggu2810/orgs","repos_url":"https://api.github.com/users/maggu2810/repos","events_url":"https://api.github.com/users/maggu2810/events{/privacy}","received_events_url":"https://api.github.com/users/maggu2810/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eclipse/smarthome/labels/Automation","name":"Automation","color":"fad8c7"},{"url":"https://api.github.com/repos/eclipse/smarthome/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":41,"created_at":"2016-01-19T09:46:29Z","updated_at":"2016-02-25T13:15:44Z","closed_at":null,"body":"I started using an ItemStateEvent Condition, but it is never satisfied.\r\nAfter some debugging I have a look at the \"isSatisfied\" method of the EventConditionHandler.\r\n\r\nThe code looks like:\r\n```java\r\n        Event event = inputs.get(\"event\") != null ? (Event) inputs.get(\"event\") : null;\r\n        if (event != null) {\r\n            return isConfiguredAndMatches(TOPIC, event.getTopic()) && isConfiguredAndMatches(SOURCE, event.getSource())\r\n                    && isConfiguredAndMatches(PAYLOAD, event.getPayload())\r\n                    && isConfiguredAndMatches(EVENTTYPE, event.getType());\r\n        }\r\n        return false;\r\n```\r\n\r\nIf I looked at the content of <code>inputs</code> my event is not named \"event\", but \"trigger_1.event\". If I changed the strings, the condition is working.\r\nI assume the naming \"event\" is correct and the function that fills the map have to change the \"trigger_X.event\" naming to \"event\".\r\n\r\nBut I do not know any of the automation code...\r\nWhich code has to be fixed?"},"comment":{"url":"https://api.github.com/repos/eclipse/smarthome/issues/comments/188781060","html_url":"https://github.com/eclipse/smarthome/issues/886#issuecomment-188781060","issue_url":"https://api.github.com/repos/eclipse/smarthome/issues/886","id":188781060,"user":{"login":"danchom","id":11029931,"avatar_url":"https://avatars.githubusercontent.com/u/11029931?v=3","gravatar_id":"","url":"https://api.github.com/users/danchom","html_url":"https://github.com/danchom","followers_url":"https://api.github.com/users/danchom/followers","following_url":"https://api.github.com/users/danchom/following{/other_user}","gists_url":"https://api.github.com/users/danchom/gists{/gist_id}","starred_url":"https://api.github.com/users/danchom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danchom/subscriptions","organizations_url":"https://api.github.com/users/danchom/orgs","repos_url":"https://api.github.com/users/danchom/repos","events_url":"https://api.github.com/users/danchom/events{/privacy}","received_events_url":"https://api.github.com/users/danchom/received_events","type":"User","site_admin":false},"created_at":"2016-02-25T13:15:44Z","updated_at":"2016-02-25T13:15:44Z","body":"Sorry may be my misunderstanding. Let summarize if I understand right?\r\n1) Auto-mapping always will be applied on add (update) methods when a rule does not have any connections. When a connection was set, the auto mapping must be skipped. \r\n2) Auto mapping will do connection only when the input tags are subset of the output tags.\r\n3) when connections can't be done by auto-mapping the rule engine will return rule without connections silently\r\n4) in case of conflict, an input can be connected to more then one output, the auto mapping must skip this input and leave it unconnected."}}