From 86fc977ff510f9ce64684f98fd375324ab29cb20 Mon Sep 17 00:00:00 2001 From: Daniel Correa Lobato Date: Tue, 4 Aug 2020 11:51:15 -0300 Subject: [PATCH] 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/) --- homeassistant/components/clickatell/notify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/clickatell/notify.py b/homeassistant/components/clickatell/notify.py index 0c1ce2e9585..966dbdee6e2 100644 --- a/homeassistant/components/clickatell/notify.py +++ b/homeassistant/components/clickatell/notify.py @@ -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)