Beispiel #1
0
 async def get_auth(self, hass: HomeAssistantType, hapid, pin):
     """Create a HomematicIP access point object."""
     auth = AsyncAuth(hass.loop, async_get_clientsession(hass))
     try:
         await auth.init(hapid)
         if pin:
             auth.pin = pin
         await auth.connectionRequest("HomeAssistant")
     except HmipConnectionError:
         return False
     return auth
Beispiel #2
0
 async def get_auth(self, hass, hapid, pin):
     """Create a HomematicIP access point object."""
     auth = AsyncAuth(hass.loop, async_get_clientsession(hass))
     try:
         await auth.init(hapid)
         if pin:
             auth.pin = pin
         await auth.connectionRequest('HomeAssistant')
     except HmipConnectionError:
         return False
     return auth
Beispiel #3
0
 async def get_auth(self, opp: OpenPeerPower, hapid, pin):
     """Create a HomematicIP access point object."""
     auth = AsyncAuth(opp.loop, async_get_clientsession(opp))
     try:
         await auth.init(hapid)
         if pin:
             auth.pin = pin
         await auth.connectionRequest("OpenPeerPower")
     except HmipConnectionError:
         return None
     return auth
Beispiel #4
0
    async def get_auth(self, hass, hapid, pin):
        """Create a HomematicIP access point object."""
        from homematicip.aio.auth import AsyncAuth
        from homematicip.base.base_connection import HmipConnectionError

        auth = AsyncAuth(hass.loop, async_get_clientsession(hass))
        try:
            await auth.init(hapid)
            if pin:
                auth.pin = pin
            await auth.connectionRequest('HomeAssistant')
        except HmipConnectionError:
            return False
        return auth
Beispiel #5
0
    async def get_auth(self, hass, hapid, pin):
        """Create a HomematicIP access point object."""
        from homematicip.aio.auth import AsyncAuth
        from homematicip.base.base_connection import HmipConnectionError

        auth = AsyncAuth(hass.loop, async_get_clientsession(hass))
        print(auth)
        try:
            await auth.init(hapid)
            if pin:
                auth.pin = pin
            await auth.connectionRequest('HomeAssistant')
        except HmipConnectionError:
            return False
        return auth