Page 1 of 1

Formatting Webtag for temp

Posted: Sat 16 May 2015 4:29 am
by ace2
Is it possible to output the temp with out the decimal point and number after??

example:

output 32 not 32.6

Re: Formatting Webtag for temp

Posted: Sat 16 May 2015 7:51 am
by steve
There's currently no formatting available for values, only timestamps - possibly in the future. Meanwhile, use some javascript - Math.round().

In your example, wouldn't you want 33 and not 32? If you really do want it truncating rather than rounding, use Math.trunc() instead.

Re: Formatting Webtag for temp

Posted: Sat 16 May 2015 8:25 am
by ace2
That's alright, it was more for use outside a website.
I was going to use it as a variable to change the webcam capture overlay colour denpening of temperature.

Just another one of my crazy ideas!! :D

Re: Formatting Webtag for temp

Posted: Mon 25 May 2015 4:17 pm
by ace2
Crazy idea has been put into place, kind of..
Instead of overlay colour, I've used it to change the stylesheet.
Based on the Temp webtag, the stylesheet changes which include the background image...
So I have 6 images depending on temp for day, one if it's raining using the Rain Webtag and a night time image.....