mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Merge pull request #7385 from robbiet480/dont-validate-ios-identify
Disable iOS device identify schema validation for now
This commit is contained in:
commit
8ba7e61ed6
@ -11,7 +11,7 @@ import logging
|
|||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
from voluptuous.humanize import humanize_error
|
# from voluptuous.humanize import humanize_error
|
||||||
|
|
||||||
from homeassistant.helpers import config_validation as cv
|
from homeassistant.helpers import config_validation as cv
|
||||||
|
|
||||||
@ -288,15 +288,16 @@ class iOSIdentifyDeviceView(HomeAssistantView):
|
|||||||
def post(self, request):
|
def post(self, request):
|
||||||
"""Handle the POST request for device identification."""
|
"""Handle the POST request for device identification."""
|
||||||
try:
|
try:
|
||||||
req_data = yield from request.json()
|
data = yield from request.json()
|
||||||
except ValueError:
|
except ValueError:
|
||||||
return self.json_message("Invalid JSON", HTTP_BAD_REQUEST)
|
return self.json_message("Invalid JSON", HTTP_BAD_REQUEST)
|
||||||
|
|
||||||
try:
|
# Commented for now while iOS app is getting frequent updates
|
||||||
data = IDENTIFY_SCHEMA(req_data)
|
# try:
|
||||||
except vol.Invalid as ex:
|
# data = IDENTIFY_SCHEMA(req_data)
|
||||||
return self.json_message(humanize_error(request.json, ex),
|
# except vol.Invalid as ex:
|
||||||
HTTP_BAD_REQUEST)
|
# return self.json_message(humanize_error(request.json, ex),
|
||||||
|
# HTTP_BAD_REQUEST)
|
||||||
|
|
||||||
data[ATTR_LAST_SEEN_AT] = datetime.datetime.now()
|
data[ATTR_LAST_SEEN_AT] = datetime.datetime.now()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user