Skip to content

Commit

Permalink
Update risco_cloud.py (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
agmckaybro authored Oct 16, 2024
1 parent 6aa2db1 commit 4fa3607
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyrisco/cloud/risco_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ async def _authenticated_post(self, url, body):

return json["response"]

async def _site_post(self, url, body):
async def _site_post(self, url, body, from_control_panel=True):
site_url = url % self._site_id
for i in range(NUM_RETRIES):
try:
site_body = {
**body,
"fromControlPanel": True,
"fromControlPanel": from_control_panel,
"sessionToken": self._session_id,
}
return await self._authenticated_post(site_url, site_body)
Expand Down Expand Up @@ -132,7 +132,7 @@ async def login(self, session=None):

async def get_state(self):
"""Get partitions and zones."""
resp = await self._site_post(STATE_URL, {})
resp = await self._site_post(STATE_URL, {}, from_control_panel=False)
return Alarm(self, resp["state"]["status"])

async def disarm(self, partition):
Expand Down

0 comments on commit 4fa3607

Please sign in to comment.