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
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
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
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
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