forked from homeassistant-projects/pyadtpulse
-
Notifications
You must be signed in to change notification settings - Fork 0
Cannot login asynchronously with a synchronous session #9
Copy link
Copy link
Open
Description
I just updated to python 3.11 and reran the pip installer for pyadtpulse. Previous working script now receives the following errors.
Here's the code
def disarm_alarm():
adt = PyADTPulse(
username,
password,
fingerprint
)
time.sleep(5)
for site in adt.sites:
site.status
site.disarm()
disarm_alarm()
This is the error when using the 3.11 interpreter
adtpulse-arm.py, line 36, at top level
File '/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyadtpulse/__init__.py', line 63, in __init__
self.login()
File '/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyadtpulse/__init__.py', line 164, in login
raise self._login_exception
File '/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyadtpulse/__init__.py', line 116, in _sync_loop
await self.async_login()
File '/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyadtpulse/__init__.py', line 236, in async_login
self._pulse_connection_properties.check_async(
File '/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyadtpulse/pulse_connection_properties.py', line 153, in check_async
raise RuntimeError(message)
RuntimeError: Cannot login asynchronously with a synchronous session
When I run the same code using the 3.10 interpreter it works properly:
/usr/local/bin/python3.10 /Users/ryanbuckner/Library/Application Support/JetBrains/PyCharmCE2023.1/scratches/scratch_6.py
Unknown sensor type for 'Audible Panic Button/Pendant', defaulting to doorWindow
Warning, could not retrieve last update for zone, defaulting to 1970-01-01 00:00:00
Warning, could not retrieve last update for zone, defaulting to 1970-01-01 00:00:00
Attempting to set alarm status off to existing status off
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels