Home Assistant Unofficial Reference 2024.12.1
device.py
Go to the documentation of this file.
1 """Adapter to wrap the pyjuicenet api for home assistant."""
2 
3 
4 class JuiceNetApi:
5  """Represent a connection to JuiceNet."""
6 
7  def __init__(self, api):
8  """Create an object from the provided API instance."""
9  self.apiapi = api
10  self._devices_devices = []
11 
12  async def setup(self):
13  """JuiceNet device setup."""
14  self._devices_devices = await self.apiapi.get_devices()
15 
16  @property
17  def devices(self) -> list:
18  """Get a list of devices managed by this account."""
19  return self._devices_devices