Skip to content

Commit 9686558

Browse files
authored
FIx for profile (#75)
1 parent b0b6ab2 commit 9686558

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

lghorizon/lghorizon_api.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,14 @@ class LGHorizonApi:
3636
_customer: LGHorizonCustomer
3737
_channels: Dict[str, LGHorizonChannel]
3838
_entitlements: LGHorizonEntitlements
39-
_profile_id: str
39+
_profile_id: Optional[str]
4040
_initialized: bool = False
4141
_devices: Dict[str, LGHorizonDevice] = {}
4242
_message_factory: LGHorizonMessageFactory = LGHorizonMessageFactory()
4343
_device_state_processor: LGHorizonDeviceStateProcessor | None
4444
_recording_factory: LGHorizonRecordingFactory = LGHorizonRecordingFactory()
4545

46-
def __init__(self, auth: LGHorizonAuth, profile_id: str = "") -> None:
47-
"""Initialize LG Horizon API client."""
46+
def __init__(self, auth: LGHorizonAuth, profile_id: Optional[str]) -> None:
4847
"""Initialize LG Horizon API client.
4948
5049
Args:
@@ -62,7 +61,7 @@ async def initialize(self) -> None:
6261
"""Initialize the API client."""
6362
self._service_config = await self.auth.get_service_config()
6463
self._customer = await self._get_customer_info()
65-
if self._profile_id == "":
64+
if not self._profile_id:
6665
self._profile_id = list(self._customer.profiles.keys())[0]
6766
await self._refresh_entitlements()
6867
await self._refresh_channels()

0 commit comments

Comments
 (0)