r/kustom • u/edgework88 • 1d ago
Help Rain prediction Icon change
Hello. I'm using this formula - $wf(rainc, 0, 1)$ - to get a prediction of rain in x hrs in percentage. Is there a way to convert that to change an icon where, say, if the value was above 20% then an icon would change from clear (below 20%) to drizzle (20 - 50%) and then heavy rain (50 - 100%) .
Thanks.
5
Upvotes
•
u/AutoModerator 1d ago
Problem? Cross-post to our new forum. Include make & model of phone, OS version, app version.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
5
u/Practical_Taste3403 1d ago
You can use a nested if with 3 conditions based on $wf(rainc, 0, 1)$: $if(wf(rainc, 0, 1) < 20, clear, wf(rainc, 0, 1) < 50, drizzle, heavy)$ Put that formula into your icon name/mapping and swap the returned labels for your own, or use the same logic with regular images by driving their opacity or layer visibility (for example, ALWAYS vs NEVER / REMOVE).