From 4a2987e790afe3d79cf1f15f5b003c041642b967 Mon Sep 17 00:00:00 2001 From: rccoleman Date: Mon, 6 Jan 2020 14:41:07 -0800 Subject: [PATCH] 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 --- homeassistant/components/mobile_app/notify.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/mobile_app/notify.py b/homeassistant/components/mobile_app/notify.py index b51bf235cf0..b16c47e29c0 100644 --- a/homeassistant/components/mobile_app/notify.py +++ b/homeassistant/components/mobile_app/notify.py @@ -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(