Remove websocket_api send_big_result (#75452)

This commit is contained in:
uvjustin 2022-07-20 12:08:11 +08:00 committed by GitHub
parent 51ed9ee59d
commit d989e4373d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 27 additions and 201 deletions

View file

@ -11,7 +11,6 @@ import voluptuous as vol
from homeassistant.auth.models import RefreshToken, User
from homeassistant.core import Context, HomeAssistant, callback
from homeassistant.exceptions import HomeAssistantError, Unauthorized
from homeassistant.helpers.json import JSON_DUMP
from . import const, messages
@ -54,10 +53,6 @@ class ActiveConnection:
"""Send a result message."""
self.send_message(messages.result_message(msg_id, result))
def send_big_result(self, msg_id: int, result: Any) -> None:
"""Send a result message that would be expensive to JSON serialize."""
self.send_message(JSON_DUMP(messages.result_message(msg_id, result)))
@callback
def send_error(self, msg_id: int, code: str, message: str) -> None:
"""Send a error message."""