def get_service(hass, config, discovery_info=None): """Get the iOS notification service.""" if "notify.ios" not in hass.config.components: # Need this to enable requirements checking in the app. hass.config.components.add("notify.ios") if not ios.devices_with_push(hass): return None return iOSNotificationService()
def get_service(hass, config, discovery_info=None): """Get the iOS notification service.""" if "notify.ios" not in hass.config.components: # Need this to enable requirements checking in the app. hass.config.components.add("notify.ios") if not ios.devices_with_push(hass): _LOGGER.error("The notify.ios platform was loaded but no " "devices exist! Please check the documentation at " "https://home-assistant.io/ecosystem/ios/notifications" "/ for more information") return None return iOSNotificationService()
def get_service(hass, config): """Get the iOS notification service.""" if "notify.ios" not in hass.config.components: # 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()
def targets(self): """Return a dictionary of registered targets.""" return ios.devices_with_push(self.hass)