File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 1111
1212EMAIL = "<EMAIL>"
1313PASSWORD = "<PASSWORD>"
14+ OPEN_CLOSE = False
1415
1516async def main () -> None :
1617 """Create the aiohttp session and run the example."""
17- logging .basicConfig (level = logging .INFO )
18+ logging .basicConfig (level = logging .DEBUG )
1819 async with ClientSession () as websession :
1920 try :
2021 # Create an API object:
22+ print (f"{ EMAIL } { PASSWORD } " )
2123 api = await login (EMAIL , PASSWORD , websession )
2224
2325 # Get the account ID:
@@ -40,12 +42,14 @@ async def main() -> None:
4042 _LOGGER .info ("Close Allowed: %s" , device .close_allowed )
4143 _LOGGER .info ("Current State: %s" , device .state )
4244
43- try :
44- await device .open ()
45- await asyncio .sleep (15 )
46- await device .close ()
47- except RequestError as err :
48- _LOGGER .error (err )
45+ if OPEN_CLOSE :
46+ try :
47+ await device .open ()
48+ await asyncio .sleep (15 )
49+ await device .close ()
50+ except RequestError as err :
51+ _LOGGER .error (err )
52+
4953 except MyQError as err :
5054 _LOGGER .error ("There was an error: %s" , err )
5155
You can’t perform that action at this time.
0 commit comments