mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 12:45:28 +02:00
Fix two more instances of JSON parsing synology (#7014)
Add an optional extended description…
This commit is contained in:
committed by
Pascal Vizeli
parent
d5e3cd51a5
commit
90e73fda3c
@@ -129,7 +129,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
||||
_LOGGER.exception("Error on %s", syno_camera_url)
|
||||
return False
|
||||
|
||||
camera_resp = yield from camera_req.json()
|
||||
camera_resp = yield from camera_req.json(content_type=None)
|
||||
cameras = camera_resp['data']['cameras']
|
||||
|
||||
# add cameras
|
||||
@@ -174,7 +174,7 @@ def get_session_id(hass, websession, username, password, login_url, timeout):
|
||||
login_url,
|
||||
params=auth_payload
|
||||
)
|
||||
auth_resp = yield from auth_req.json()
|
||||
auth_resp = yield from auth_req.json(content_type=None)
|
||||
return auth_resp['data']['sid']
|
||||
|
||||
except (asyncio.TimeoutError, aiohttp.ClientError):
|
||||
|
Reference in New Issue
Block a user