Switch mobile_app to use the json helper (#73870)

This commit is contained in:
J. Nick Koston 2022-06-22 21:32:48 -05:00 committed by GitHub
parent 168065a9a0
commit b5f6f785d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,7 +13,7 @@ from nacl.secret import SecretBox
from homeassistant.const import ATTR_DEVICE_ID, CONTENT_TYPE_JSON
from homeassistant.core import Context, HomeAssistant
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.json import JSONEncoder
from homeassistant.helpers.json import JSONEncoder, json_loads
from .const import (
ATTR_APP_DATA,
@ -85,7 +85,7 @@ def _decrypt_payload_helper(
key_bytes = get_key_bytes(key, keylen)
msg_bytes = decrypt(ciphertext, key_bytes)
message = json.loads(msg_bytes.decode("utf-8"))
message = json_loads(msg_bytes)
_LOGGER.debug("Successfully decrypted mobile_app payload")
return message