Page 1 of 1

Fontsize of textsensor

Posted: Wednesday 07 June 2017 21:12
by JuanUil
Hi All,

Is there a way to adjust the fontsize and color of a textsensor in LUA

Jan

Re: Fontsize of textsensor

Posted: Saturday 10 June 2017 11:35
by JuanUil
anybody any idea?

Re: Fontsize of textsensor

Posted: Saturday 10 June 2017 19:30
by zicht
Since the dashbord displays HTML with jquiry you should be able to use HTML code (i hope :P)
If that works you could be able to use colors also..

Never tried it ...

Re: Fontsize of textsensor

Posted: Monday 12 June 2017 21:30
by JuanUil
Tnx for your reply,

but.....
any idea how to do that, because I have no clue...

Jan

Re: Fontsize of textsensor

Posted: Tuesday 13 June 2017 0:00
by G3rard
Try this

Code: Select all

http://192.168.1.170:8080/json.htm?type=command&param=udevice&idx=62&nvalue=0&svalue=<font%20size=”6”>TEXT</font>
I have even tried showing the album art of what's playing on the Sonos, but that didn't always work, sometimes the switch disappeared.
But after svalue= you can place any kind of HTML code.

Re: Fontsize of textsensor

Posted: Wednesday 05 July 2017 11:28
by zicht
You can even add a second text line with adding a <DIV>
and also hyperlinks to external (for this be aware of crossdomain errors)
example from used in a rainscript:

Code: Select all

test="<A href='http://weerslag.nl/bliksem#' target='_blanc'><font size='2' color='"..color.."'>"..tmp2.."</font></a><div><font size='2' color='black'>"..tmp3.."</font></div>"
if otherdevices['Regen Verwachting'] ~= test then commandArray['UpdateDevice'] = '636'..'|0|'..test
Where tmp2 is my returned function variable , displayed on top in color depending on the value (amount of rain)
and tmp3 is my second returned function variable displayed below in black. (display the times -can be multiple- the rain is expected)