Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.template.weather.WeatherTemplate Class Reference
Inheritance diagram for homeassistant.components.template.weather.WeatherTemplate:
[legend]
Collaboration diagram for homeassistant.components.template.weather.WeatherTemplate:
[legend]

Public Member Functions

None __init__ (self, HomeAssistant hass, ConfigType config, str|None unique_id)
 
list[Forecastasync_forecast_daily (self)
 
list[Forecastasync_forecast_hourly (self)
 
list[Forecastasync_forecast_twice_daily (self)
 
str|None attribution (self)
 
float|None cloud_coverage (self)
 
str|None condition (self)
 
float|None humidity (self)
 
float|None native_apparent_temperature (self)
 
float|None native_dew_point (self)
 
float|None native_pressure (self)
 
float|None native_temperature (self)
 
float|None native_visibility (self)
 
float|None native_wind_gust_speed (self)
 
float|None native_wind_speed (self)
 
float|None ozone (self)
 
float|str|None wind_bearing (self)
 
- Public Member Functions inherited from homeassistant.components.template.template_entity.TemplateEntity
None __init__ (self, HomeAssistant hass, *Template|None availability_template=None, Template|None icon_template=None, Template|None entity_picture_template=None, dict[str, Template]|None attribute_templates=None, ConfigType|None config=None, str|None fallback_name=None, str|None unique_id=None)
 
None add_template_attribute (self, str attribute, Template template, Callable[[Any], Any]|None validator=None, Callable[[Any], None]|None on_update=None, bool none_on_template_error=False)
 
None async_added_to_hass (self)
 
None async_run_script (self, Script script, *_VarsType|None run_variables=None, Context|None context=None)
 
CALLBACK_TYPE async_start_preview (self, Callable[[str|None, Mapping[str, Any]|None, dict[str, bool|set[str]]|None, str|None,], None,] preview_callback)
 
None async_update (self)
 
str|None referenced_blueprint (self)
 
- Public Member Functions inherited from homeassistant.helpers.entity.Entity
None __init_subclass__ (cls, **Any kwargs)
 
str __repr__ (self)
 
None add_to_platform_abort (self)
 
None add_to_platform_finish (self)
 
None add_to_platform_start (self, HomeAssistant hass, EntityPlatform platform, asyncio.Semaphore|None parallel_updates)
 
bool assumed_state (self)
 
None async_device_update (self, bool warning=True)
 
None async_internal_will_remove_from_hass (self)
 
None async_on_remove (self, CALLBACK_TYPE func)
 
None async_remove (self, *bool force_remove=False)
 
None async_removed_from_registry (self)
 
None async_schedule_update_ha_state (self, bool force_refresh=False)
 
None async_set_context (self, Context context)
 
None async_update_ha_state (self, bool force_refresh=False)
 
None async_will_remove_from_hass (self)
 
None async_write_ha_state (self)
 
bool available (self)
 
dict[str, Any]|None capability_attributes (self)
 
str|None device_class (self)
 
DeviceInfo|None device_info (self)
 
bool enabled (self)
 
EntityCategory|None entity_category (self)
 
str|None entity_picture (self)
 
bool entity_registry_enabled_default (self)
 
bool entity_registry_visible_default (self)
 
Mapping[str, Any]|None extra_state_attributes (self)
 
bool force_update (self)
 
HassJobType get_hassjob_type (self, str function_name)
 
er.EntityOptionsType|None get_initial_entity_options (self)
 
bool has_entity_name (self)
 
str|None icon (self)
 
str|UndefinedType|None name (self)
 
None schedule_update_ha_state (self, bool force_refresh=False)
 
bool should_poll (self)
 
str|None suggested_object_id (self)
 
int|None supported_features (self)
 
str|None translation_key (self)
 
Mapping[str, strtranslation_placeholders (self)
 
str|None unique_id (self)
 
str|None unit_of_measurement (self)
 
bool use_device_name (self)
 
- Public Member Functions inherited from homeassistant.helpers.entity.CachedProperties
None __init__ (cls, str name, tuple[type,...] bases, dict[Any, Any] namespace, **Any kwargs)
 
Any __new__ (mcs, str name, tuple[type,...] bases, dict[Any, Any] namespace, set[str]|None cached_properties=None, **Any kwargs)
 
- Public Member Functions inherited from homeassistant.components.weather.WeatherEntity
None __post_init__ (self, *Any args, **Any kwargs)
 
None async_internal_added_to_hass (self)
 
None async_registry_entry_updated (self)
 
CALLBACK_TYPE async_subscribe_forecast (self, Literal["daily", "hourly", "twice_daily"] forecast_type, Callable[[list[JsonValueType]|None], None] forecast_listener)
 
None async_update_listeners (self, Iterable[Literal["daily", "hourly", "twice_daily"]]|None forecast_types)
 
str|None native_precipitation_unit (self)
 
str|None native_pressure_unit (self)
 
str|None native_temperature_unit (self)
 
str|None native_visibility_unit (self)
 
str|None native_wind_speed_unit (self)
 
float precision (self)
 
str|None state (self)
 
dict[str, Any] state_attributes (self)
 
float|None uv_index (self)
 
- Public Member Functions inherited from homeassistant.components.weather.PostInitMeta
Any __call__ (cls, *Any args, **Any kwargs)
 

Public Attributes

 entity_id
 
- Public Attributes inherited from homeassistant.components.template.template_entity.TemplateEntity
 entity_id
 
- Public Attributes inherited from homeassistant.helpers.entity.Entity
 device_entry
 
 entity_id
 
 hass
 
 parallel_updates
 
 platform
 
 registry_entry
 

Private Member Functions

None _async_setup_templates (self)
 
None _update_forecast (self, Literal["daily", "hourly", "twice_daily"] forecast_type, list[Forecast]|TemplateError result)
 
list[Forecast]|None _validate_forecast (self, Literal["daily", "hourly", "twice_daily"] forecast_type, Any result)
 

Private Attributes

 _apparent_temperature
 
 _apparent_temperature_template
 
 _attr_native_precipitation_unit
 
 _attr_native_pressure_unit
 
 _attr_native_temperature_unit
 
 _attr_native_visibility_unit
 
 _attr_native_wind_speed_unit
 
 _attr_supported_features
 
 _attribution
 
 _attribution_template
 
 _cloud_coverage
 
 _cloud_coverage_template
 
 _condition
 
 _condition_template
 
 _dew_point
 
 _dew_point_template
 
 _forecast_daily_template
 
 _forecast_hourly_template
 
 _forecast_twice_daily_template
 
 _humidity
 
 _humidity_template
 
 _ozone
 
 _ozone_template
 
 _pressure
 
 _pressure_template
 
 _temperature
 
 _temperature_template
 
 _visibility
 
 _visibility_template
 
 _wind_bearing
 
 _wind_bearing_template
 
 _wind_gust_speed
 
 _wind_gust_speed_template
 
 _wind_speed
 
 _wind_speed_template
 

Static Private Attributes

bool _attr_should_poll = False
 

Additional Inherited Members

- Static Public Attributes inherited from homeassistant.helpers.entity.Entity
 bool
 
 EntityPlatform
 
 HomeAssistant
 
 None
 
 StateInfo
 
 StateType
 
 str
 
- Static Public Attributes inherited from homeassistant.components.weather.WeatherEntity
 None
 

Detailed Description

Representation of a weather condition.

Definition at line 166 of file weather.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.template.weather.WeatherTemplate.__init__ (   self,
HomeAssistant  hass,
ConfigType  config,
str | None  unique_id 
)
Initialize the Template weather.

Definition at line 171 of file weather.py.

Member Function Documentation

◆ _async_setup_templates()

None homeassistant.components.template.weather.WeatherTemplate._async_setup_templates (   self)
private
Set up templates.

Reimplemented from homeassistant.components.template.template_entity.TemplateEntity.

Definition at line 315 of file weather.py.

◆ _update_forecast()

None homeassistant.components.template.weather.WeatherTemplate._update_forecast (   self,
Literal["daily", "hourly", "twice_daily"]  forecast_type,
list[Forecast] | TemplateError  result 
)
private
Save template result and trigger forecast listener.

Definition at line 410 of file weather.py.

◆ _validate_forecast()

list[Forecast] | None homeassistant.components.template.weather.WeatherTemplate._validate_forecast (   self,
Literal["daily", "hourly", "twice_daily"]  forecast_type,
Any  result 
)
private
Validate the forecasts.

Definition at line 423 of file weather.py.

◆ async_forecast_daily()

list[Forecast] homeassistant.components.template.weather.WeatherTemplate.async_forecast_daily (   self)
Return the daily forecast in native units.

Reimplemented from homeassistant.components.weather.WeatherEntity.

Definition at line 295 of file weather.py.

◆ async_forecast_hourly()

list[Forecast] homeassistant.components.template.weather.WeatherTemplate.async_forecast_hourly (   self)
Return the daily forecast in native units.

Reimplemented from homeassistant.components.weather.WeatherEntity.

Definition at line 299 of file weather.py.

◆ async_forecast_twice_daily()

list[Forecast] homeassistant.components.template.weather.WeatherTemplate.async_forecast_twice_daily (   self)
Return the daily forecast in native units.

Reimplemented from homeassistant.components.weather.WeatherEntity.

Definition at line 303 of file weather.py.

◆ attribution()

str | None homeassistant.components.template.weather.WeatherTemplate.attribution (   self)
Return the attribution.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 308 of file weather.py.

◆ cloud_coverage()

float | None homeassistant.components.template.weather.WeatherTemplate.cloud_coverage (   self)
Return the cloud coverage.

Reimplemented from homeassistant.components.weather.WeatherEntity.

Definition at line 281 of file weather.py.

◆ condition()

str | None homeassistant.components.template.weather.WeatherTemplate.condition (   self)
Return the current condition.

Reimplemented from homeassistant.components.weather.WeatherEntity.

Definition at line 236 of file weather.py.

◆ humidity()

float | None homeassistant.components.template.weather.WeatherTemplate.humidity (   self)
Return the humidity.

Reimplemented from homeassistant.components.weather.WeatherEntity.

Definition at line 246 of file weather.py.

◆ native_apparent_temperature()

float | None homeassistant.components.template.weather.WeatherTemplate.native_apparent_temperature (   self)
Return the apparent temperature.

Reimplemented from homeassistant.components.weather.WeatherEntity.

Definition at line 291 of file weather.py.

◆ native_dew_point()

float | None homeassistant.components.template.weather.WeatherTemplate.native_dew_point (   self)
Return the dew point.

Reimplemented from homeassistant.components.weather.WeatherEntity.

Definition at line 286 of file weather.py.

◆ native_pressure()

float | None homeassistant.components.template.weather.WeatherTemplate.native_pressure (   self)
Return the air pressure.

Reimplemented from homeassistant.components.weather.WeatherEntity.

Definition at line 271 of file weather.py.

◆ native_temperature()

float | None homeassistant.components.template.weather.WeatherTemplate.native_temperature (   self)
Return the temperature.

Reimplemented from homeassistant.components.weather.WeatherEntity.

Definition at line 241 of file weather.py.

◆ native_visibility()

float | None homeassistant.components.template.weather.WeatherTemplate.native_visibility (   self)
Return the visibility.

Reimplemented from homeassistant.components.weather.WeatherEntity.

Definition at line 266 of file weather.py.

◆ native_wind_gust_speed()

float | None homeassistant.components.template.weather.WeatherTemplate.native_wind_gust_speed (   self)
Return the wind gust speed.

Reimplemented from homeassistant.components.weather.WeatherEntity.

Definition at line 276 of file weather.py.

◆ native_wind_speed()

float | None homeassistant.components.template.weather.WeatherTemplate.native_wind_speed (   self)
Return the wind speed.

Reimplemented from homeassistant.components.weather.WeatherEntity.

Definition at line 251 of file weather.py.

◆ ozone()

float | None homeassistant.components.template.weather.WeatherTemplate.ozone (   self)
Return the ozone level.

Reimplemented from homeassistant.components.weather.WeatherEntity.

Definition at line 261 of file weather.py.

◆ wind_bearing()

float | str | None homeassistant.components.template.weather.WeatherTemplate.wind_bearing (   self)
Return the wind bearing.

Reimplemented from homeassistant.components.weather.WeatherEntity.

Definition at line 256 of file weather.py.

Member Data Documentation

◆ _apparent_temperature

homeassistant.components.template.weather.WeatherTemplate._apparent_temperature
private

Definition at line 222 of file weather.py.

◆ _apparent_temperature_template

homeassistant.components.template.weather.WeatherTemplate._apparent_temperature_template
private

Definition at line 198 of file weather.py.

◆ _attr_native_precipitation_unit

homeassistant.components.template.weather.WeatherTemplate._attr_native_precipitation_unit
private

Definition at line 202 of file weather.py.

◆ _attr_native_pressure_unit

homeassistant.components.template.weather.WeatherTemplate._attr_native_pressure_unit
private

Definition at line 203 of file weather.py.

◆ _attr_native_temperature_unit

homeassistant.components.template.weather.WeatherTemplate._attr_native_temperature_unit
private

Definition at line 204 of file weather.py.

◆ _attr_native_visibility_unit

homeassistant.components.template.weather.WeatherTemplate._attr_native_visibility_unit
private

Definition at line 205 of file weather.py.

◆ _attr_native_wind_speed_unit

homeassistant.components.template.weather.WeatherTemplate._attr_native_wind_speed_unit
private

Definition at line 206 of file weather.py.

◆ _attr_should_poll

bool homeassistant.components.template.weather.WeatherTemplate._attr_should_poll = False
staticprivate

Definition at line 169 of file weather.py.

◆ _attr_supported_features

homeassistant.components.template.weather.WeatherTemplate._attr_supported_features
private

Definition at line 227 of file weather.py.

◆ _attribution

homeassistant.components.template.weather.WeatherTemplate._attribution
private

Definition at line 213 of file weather.py.

◆ _attribution_template

homeassistant.components.template.weather.WeatherTemplate._attribution_template
private

Definition at line 184 of file weather.py.

◆ _cloud_coverage

homeassistant.components.template.weather.WeatherTemplate._cloud_coverage
private

Definition at line 220 of file weather.py.

◆ _cloud_coverage_template

homeassistant.components.template.weather.WeatherTemplate._cloud_coverage_template
private

Definition at line 196 of file weather.py.

◆ _condition

homeassistant.components.template.weather.WeatherTemplate._condition
private

Definition at line 210 of file weather.py.

◆ _condition_template

homeassistant.components.template.weather.WeatherTemplate._condition_template
private

Definition at line 181 of file weather.py.

◆ _dew_point

homeassistant.components.template.weather.WeatherTemplate._dew_point
private

Definition at line 221 of file weather.py.

◆ _dew_point_template

homeassistant.components.template.weather.WeatherTemplate._dew_point_template
private

Definition at line 197 of file weather.py.

◆ _forecast_daily_template

homeassistant.components.template.weather.WeatherTemplate._forecast_daily_template
private

Definition at line 190 of file weather.py.

◆ _forecast_hourly_template

homeassistant.components.template.weather.WeatherTemplate._forecast_hourly_template
private

Definition at line 191 of file weather.py.

◆ _forecast_twice_daily_template

homeassistant.components.template.weather.WeatherTemplate._forecast_twice_daily_template
private

Definition at line 192 of file weather.py.

◆ _humidity

homeassistant.components.template.weather.WeatherTemplate._humidity
private

Definition at line 212 of file weather.py.

◆ _humidity_template

homeassistant.components.template.weather.WeatherTemplate._humidity_template
private

Definition at line 183 of file weather.py.

◆ _ozone

homeassistant.components.template.weather.WeatherTemplate._ozone
private

Definition at line 217 of file weather.py.

◆ _ozone_template

homeassistant.components.template.weather.WeatherTemplate._ozone_template
private

Definition at line 188 of file weather.py.

◆ _pressure

homeassistant.components.template.weather.WeatherTemplate._pressure
private

Definition at line 214 of file weather.py.

◆ _pressure_template

homeassistant.components.template.weather.WeatherTemplate._pressure_template
private

Definition at line 185 of file weather.py.

◆ _temperature

homeassistant.components.template.weather.WeatherTemplate._temperature
private

Definition at line 211 of file weather.py.

◆ _temperature_template

homeassistant.components.template.weather.WeatherTemplate._temperature_template
private

Definition at line 182 of file weather.py.

◆ _visibility

homeassistant.components.template.weather.WeatherTemplate._visibility
private

Definition at line 218 of file weather.py.

◆ _visibility_template

homeassistant.components.template.weather.WeatherTemplate._visibility_template
private

Definition at line 189 of file weather.py.

◆ _wind_bearing

homeassistant.components.template.weather.WeatherTemplate._wind_bearing
private

Definition at line 216 of file weather.py.

◆ _wind_bearing_template

homeassistant.components.template.weather.WeatherTemplate._wind_bearing_template
private

Definition at line 187 of file weather.py.

◆ _wind_gust_speed

homeassistant.components.template.weather.WeatherTemplate._wind_gust_speed
private

Definition at line 219 of file weather.py.

◆ _wind_gust_speed_template

homeassistant.components.template.weather.WeatherTemplate._wind_gust_speed_template
private

Definition at line 195 of file weather.py.

◆ _wind_speed

homeassistant.components.template.weather.WeatherTemplate._wind_speed
private

Definition at line 215 of file weather.py.

◆ _wind_speed_template

homeassistant.components.template.weather.WeatherTemplate._wind_speed_template
private

Definition at line 186 of file weather.py.

◆ entity_id

homeassistant.components.template.weather.WeatherTemplate.entity_id

Definition at line 208 of file weather.py.


The documentation for this class was generated from the following file: