Skip to content

Commit

Permalink
Add asynchronous method to retrieve temperature unit in BSBLAN class
Browse files Browse the repository at this point in the history
  • Loading branch information
liudger committed Nov 1, 2024
1 parent 0b5d383 commit 1243611
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/bsblan/bsblan.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,17 @@ async def _initialize_temperature_range(self) -> None:
else:
self._temperature_unit = "°F"

async def get_temperature_unit(self) -> str:
"""Get the unit of temperature.
Returns:
str: The unit of temperature.
"""
if self._temperature_unit is None:
await self._initialize_temperature_range()
return self._temperature_unit

async def _initialize_api_data(self) -> APIConfig:
"""Initialize and cache the API data.
Expand Down

0 comments on commit 1243611

Please sign in to comment.