Allow specific status codes while notifying mobile_app devices (#30496)

* Removed check and return with a notification status of 201

* Allow additional result codes

Allow 200, 201, and 202 as valid result codes
This commit is contained in:
rccoleman authored and Paulus Schoutsen committed 2020-01-06 23:41:07 +01:00
1 parent 5ec5df77cc
commit 4a2987e790
1 file changed
+2 -2
@@ -134,9 +134,9 @@ class MobileAppNotificationService(BaseNotificationService):
response = await self._session.post(push_url, json=data)
result = await response.json()
if response.status == 201:
if response.status in [200, 201, 202]:
log_rate_limits(self.hass, entry_data[ATTR_DEVICE_NAME], result)
return
continue
fallback_error = result.get("errorMessage", "Unknown error")
fallback_message = "Internal server error, please try again later: {}".format(