How do I add a short notification?

hariro5 days ago

I updated my server to version 6.9.1. I noticed that there is no short folder in the templates/notification folder. How can I add short notifications?

Anton Tananaev5 days ago

They're combined into a single file now. Short notifications are saved in the $digest variable.

Richard ID5 days ago

I got a $alarmName notification from the template

#set($subject = "$device.name: alarm!")
#set($alarmKey = $event.getString('alarm'))
#set($alarmName = $translations.get("alarm${alarmKey.substring(0, 1).toUpperCase()}${alarmKey.substring(1)}"))
#set($digest = "$device.name alarm: $alarmName at $dateTool.format('yyyy-MM-dd HH:mm:ss', $event.eventTime, $locale, $timezone)")
<!DOCTYPE html>
<html>
<body>
Device: $device.name<br>
Alarm: $alarmName<br>
Time: $dateTool.format('yyyy-MM-dd HH:mm:ss', $event.eventTime, $locale, $timezone)<br>
Point: <a href="$webUrl/event/$event.id">#{if}($position.address)$position.address#{else}$position.latitude&deg;, $position.longitude&deg;#{end}</a><br>
<br>
<a href="$webUrl/settings/notifications?token=$token">Unsubscribe</a>
</body>
</html>

it should be a power cut alarm, is anyone else experiencing the same problem?

Anton Tananaev5 days ago

It doesn't seem like it's related to the topic. But you should also check $alarmKey value.