Skip to content

Commit 3a16fa3

Browse files
authored
Fixed night arming.
1 parent 34661c7 commit 3a16fa3

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
v0.2.4, 2022-04-07 Add freeze sensors.
2+
Fixed night arming.
23
Started adding Alarm.com API reference data for future enhancements.
34
v0.2.3, 2022-04-06 Fixed CLI asyncio error for Windows systems.
45
v0.2.2, 2022-04-05 [BREAKING] Moved action functions from controller to individual devices.

pyalarmdotcomajax/cli.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@
44
Based on https://github.com/uvjustin/pyalarmdotcomajax/pull/16 by Kevin David (@kevin-david)
55
"""
66
from __future__ import annotations
7-
import platform
87

98
import argparse
109
import asyncio
1110
import logging
11+
import platform
1212
import sys
1313

1414
import aiohttp
15-
from attr import has
1615
import pyalarmdotcomajax
1716
from pyalarmdotcomajax.errors import AuthenticationFailed
1817
from pyalarmdotcomajax.errors import DataFetchFailed

pyalarmdotcomajax/const.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ class ADCPartitionCommand(Enum):
120120
DISARM = "disarm"
121121
ARM_STAY = "armStay"
122122
ARM_AWAY = "armAway"
123-
ARM_NIGHT = "armNight"
124123

125124

126125
class ADCLockCommand(Enum):

pyalarmdotcomajax/entities.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ async def _async_arm(
217217
force_bypass: bool = False,
218218
no_entry_delay: bool = False,
219219
silent_arming: bool = False,
220+
night_arming: bool = False,
220221
) -> None:
221222
"""Arm alarm system."""
222223

@@ -228,6 +229,7 @@ async def _async_arm(
228229
"forceBypass": force_bypass,
229230
"noEntryDelay": no_entry_delay,
230231
"silentArming": silent_arming,
232+
"nightArming": night_arming,
231233
}
232234

233235
await self._send_action_callback(
@@ -273,10 +275,11 @@ async def async_arm_night(
273275
) -> None:
274276
"""Arm stay alarm."""
275277
await self._async_arm(
276-
arm_type=ADCPartitionCommand.ARM_NIGHT,
278+
arm_type=ADCPartitionCommand.ARM_STAY,
277279
force_bypass=force_bypass,
278280
no_entry_delay=no_entry_delay,
279281
silent_arming=silent_arming,
282+
night_arming=True,
280283
)
281284

282285
async def async_disarm(

0 commit comments

Comments
 (0)