Functions | |
| bytes | _async_get_all_descriptions_json (HomeAssistant hass) |
| list[State] | _async_get_allowed_states (HomeAssistant hass, ActiveConnection connection) |
| template.Template | _cached_template (str template_str, HomeAssistant hass) |
| None | _forward_entity_changes (Callable[[str|bytes|dict[str, Any]], None] send_message, set[str]|None entity_ids, Callable[[str], bool]|None entity_filter, User user, bytes message_id_as_bytes, Event[EventStateChangedData] event) |
| None | _forward_events_check_permissions (Callable[[bytes|str|dict[str, Any]], None] send_message, User user, bytes message_id_as_bytes, Event event) |
| None | _forward_events_unconditional (Callable[[bytes|str|dict[str, Any]], None] send_message, bytes message_id_as_bytes, Event event) |
| None | _send_handle_entities_init_response (ActiveConnection connection, bytes message_id_as_bytes, list[bytes] serialized_states) |
| None | _send_handle_get_states_response (ActiveConnection connection, int msg_id, list[bytes] serialized_states) |
| dict[str, Any] | _serialize_entity_sources (dict[str, entity.EntityInfo] entity_infos) |
| None | async_register_commands (HomeAssistant hass, Callable[[HomeAssistant, const .WebSocketCommandHandler], None] async_reg) |
| None | handle_call_service (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| None | handle_entity_source (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| None | handle_execute_script (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| None | handle_fire_event (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| None | handle_get_config (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| None | handle_get_services (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| None | handle_get_states (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| None | handle_integration_descriptions (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| None | handle_integration_setup_info (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| None | handle_manifest_get (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| None | handle_manifest_list (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| None | handle_ping (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| None | handle_render_template (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| None | handle_subscribe_bootstrap_integrations (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| None | handle_subscribe_entities (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| None | handle_subscribe_events (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| None | handle_subscribe_trigger (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| None | handle_supported_features (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| None | handle_test_condition (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| None | handle_unsubscribe_events (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| None | handle_validate_config (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| dict[str, Any] | pong_message (int iden) |
Variables | |
| _LOGGER = logging.getLogger(__name__) | |
| string | ALL_SERVICE_DESCRIPTIONS_JSON_CACHE = "websocket_api_all_service_descriptions_json" |
Commands part of Websocket API.
|
private |
Return JSON of descriptions (i.e. user documentation) for all service calls.
Definition at line 489 of file commands.py.
|
private |
Definition at line 313 of file commands.py.
|
private |
Return a cached template.
Definition at line 583 of file commands.py.
|
private |
Forward entity state changed events to websocket.
Definition at line 371 of file commands.py.
|
private |
Forward state changed events to websocket.
Definition at line 109 of file commands.py.
|
private |
Forward events to websocket.
Definition at line 129 of file commands.py.
|
private |
Send handle entities init response.
Definition at line 470 of file commands.py.
|
private |
Send handle get states response.
Definition at line 359 of file commands.py.
|
private |
Prepare a websocket response from a dict of entity sources.
Definition at line 686 of file commands.py.
| None homeassistant.components.websocket_api.commands.async_register_commands | ( | HomeAssistant | hass, |
| Callable[[HomeAssistant, const.WebSocketCommandHandler], None] | async_reg | ||
| ) |
Register commands.
Definition at line 75 of file commands.py.
| None homeassistant.components.websocket_api.commands.handle_call_service | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Handle call service command.
Definition at line 234 of file commands.py.
| None homeassistant.components.websocket_api.commands.handle_entity_source | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Handle entity source command.
Definition at line 698 of file commands.py.
| None homeassistant.components.websocket_api.commands.handle_execute_script | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Handle execute script command.
Definition at line 803 of file commands.py.
| None homeassistant.components.websocket_api.commands.handle_fire_event | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Handle fire event command.
Definition at line 849 of file commands.py.
| None homeassistant.components.websocket_api.commands.handle_get_config | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Handle get config command.
Definition at line 516 of file commands.py.
| None homeassistant.components.websocket_api.commands.handle_get_services | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Handle get services command.
Definition at line 506 of file commands.py.
| None homeassistant.components.websocket_api.commands.handle_get_states | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Handle get states command.
Definition at line 329 of file commands.py.
| None homeassistant.components.websocket_api.commands.handle_integration_descriptions | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Get metadata for all brands and integrations.
Definition at line 921 of file commands.py.
| None homeassistant.components.websocket_api.commands.handle_integration_setup_info | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Handle integrations command.
Definition at line 560 of file commands.py.
| None homeassistant.components.websocket_api.commands.handle_manifest_get | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Handle integrations command.
Definition at line 546 of file commands.py.
| None homeassistant.components.websocket_api.commands.handle_manifest_list | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Handle integrations command.
Definition at line 527 of file commands.py.
| None homeassistant.components.websocket_api.commands.handle_ping | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Handle ping command.
Definition at line 575 of file commands.py.
| None homeassistant.components.websocket_api.commands.handle_render_template | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Handle render_template command.
Definition at line 600 of file commands.py.
| None homeassistant.components.websocket_api.commands.handle_subscribe_bootstrap_integrations | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Handle subscribe bootstrap integrations command.
Definition at line 186 of file commands.py.
| None homeassistant.components.websocket_api.commands.handle_subscribe_entities | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Handle subscribe entities command.
Definition at line 405 of file commands.py.
| None homeassistant.components.websocket_api.commands.handle_subscribe_events | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Handle subscribe events command.
Definition at line 145 of file commands.py.
| None homeassistant.components.websocket_api.commands.handle_subscribe_trigger | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Handle subscribe trigger command.
Definition at line 726 of file commands.py.
| None homeassistant.components.websocket_api.commands.handle_supported_features | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Handle setting supported features.
Definition at line 910 of file commands.py.
| None homeassistant.components.websocket_api.commands.handle_test_condition | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Handle test condition command.
Definition at line 777 of file commands.py.
| None homeassistant.components.websocket_api.commands.handle_unsubscribe_events | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Handle unsubscribe events command.
Definition at line 210 of file commands.py.
| None homeassistant.components.websocket_api.commands.handle_validate_config | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Handle validate config command.
Definition at line 868 of file commands.py.
| dict[str, Any] homeassistant.components.websocket_api.commands.pong_message | ( | int | iden | ) |
Return a pong message.
Definition at line 103 of file commands.py.
|
private |
Definition at line 71 of file commands.py.
| string homeassistant.components.websocket_api.commands.ALL_SERVICE_DESCRIPTIONS_JSON_CACHE = "websocket_api_all_service_descriptions_json" |
Definition at line 69 of file commands.py.