Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.weather.websocket_api Namespace Reference

Functions

None async_setup (HomeAssistant hass)
 
None ws_convertible_units (HomeAssistant hass, websocket_api.ActiveConnection connection, dict[str, Any] msg)
 
None ws_subscribe_forecast (HomeAssistant hass, websocket_api.ActiveConnection connection, dict[str, Any] msg)
 

Variables

dictionary FORECAST_TYPE_TO_FLAG
 

Detailed Description

The weather websocket API.

Function Documentation

◆ async_setup()

None homeassistant.components.weather.websocket_api.async_setup ( HomeAssistant  hass)
Set up the weather websocket API.

Definition at line 24 of file websocket_api.py.

◆ ws_convertible_units()

None homeassistant.components.weather.websocket_api.ws_convertible_units ( HomeAssistant  hass,
websocket_api.ActiveConnection  connection,
dict[str, Any]   msg 
)
Return supported units for a device class.

Definition at line 36 of file websocket_api.py.

◆ ws_subscribe_forecast()

None homeassistant.components.weather.websocket_api.ws_subscribe_forecast ( HomeAssistant  hass,
websocket_api.ActiveConnection  connection,
dict[str, Any]   msg 
)
Subscribe to weather forecasts.

Definition at line 54 of file websocket_api.py.

Variable Documentation

◆ FORECAST_TYPE_TO_FLAG

dictionary homeassistant.components.weather.websocket_api.FORECAST_TYPE_TO_FLAG
Initial value:
1 = {
2  "daily": WeatherEntityFeature.FORECAST_DAILY,
3  "hourly": WeatherEntityFeature.FORECAST_HOURLY,
4  "twice_daily": WeatherEntityFeature.FORECAST_TWICE_DAILY,
5 }

Definition at line 16 of file websocket_api.py.