Weather Tile - Custom Device Definition

I just noticed there is a weather tile option mentioned. I have a custom DTH and App to interface my Ambient Weather Station on Hubitat. I can add a Temperature Tile but do not see how to get a Weather Tile to show up. Am I missing something? What needs to be in the DTH to trigger weather tile availability?

Thanks!

The main thing the Weather Tile is looking for is the device to implement a weather attribute. That triggers the weather tile being rendered instead of a generic thing tile.

It’s looking for a few key attributes:

  • weather - description of the weather/forecast [required]
  • weatherIcon - reports a Weather Underground or TWC compatible icon id
  • forecastIcon - should report a Weather Underground compatible icon name
    • The weather tile falls back to this attribute if the weatherIcon is not available
  • city - replaces the device name in the top-left (location is used as a fallback)
  • temperature - numeric temperature (without units)
  • feelsLike - numeric temperature (without units)
  • wind - in MPH
  • illuminance - hidden for now
  • humidity - as a percentage (without units)
  • percentPrecip - as a percentage (without units)
  • localSunrise - time
  • localSunset - time

If I remember correctly, weather and forecastIcon are the only required attributes. The rest of the attributes are conditionally displayed based on whether or not they are implemented in the device driver.

Edit:
Here’s a visual layout of what each attribute maps to on the weather tile:

1 Like

Hey, I know this is old, but since Weather Underground has discontinued their API service, would it be possible to change the icons to DarkSky or something similar?

The weather tiles were updated to work with the updated built-in SmartThings WeatherStation tile which reports The Weather Channel icon codes now. This was done a few months ago when the change went live on the SmartThings side. Several Hubitat weather drivers still report compatible icon codes as well.

Can you help me understand your use case?

1 Like

Sure thing. I use Hubitat. I created a DarkSky driver for it, but the icon/image area is just N/A on SharpTools. Now that I think about it, I think I had an issue with the Weather Underground version of this app too… If you have a good idea as to how I can adjust the app to display the correct images, I’m game for that too. The below image is one of my boards.

Adam-
The custom app/driver would need to provide a weatherIcon (or forecastIcon) with a Weather Underground or Weather Company compatible icon ID as noted in the second post in this thread.

Weather Underground Keys

The Weather Underground icon keys are in the Icon Name column of the Forecast Description Phrases table on this page:

Updated: Weather Underground - Icon Code References

WeatherUnderground - Forecast Description Phrases - Icon Table (no longer works)

eg. chanceflurries, chancerain, clear, cloudy… and the night time variants with nt_ prefixed (eg. nt_chanceflurries, nt_chancerain, nt_clear, nt_cloudy)

Weather Company Keys

The Weather Company icon keys can be found in the Code column of the Icon codes and images table on the following page:

Updated: Weather Company - Icon codes and images

Weather Company - Icon codes and images (no longer works)

eg. 0 = Tornado, 12 = Rain, etc.

Community App Example

There are several community weather drivers on Hubitat which implement compatible icon keys… basically by mapping the icon keys provided by their weather service to one of the keys noted above. For example, the Bangali APIXU driver has a conversion map called conditionFactor and a getWUIconName() method to get the mapped key and store it in the forecastIcon attribute:

2 Likes

Perfect! It seems to be working now. For anyone else who has this problem using DarkSky API - when you set your weather icon, take the current summary, remove the spacing and change to lowercase:

response.data.currently.summary.replaceAll("\\s", "").toLowerCase();

9 posts were split to a new topic: Weather Tile - How to Setup?