Page 1 of 1

UV Index wording

Posted: Sun Nov 18, 2018 1:00 pm
by G4MHJ
Having a member of my family with sensitive skin it is important to be aware of the UV levels when going outside.

Is it possible to see wording next to an index, for example, if the level is 3, 4 or 5 then the word "Moderate" could appear next to it. "Low" and "High" would also be needed if this feature is at all possible.

The output could then be added to my regular Twitter feed and maybe an email alert.

Maybe this isn't possible and apologies if this has been asked before.

I assume it would be a complicated statement along the lines of #if#{*[uv0index-act.0:-9999]!=-9999*}#then# UV Index [uv0index-act.1:]#else##fi#

Any assistance and guidance would be appreciated.

Re: UV Index wording

Posted: Sun Nov 18, 2018 8:30 pm
by admin
Normally it needs a few iterations until all syntax errors are removed, but I would start with

Code: Select all

UV exposure is 
#if#{*[uv0index-act.0:0] < 3*}#then#LOW#else##fi#
#if#{*([uv0index-act.0:0] >= 3) && ([uv0index-act.0:0] <= 5)*}#then#MODERATE#else##fi#
#if#{*[uv0index-act.0:0] > 5*}#then#HIGH#else##fi#
You should put it in one line, I splitted it for better readability only.

Re: UV Index wording

Posted: Sun Nov 18, 2018 9:51 pm
by G4MHJ
Thank you

These expressions are now making a lot more sense to me now.

Just one more thing. How can these expressions be tested or do I have to wait until the sun shines? :)

Re: UV Index wording

Posted: Mon Nov 19, 2018 12:05 pm
by admin
There is no direct way to test. You could change sensors to "win0wind" which should provide a lot of different data in a short period of time.

Re: UV Index wording

Posted: Mon Nov 19, 2018 1:12 pm
by G4MHJ
I assume you meant "wind0wind" or is "win0wind" a different type of sensor?
yes, just a typo :lol: