{"action":"closed","issue":{"url":"https://api.github.com/repos/marinmitev/smarthome/issues/152","labels_url":"https://api.github.com/repos/marinmitev/smarthome/issues/152/labels{/name}","comments_url":"https://api.github.com/repos/marinmitev/smarthome/issues/152/comments","events_url":"https://api.github.com/repos/marinmitev/smarthome/issues/152/events","html_url":"https://github.com/marinmitev/smarthome/issues/152","id":111163155,"number":152,"title":"Fail composite condition","user":{"login":"smhgit","id":10852598,"avatar_url":"https://avatars.githubusercontent.com/u/10852598?v=3","gravatar_id":"","url":"https://api.github.com/users/smhgit","html_url":"https://github.com/smhgit","followers_url":"https://api.github.com/users/smhgit/followers","following_url":"https://api.github.com/users/smhgit/following{/other_user}","gists_url":"https://api.github.com/users/smhgit/gists{/gist_id}","starred_url":"https://api.github.com/users/smhgit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smhgit/subscriptions","organizations_url":"https://api.github.com/users/smhgit/orgs","repos_url":"https://api.github.com/users/smhgit/repos","events_url":"https://api.github.com/users/smhgit/events{/privacy}","received_events_url":"https://api.github.com/users/smhgit/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-13T11:45:19Z","updated_at":"2015-10-13T14:28:21Z","closed_at":"2015-10-13T14:28:21Z","body":"Hi,\r\n\r\nSee rule below. It seems that it fails \"to satisfy\" the condition. As far as I can see, it fails in \"\"EventCondition\" because $event gets null in the inputs (which means event is null).\r\n```java\r\n @Override\r\n    public boolean isSatisfied(Map<String, ?> inputs) {\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\nThe rule:\r\n=======\r\n```\r\n[\r\n{\r\n\"uid\": \"smart.rule.composite\",\r\n\"name\": \"SmartRule\",\r\n\"tags\": [\r\n\"smart\",\r\n\"rule\"\r\n],\r\n\"description\": \"Smart Rule definition composite.\",\r\n\"on\": [\r\n{\r\n\"id\": \"SmartTriggerID\",\r\n\"type\": \"ItemStateChangeTrigger\",\r\n\"config\": {\r\n\"itemName\": \"demo_switch_1_switch\"\r\n}\r\n}\r\n],\r\n\"if\": [\r\n{\r\n\"id\": \"SmartConditionID\",\r\n\"type\": \"ItemStateEvent_ON_Condition\",\r\n\"config\": {\r\n\"itemName\": \"demo_switch_1_switch\"\r\n}\r\n}\r\n],\r\n\"then\": [\r\n]\r\n}\r\n]\r\n```"}}