From 23f54b07c70814efdac33dfe062ff070bd7f6e6a Mon Sep 17 00:00:00 2001 From: Robbie Trencheny Date: Mon, 24 Oct 2016 18:46:47 -0700 Subject: [PATCH] Dont load notify.ios if no devices exist. Thanks @arsaboo for catching this. --- homeassistant/components/notify/ios.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/homeassistant/components/notify/ios.py b/homeassistant/components/notify/ios.py index 2517020434e..940804ab49c 100644 --- a/homeassistant/components/notify/ios.py +++ b/homeassistant/components/notify/ios.py @@ -45,6 +45,13 @@ def get_service(hass, config): # Need this to enable requirements checking in the app. hass.config.components.append("notify.ios") + if not ios.devices_with_push(): + _LOGGER.error(("The notify.ios platform was loaded but no " + "devices exist! Please check the documentation at " + "https://home-assistant.io/components/notify.ios/ " + "for more information")) + return None + return iOSNotificationService()