Exemplo n.º 1
0
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()
Exemplo n.º 2
0
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()
Exemplo n.º 3
0
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()
Exemplo n.º 4
0
 def targets(self):
     """Return a dictionary of registered targets."""
     return ios.devices_with_push(self.hass)
Exemplo n.º 5
0
 def targets(self):
     """Return a dictionary of registered targets."""
     return ios.devices_with_push(self.hass)