Prefer HTTPStatus over int in HA view JSON functions (#56504)
* Prefer HTTPStatus over int in HA view JSON functions * Update zwave tests to not expect a fixed typo
This commit is contained in:
parent
39aaa383b3
commit
d8d34fdd3b
26 changed files with 191 additions and 190 deletions
|
@ -1,6 +1,7 @@
|
|||
"""Config flow to configure Logi Circle component."""
|
||||
import asyncio
|
||||
from collections import OrderedDict
|
||||
from http import HTTPStatus
|
||||
|
||||
import async_timeout
|
||||
from logi_circle import LogiCircle
|
||||
|
@ -14,7 +15,6 @@ from homeassistant.const import (
|
|||
CONF_CLIENT_ID,
|
||||
CONF_CLIENT_SECRET,
|
||||
CONF_SENSORS,
|
||||
HTTP_BAD_REQUEST,
|
||||
)
|
||||
from homeassistant.core import callback
|
||||
|
||||
|
@ -201,5 +201,6 @@ class LogiCircleAuthCallbackView(HomeAssistantView):
|
|||
)
|
||||
return self.json_message("Authorisation code saved")
|
||||
return self.json_message(
|
||||
"Authorisation code missing from query string", status_code=HTTP_BAD_REQUEST
|
||||
"Authorisation code missing from query string",
|
||||
status_code=HTTPStatus.BAD_REQUEST,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue