Added handler for rules: modes working, temp doesn't