Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file.

## [0.5.5] - 2025-10-05

### Changed

- Change login from json_data to form_data for v6 login

## [0.5.4] - 2025-10-01

### Added
Expand Down
20 changes: 12 additions & 8 deletions airos/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,16 +268,20 @@ async def login(self) -> None:
"POST", self._login_urls["default"], json_data=payload
)
except AirOSUrlNotFoundError:
try:
await self._request_json(
"POST", self._login_urls["v6_alternative"], json_data=payload
)
except AirOSConnectionSetupError as err:
raise AirOSConnectionSetupError(
"Failed to login to default and alternate AirOS device urls"
) from err
pass # Try next URL
except AirOSConnectionSetupError as err:
raise AirOSConnectionSetupError("Failed to login to AirOS device") from err
else:
return

try: # Alternative URL
await self._request_json(
"POST", self._login_urls["v6_alternative"], form_data=payload
)
except AirOSConnectionSetupError as err:
raise AirOSConnectionSetupError(
"Failed to login to default and alternate AirOS device urls"
) from err

async def status(self) -> AirOSDataModel:
"""Retrieve status from the device."""
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "airos"
version = "0.5.4"
version = "0.5.5"
license = "MIT"
description = "Ubiquiti airOS module(s) for Python 3."
readme = "README.md"
Expand Down