File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ from airos.airos6 import AirOS6, AirOS6Data
6363from airos.airos8 import AirOS8, AirOS8Data
6464from airos.helpers import DetectDeviceData, async_get_firmware_data
6565
66+
6667async def main ():
6768 """ Main function to demonstrate library usage."""
6869 # Create an aiohttp session with SSL verification disabled.
@@ -75,7 +76,7 @@ async def main():
7576 " host" : " 192.168.1.2" ,
7677 " username" : " ubnt" ,
7778 " password" : " password" ,
78- " session" : session
79+ " session" : session,
7980 }
8081
8182 device_data: DetectDeviceData = await async_get_firmware_data(** conn_data)
@@ -88,7 +89,6 @@ async def main():
8889 # Initialize the AirOS device object.
8990 airos_device = airos_class(** conn_data)
9091
91-
9292 try :
9393 # Step 1: Login to the device.
9494 login_result = await airos_device.login()
@@ -120,6 +120,7 @@ async def main():
120120 # Ensure the aiohttp session is closed properly.
121121 await session.close()
122122
123+
123124if __name__ == " __main__" :
124125 asyncio.run(main())
125126```
You can’t perform that action at this time.
0 commit comments