コード例 #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()
コード例 #2
0
ファイル: ios.py プロジェクト: EarthlingRich/home-assistant
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()
コード例 #3
0
ファイル: ios.py プロジェクト: zifnab06/home-assistant
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()
コード例 #4
0
ファイル: ios.py プロジェクト: EarthlingRich/home-assistant
 def targets(self):
     """Return a dictionary of registered targets."""
     return ios.devices_with_push(self.hass)
コード例 #5
0
 def targets(self):
     """Return a dictionary of registered targets."""
     return ios.devices_with_push(self.hass)