I’ve a short question about the item. I have to give you a bit of background information on this. I have wrote a programme that calculates the position of the sun depending on the longitude and latitude. This calculation is very extensive. As an intermediate result you also get the position of the earth on its orbit (ecliptic longitude Lambda). The position also reflects the time of year:
0° to 90°: Spring
90° to 180°: Summer
180° to 270°: Autumn
270° to 0°: Winter
Is it possible to display a separate icon in a widget with YAML depending on the four possibilities (seasons, see circle)?
Of course they can. Please see the many weather widgets posted in the community as examples.
Ther you will find expressions to replpace icons depending on the weather condition (iconID).
However, I don’t have an external weather app, but a own JS rule that calculates the data for me. So it is not possible to create an if query under icons like this:
icons = (if items.getItem('L').state > 0 && items.getItem('L').state <= 90) then f7:spring, if ...
Might have misunderstood your initial post, just wanted to give you examples how to change icons based on different item states.
Your rule could set your calculated season to a virtual item, which then could be used to change the icon.
Other option would be to use the season information from Astro Binding for setting the icon.
Many ways possible….