More conditions in template for alarm types

Andreas Kern4 years ago

Hello,
i want to evaluate more conditions to translate more alarm types in template.

For example:

#{if}($position.getString("alarm").equals("powercut"))LOCALISED POWER CUT
#{else if}($position.getString("alarm").equals("sos"))SOS BUTTON WAS PUSHED!!!
#{else}OTHER ALARM#{end}

When i entered this syntax, following message was sent:

LOCALISED POWER CUT# #{else if}(false)SOS BUTTON WAS PUSHED!!!

How can i solve this problem?

Thanks in advance!