Template Short - customize

tambiu3 months ago

Hi, is there a way to customize the short template to show the address when igniton on ?

#set($subject = "$device.name: ignition ON")
Device: $device.name ignition on at $dateTool.format("dd-MM-YYYY HH:mm:ss", $event.eventTime, $locale, $timezone)

like $position.address ? how to set it ?

Cristian3 months ago
#set($subject = "$device.name: ignition ON")
Device: $device.name ignition on at $dateTool.format("dd-MM-YYYY HH:mm:ss", $event.eventTime, $locale, $timezone)#{if}($position.latitude)$position.address#{end}

try that and comment, I think I set it up something like this.

tambiu3 months ago

I did not work, my logs shows

2024-09-15 17:03:20 ERROR: ResourceManager: parse exception: Encountered "#{end}" at short/ignitionOn.vm[line 2, column 154]
Cristian3 months ago
#set($subject = "$device.name: encendido ON")
$device.name encendido ON a las $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.eventTime, $locale, $timezone)#{if}($position.latitude) Lugar: $position.address https://www.google.com/maps/search/$position.latitude,$position.longitude#{end}#{if}($position.address) #{end}

try this

tambiu3 months ago

perfect, thank you very much