Skip to main content

Weather Entity

Derive entity platforms from homeassistant.components.weather.WeatherEntity

Properties

tip

Properties should always only return information from memory and not do I/O (like network requests). Implement update() or async_update() to fetch data.

NameTypeDefaultDescription
conditionstringRequiredThe current weather condition.
native_temperaturefloatRequiredThe current temperature in °C or °F.
native_temperature_unitstringRequiredThe temperature unit; °C or °F.
native_pressurefloatNoneThe current air pressure in hPa, mbar, inHg or mmHg.
native_pressure_unitstringNoneThe air pressure unit; hPa, mbar, inHg or mmHg. Required if native_pressure is set.
humidityfloatNoneThe current humidity in %.
ozonefloatNoneThe current ozone level.
native_visibilityfloatNoneThe current visibility in km or mi.
native_visibility_unitstringNoneThe visibility unit; km or mi. Required if native_visibility is set.
native_wind_speedfloatNoneThe current wind speed in m/s, km/h or mi/h.
native_wind_speed_unitstringNoneThe wind speed unit; m/s, km/h or mi/h. Required if native_wind_speed is set.
native_precipitation_unitstringNoneThe precipitation unit; mm or in.
wind_bearingfloat or stringNoneThe current wind bearing in azimuth angle (degrees) or 1-3 letter cardinal direction.
forecastarrayNoneDaily or Hourly forecast data.

Unit Conversion

Properties have to follow the units mentioned on the respective unit of measurement in the table.

To the user, properties will be presented according to the unit system. This is achieved by automatically converting units when creating state objects.

For each weather entity, the user also has the option to override the presentation units, i.e., the units used in the state objects.

Forecast

Forecast data should either be daily or hourly.

NameTypeDefaultDescription
datetimestringRequiredUTC Date time in RFC 3339 format.
native_temperaturefloatRequiredThe higher temperature in °C or °F
conditionstringNoneThe weather condition at this point.
native_templowfloatNoneThe lower daily Temperature in °C or °F
native_precipitationfloatNoneThe precipitation amount in mm or in.
precipitation_probabilityintNoneThe probability of precipitation in %.
native_pressurefloatNoneThe air pressure in hPa, mbar, inHg or mmHg.
wind_bearingfloat or stringNoneThe wind bearing in azimuth angle (degrees) or 1-3 letter cardinal direction.
native_wind_speedintNoneThe wind speed in m/s, km/h or mi/h.

Forecast data needs to follow the same unit of measurement as defined for properties where applicable.

These weather conditions are included in our translation files and also show the corresponding icon.

ConditionDescription
clear-nightClear night
cloudyMany clouds
exceptionalExceptional
fogFog
hailHail
lightningLightning/ thunderstorms
lightning-rainyLightning/ thunderstorms and rain
partlycloudyA few clouds
pouringPouring rain
rainyRain
snowySnow
snowy-rainySnow and Rain
sunnySunshine
windyWind
windy-variantWind and clouds

This means that the weather platforms don't need to support languages.