Skip to content

Commit

Permalink
localapi: fix unsupported version
Browse files Browse the repository at this point in the history
If the Local API doesn't support "version" it will return:
"Method not provided or not supported".
So we should catch an InvalidMethod exception.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
  • Loading branch information
Noltari committed Jun 19, 2023
1 parent 1925a79 commit e022f4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aioairzone/localapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ async def check_features(self, update: bool) -> None:
version = await self.get_version()
if API_VERSION in version:
self.version = version[API_VERSION]
except (InvalidHost, APIError):
except InvalidMethod:
pass

self.api_features_checked = True
Expand Down

0 comments on commit e022f4f

Please sign in to comment.