This was causing the wheels to fail to build. We need
to workout why when we don't have release pressure
This reverts commit d9d22a9556
.
This commit is contained in:
parent
9cea936c22
commit
c365454afb
18 changed files with 67 additions and 127 deletions
|
@ -9,7 +9,6 @@ import voluptuous as vol
|
|||
|
||||
from homeassistant.core import Event, State
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers.json import JSON_DUMP
|
||||
from homeassistant.util.json import (
|
||||
find_paths_unserializable_data,
|
||||
format_unserializable_data,
|
||||
|
@ -194,15 +193,15 @@ def compressed_state_dict_add(state: State) -> dict[str, Any]:
|
|||
def message_to_json(message: dict[str, Any]) -> str:
|
||||
"""Serialize a websocket message to json."""
|
||||
try:
|
||||
return JSON_DUMP(message)
|
||||
return const.JSON_DUMP(message)
|
||||
except (ValueError, TypeError):
|
||||
_LOGGER.error(
|
||||
"Unable to serialize to JSON. Bad data found at %s",
|
||||
format_unserializable_data(
|
||||
find_paths_unserializable_data(message, dump=JSON_DUMP)
|
||||
find_paths_unserializable_data(message, dump=const.JSON_DUMP)
|
||||
),
|
||||
)
|
||||
return JSON_DUMP(
|
||||
return const.JSON_DUMP(
|
||||
error_message(
|
||||
message["id"], const.ERR_UNKNOWN_ERROR, "Invalid JSON in response"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue