コード例 #1
0
ファイル: smartapp.py プロジェクト: fabiandevia/home
 async def create_subscription(target: str):
     sub = Subscription()
     sub.installed_app_id = installed_app_id
     sub.location_id = location_id
     sub.source_type = SourceType.CAPABILITY
     sub.capability = target
     try:
         await api.create_subscription(sub)
         _LOGGER.debug("Created subscription for '%s' under app '%s'",
                       target, installed_app_id)
     except Exception:  # pylint:disable=broad-except
         _LOGGER.exception("Failed to create subscription for '%s' under "
                           "app '%s'", target, installed_app_id)
コード例 #2
0
ファイル: smartapp.py プロジェクト: Martwall/home-assistant
 async def create_subscription(target):
     sub = Subscription()
     sub.installed_app_id = req.installed_app_id
     sub.location_id = req.location_id
     sub.source_type = SourceType.CAPABILITY
     sub.capability = target
     try:
         await api.create_subscription(sub)
         _LOGGER.debug("Created subscription for '%s' under app '%s'",
                       target, req.installed_app_id)
     except Exception:  # pylint:disable=broad-except
         _LOGGER.exception("Failed to create subscription for '%s' under "
                           "app '%s'", target, req.installed_app_id)
コード例 #3
0
ファイル: conftest.py プロジェクト: karliemeads/core
 def _factory(capability):
     sub = Subscription()
     sub.capability = capability
     return sub
コード例 #4
0
ファイル: conftest.py プロジェクト: boced66/home-assistant
 def _factory(capability):
     sub = Subscription()
     sub.capability = capability
     return sub