Skip to content

WrapWeatherProps

Attributes:

attr Weather

Weather: WeatherProps

Type: WeatherProps

A native component within hitokage that displays current weather information.

It polls Open Meteo every minute.

Only one location is supported at the moment. The very first instance of Weather being attached to a monitor must contain a latitude and longitude. All other Weather will assume the same location.

See ComponentProps

Example

monitor = hitokage.monitor.get_primary()

---@type WeatherProps
weather_props = { latitude = 38.95773795883854, longitude = -95.25382422045898, format = "{{temp_fahrenheit}} °F" }

monitor:attach({
  children = {
    Weather = weather_props,
  },
})

The mounted API is documented here: Weather