There are 4 ways of using weather icons in your preset, each suitable for a different use case.
This is the easiest way of using the icons – download the komponent and add it to your preset.
<aside> ✅ Suitable for simple widgets that just show the current weather.
</aside>
<aside> ⚠️ When you are working on a forecast, it is best to have the icons in a ‘database’ accessible by the whole preset. This means you do not need to use a dozen komponents, but rather display a bitmap with a simple formula, according to one of the three methods explained below.
</aside>
Create all the needed globals (15, 30 or all 45 – their names should be the same as the icons’) inside the global folder weather/icon/
.
Then simply use the following formula on any image object anywhere in the preset.
$gv(weather/icon/wi(icon)+ai(isday))$
Download the .zip
with .png
icons and extract it to a folder in your internal storage that Kustom can access → Kustom/icons
. You will get a folder containing the bitmaps, called Weather_Now
.
Then simply use the following formula on any image object anywhere in any preset.
$"file:///storage/emulated/0/Kustom/icons/"+"**Weather_Now**/"+wi(icon)+ai(isday)+".png"$