Watchmaker Wiki

The ultimate watch maker for Android Wear!

User Tools

Site Tools


weather

This is an old revision of the document!


Weather Widget

Weather Widgets are image widgets so please refer to them for their general use.

To display the current weather conditions, the weather widget uses a special image that contains multiple icons (also called a sprite). Nine different states are supported in the weather sets delivered with Watchmaker:

  1. sunny
  2. FIXME
  3. FIXME
  4. FIXME
  5. light rain
  6. heavy rain
  7. thunderstorm
  8. snow
  9. cloudy

By default the weather widget shows the current weather condition as provided by the weather provider. You can switch it to forecast conditions by adjusting the image selection property as described below.

Using your own image

You can provide your own image. To do so select it in the “Custom Image” property and make sure to adjust the “image grid” property to match the layout of your sprite.

Which icon is displayed is displayed is determined by the “Image Selection” property. It should contain a lua expression returning the number of the image to show (on a 3×3 grid, 1 is the top left corner, 3 is top right and 9 is bottom right).

The default expression is this:

'{wci}' == '01d' and 1 or '{wci}' == '02d' and 2 or '{wci}' == '03d' and 3 or '{wci}' == '04d' and 4 or '{wci}' == '09d' and 5 or '{wci}' == '10d' and 6 or '{wci}' == '11d' and 7 or '{wci}' == '13d' and 8 or '{wci}' == '50d' and 9 or 1

{wci} of course refers to the weather tag containing the weather icon information. The expression maps the many states this tag can have to the 9 available icons.

{wci} can have the following values:

Value Condition
FIXME FIXME
weather.1421781501.txt.gz · Last modified: 2015/01/20 19:18 by splitbrain