Skip to content

Commit

Permalink
Use HTTP_OK constant
Browse files Browse the repository at this point in the history
  • Loading branch information
definitio committed Jan 8, 2021
1 parent 1d0bf66 commit d35a34c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/rhvoice/tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import voluptuous as vol
from aiohttp import ClientError
from homeassistant.components.tts import PLATFORM_SCHEMA, Provider
from homeassistant.const import CONF_HOST, CONF_PORT, CONF_TIMEOUT
from homeassistant.const import CONF_HOST, CONF_PORT, CONF_TIMEOUT, HTTP_OK
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers.aiohttp_client import async_get_clientsession

Expand Down Expand Up @@ -122,7 +122,7 @@ async def async_get_tts_audio(self, message, language, options=None):

request = await websession.get(self._url, params=url_param)

if request.status != 200:
if request.status != HTTP_OK:
_LOGGER.error(
"Error %d on load URL %s", request.status, request.url
)
Expand Down

0 comments on commit d35a34c

Please sign in to comment.