Display the value of query through Telegram Channel on Kapacitor

Here is my Kapacitor script, I am trying to print the result of my query (PT). But it prints literal PT and it does throws error if I use “PT” instead of 'PT’

dbrp “mydb”.“autogen”

var pf = batch
// Select just the cpu measurement from our example database.
|query(’’’
SELECT spread(kwh)/spread(kvah) as PT
FROM “mydb”.“autogen”.“PWR_00000022”
‘’’)
.period(50m)
.every(1m)
.groupBy(time(1m), ‘PWR_00000022’)

|alert()
    .crit(lambda: "PT" >  0.999)
    .message('PT')
    .telegram()
      .chatId('-3522222')

Can anyone please help me in fixing this Kapacitor issue