diff --git a/homeassistant/components/notify/ios.py b/homeassistant/components/notify/ios.py index e788beda0c4..6486eed1512 100644 --- a/homeassistant/components/notify/ios.py +++ b/homeassistant/components/notify/ios.py @@ -84,6 +84,11 @@ class iOSNotificationService(BaseNotificationService): data[ATTR_DATA] = kwargs.get(ATTR_DATA) for target in targets: + if target not in ios.enabled_push_ids(): + _LOGGER.error("The target (%s) does not exist in ios.conf.", + targets) + return + data[ATTR_TARGET] = target req = requests.post(PUSH_URL, json=data, timeout=10)