Skip to content

Commit

Permalink
allow category lists
Browse files Browse the repository at this point in the history
  • Loading branch information
siku2 committed Aug 24, 2023
1 parent 2cf354a commit 77c6a99
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion custom_components/vzug/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,13 @@ async def get_last_push_notifications(
)

async def list_categories(self) -> list[str]:
# TODO: reject empty responses if the device category is known to have some
return await self._command(
"hh", command="getCategories", expected_type=list, reject_empty=True
"hh",
command="getCategories",
expected_type=list,
# the API sometimes wrongly returns an empty list, but there are apparently also appliances (AdoraWash V4000) which don't have any categories
reject_empty=False,
)

async def get_category(self, value: str) -> Category:
Expand Down

0 comments on commit 77c6a99

Please sign in to comment.