mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Update notify.py (#38526)
Clickatell can returns 202 when a message is accepted for delivery. So, success can be indicated by 200 or 202 code (https://archive.clickatell.com/developers/api-docs/http-status-codes-rest/)
This commit is contained in:
parent
df8e179207
commit
86fc977ff5
@ -37,5 +37,5 @@ class ClickatellNotificationService(BaseNotificationService):
|
||||
data = {"apiKey": self.api_key, "to": self.recipient, "content": message}
|
||||
|
||||
resp = requests.get(BASE_API_URL, params=data, timeout=5)
|
||||
if (resp.status_code != HTTP_OK) or (resp.status_code != 201):
|
||||
if (resp.status_code != HTTP_OK) or (resp.status_code != 202):
|
||||
_LOGGER.error("Error %s : %s", resp.status_code, resp.text)
|
||||
|
Loading…
x
Reference in New Issue
Block a user