TICKscript sending alerts every second


I am trying to set up alerts to only send once every 5 minutes for 3 times (3 messages in 15 minutes then stop)

My Tickscript is as follows, but it sends an alert every second at the moment (good news for me is it works as I am a total noob at this)

When I add the following to my TICKscript, it gives an error

TICKscript following:

var db = ‘timeseries’

var rp = ‘autogen’

var measurement = ‘AirconTemp’

var groupBy =

var whereFilter = lambda: TRUE

var name = ‘OutOfRange’

var idVar = name

var message = 'Aircon Alert {{.ID}} Aircon Temperature is {{ index .Fields “value” }} {{.Time}} ’

var idTag = ‘alertID’

var levelTag = ‘level’

var messageField = ‘message’

var durationField = ‘duration’

var outputDB = ‘chronograf’

var outputRP = ‘autogen’

var outputMeasurement = ‘alerts’

var triggerType = ‘threshold’

var details = ‘Alert CRITICAL AIRCON TEMPERATURE violation! The Temperature is {{ index .Fields “value” }}’

|eval(lambda: “Aircon”)
.warn(lambda: “value” > 24.2)
.warnReset(lambda: “value” < 24)
.crit(lambda: “value” > 25)
.critReset(lambda: “value” < 24.9)