File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33All notable changes to this project will be documented in this file.
44
5+ ## [ 0.5.5] - 2025-10-05
6+
7+ ### Changed
8+
9+ - Change login from json_data to form_data for v6 login
10+
511## [ 0.5.4] - 2025-10-01
612
713### Added
Original file line number Diff line number Diff line change @@ -268,16 +268,23 @@ async def login(self) -> None:
268268 "POST" , self ._login_urls ["default" ], json_data = payload
269269 )
270270 except AirOSUrlNotFoundError :
271- try :
272- await self ._request_json (
273- "POST" , self ._login_urls ["v6_alternative" ], json_data = payload
274- )
275- except AirOSConnectionSetupError as err :
276- raise AirOSConnectionSetupError (
277- "Failed to login to default and alternate AirOS device urls"
278- ) from err
271+ pass # Try next URL
279272 except AirOSConnectionSetupError as err :
280273 raise AirOSConnectionSetupError ("Failed to login to AirOS device" ) from err
274+ else :
275+ return
276+
277+ try : # Alternative URL
278+ await self ._request_json (
279+ "POST" ,
280+ self ._login_urls ["v6_alternative" ],
281+ form_data = payload ,
282+ ct_form = True ,
283+ )
284+ except AirOSConnectionSetupError as err :
285+ raise AirOSConnectionSetupError (
286+ "Failed to login to default and alternate AirOS device urls"
287+ ) from err
281288
282289 async def status (self ) -> AirOSDataModel :
283290 """Retrieve status from the device."""
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44
55[project ]
66name = " airos"
7- version = " 0.5.4 "
7+ version = " 0.5.5 "
88license = " MIT"
99description = " Ubiquiti airOS module(s) for Python 3."
1010readme = " README.md"
You can’t perform that action at this time.
0 commit comments