UV Indicator

Hiya,

I want to set up the UV indicator to say “Low” “Moderate” “High” but the range is 0-11 in the tag list. How do I change the range or do I need to do it another way.

This is what i have set up. I know I can do it as a small box complication but I want the range bar to do a different colour depending on the uv index too. But the range bar currently isn’t showing anything and i am just getting a zero.

Hope that makes sense
Thanks

1 Like

I can not test this on a watch and this is the only way I know how . Other Coders could give you a more sophisticated formula I am sure . You will see I have put one space between the 3 conditionals . You will have to remove them or your Text will get pushed along . You may think about using MED for moderate . I don’t know if this calibrates to accepted data but you can change the conational Values easily I am sure .
Also you could put each conditional on a separate line so each could be a different colour . Let us Know how that goes on your watch . Ultra or GW7
.
.
(([WTHR_UV_INDEX]<=4)?"LOW":"") ((([WTHR_UV_INDEX]>4)*([WTHR_UV_INDEX]<=8))?"MODERATE":"") (([WTHR_UV_INDEX]>8)?"HIGH":"")

2 Likes

Thanks Russell
I am very new to this and that worked perfect in the studio just not on my watch. It’s showing false and the progress bar isn’t showing

Thanks

1 Like

OK . I might have made a mistake . Is that a GW7 watch . I see now that you are talking about a Complication . I have not done much with them and the ranged value only works on GW 7 or ultra as far as I know .
I think you have to enable the weather stuff with a Tag to use it .

Yes its a Galaxy watch 7. No worries mate thanks for trying. Think it’s probably something I am doing wrong tbh

Cheers

1 Like

I am very sorry I can not test it . I know guys like @masterboyhr have just started making for 7 and Ultra . It is new ground so bear with it .
I wonder if it is something to do with . [WTHR_IS_AVAIL]

1 Like

UV index does not work at the moment.

It works in preview but does not work on the watch, in real life, with real-life data.

Tag for UV is [WTHR_UV_INDEX].
It returns values from 1-11
BUT
in real life, on real watch, it always returns 0 (zero).
(tested on watch ultra)

Something has changed in weather source and inputs are not 1-11, weather inputs are changed to low-medium-high.
As a result UV index tag cannot read numbers from 1-11 (because they are not there) and doesn’t know how to read low-medium-high.

Again, it does not work on watch Ultra, maybe it does work on some other watch if the source of weather data is different.
*
UV index, of course, can be added as complication.

2 Likes

You can do it like this:
For text use formula made by Russell
(([WTHR_UV_INDEX]<=4)?"LOW":"") ((([WTHR_UV_INDEX]>4)*([WTHR_UV_INDEX]<=8))?"MODERATE":"") (([WTHR_UV_INDEX]>8)?"HIGH":"")

and progress bar:


*

2 Likes

Have you tried .

(([WTHR_UV_INDEX]=“Low”)?1:0)

I don’t know if this is the a correct test for String Data . We must remember that we are all Beta testers . WFS is not Samsungs Priority . However many are making really nice Faces on it .

1 Like

No, it doesn’t work. Problem is that input data is always 0 so the result cannot be anything but 0.
It will be solved in the future, I’m sure.

Or maybe someone has a solution?

1 Like

What does [WTHR_IS_AVAIL] return?
Acknowledgement to @russellcresser.

OK . I thought you said it returned
a string on the watch . Are you getting other Weather Tag Data results OK .?

Everything else works fine, as far as I know.

1 Like

0 if there is no data (no connection to weather source)
1 if everything is OK (connection to weather source is fine).

1 Like

Sorry; my question was ambiguous.

If [WTHR_IS_AVAIL] returns 0, then UV index is probably not available and shouldn’t be used. If [WTHR_IS_AVAIL] returns 1 but UV index is misbehaving, you’ve probably found a bug.

1 Like

I guess this is the case. Weather is available for sure (on real watch) because everything else related to weather works. Temp, chance of rain, conditions, hi-low…

Update: I’ve just tested it again to be sure. Nope, always shows zero (0).

2 Likes

Thanks so much for the help, Guess just gonna have to watch and see what happens for now.

2 Likes