Page 1 of 1

simple multiple lines text device

Posted: Wednesday 19 July 2023 19:48
by tiga
i try to understand how to get multiple lines into a dummy text device

for example :

line 1
line 2
line 3

i have found this: TEXT = Text you want to display, can be multiple lines when adding \r\n to the string.

but i dont know how to implement it.

i think it goes at the end of this: commandArray['UpdateDevice'] ='1234|0|(somehow here??)

Re: simple multiple lines text device

Posted: Wednesday 19 July 2023 20:36
by jvdz
Something like this should work:

Code: Select all

commandArray['UpdateDevice'] ='1234|0|line1\nline2'

Re: simple multiple lines text device

Posted: Wednesday 19 July 2023 21:14
by zicht
and text sensors support native HTML like color and also <br>

Re: simple multiple lines text device

Posted: Wednesday 19 July 2023 21:20
by tiga
thanks
it works!

Re: simple multiple lines text device

Posted: Wednesday 19 July 2023 21:39
by tiga
zicht wrote: Wednesday 19 July 2023 21:14 and text sensors support native HTML like color and also <br>
i tried with the color thing but in the mobile app you see:<font color="red"> instead the real color red.

Re: simple multiple lines text device

Posted: Wednesday 19 July 2023 21:43
by zicht
tiga wrote: Wednesday 19 July 2023 21:39 i tried with the color thing but in the mobile app you see:<font color="red"> instead the real color red.
Thats caused by the mobile app not domoticz. The text sensor itself accepts html just fine.
I have many sensors populated this way also with <a href= making links in text sensors and then you can click the link as it should.
Open domoticz on your device and check (it has a mobile page)