Closed 7ooL closed 4 years ago
any thoughts on this?
So, shame on me for letting this languish, you were absolutely right.
Fixed now in https://github.com/Riebart/vivint.py/commit/9fdc59509d7c2d351819ae0935b423c5f7180020 , so the following works as expected:
>>> import os, json, vivint
>>> session = vivint.VivintCloudSession(os.environ["USERNAME"], os.environ["PASSWORD"]); panels = session.get_panels();
p = panels[0]
>>> p.get_armed_state()
'disarmed'
>>> p.update_devices()
>>> p.get_armed_state()
'armed_stay'
>>> p.update_devices()
>>> p.get_armed_state()
'disarmed'
>>>
It also supports arming and disarming with PanelRoot.set_armed_state()
using either strings, or integer armed state IDs.
I'm getting my feet wet with your api script and i can't seem to get the status of alarm to update between polling.
` log("Establishing session", verbose) session = vivint.VivintCloudSession(username,password) log("Listing panels", verbose) panels = session.get_panels()
`
despite changing the alarm status on my phone it stays the same each poll. if i restart the script the updated status is shown. I;m under the impression that update_devices() should pull the new states.