File tree Expand file tree Collapse file tree 3 files changed +19
-9
lines changed Expand file tree Collapse file tree 3 files changed +19
-9
lines changed 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,20 @@ 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" , self ._login_urls ["v6_alternative" ], form_data = payload
280+ )
281+ except AirOSConnectionSetupError as err :
282+ raise AirOSConnectionSetupError (
283+ "Failed to login to default and alternate AirOS device urls"
284+ ) from err
281285
282286 async def status (self ) -> AirOSDataModel :
283287 """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