Page 1 of 1

Use "Enter" in output Telegram Notification

Posted: Saturday 15 September 2018 18:37
by Brutus
Normally you can send a Telegram message in LUA with the following command:

Code: Select all

commandArray['SendNotification']='Subject#Text: '..Sensor..'#0'
I would like to create a more clean output with an "Enter" after the text so the Sensor data comes on the next line in the message.

Code: Select all

commandArray['SendNotification']='Subject#Text: "enter" '..Sensor..'#0'
Is this possible? I can't find any thing on Wiki or the forum.

Greetings.

Re: Use "Enter" in output Telegram Notification

Posted: Saturday 15 September 2018 19:03
by SweetPants
Have you tried adding "\r\n" to the string?

Re: Use "Enter" in output Telegram Notification

Posted: Saturday 15 September 2018 19:08
by Brutus
SweetPants wrote: Saturday 15 September 2018 19:03 Have you tried adding "\r\n" to the string?
Thnx for your reply!

Can you please put that in my example? So i don't make a mistake.

Re: Use "Enter" in output Telegram Notification

Posted: Saturday 15 September 2018 19:12
by SweetPants
commandArray['SendNotification']='Subject#Text: \r\n'..Sensor..'#0'

Re: Use "Enter" in output Telegram Notification

Posted: Saturday 15 September 2018 19:16
by Brutus
SweetPants wrote: Saturday 15 September 2018 19:12 commandArray['SendNotification']='Subject#Text: \r\n'..Sensor..'#0'
That works like a charm, Thanx!!

Were did you find this :) ?

Re: Use "Enter" in output Telegram Notification

Posted: Saturday 15 September 2018 19:20
by SweetPants
Brutus wrote: Saturday 15 September 2018 19:16
That works like a charm, Thanx!!

Were did you find this :) ?
It's just plane LUA, just googeld for it