Home Assistant Unofficial Reference 2024.12.1
hub.py
Go to the documentation of this file.
1 """Hub."""
2 
3 from pygti.gti import GTI, Auth
4 
5 
6 class GTIHub:
7  """GTI Hub."""
8 
9  def __init__(self, host, username, password, session):
10  """Initialize."""
11  self.hosthost = host
12  self.usernameusername = username
13  self.passwordpassword = password
14 
15  self.gtigti = GTI(Auth(session, self.usernameusername, self.passwordpassword, self.hosthost))
16 
17  async def authenticate(self):
18  """Test if we can authenticate with the host."""
19 
20  return await self.gtigti.init()
def __init__(self, host, username, password, session)
Definition: hub.py:9