Skip to content

Commit

Permalink
Correct the incorrect disarmed_by_master_pin websocket event (#703)
Browse files Browse the repository at this point in the history
* Correct the incorrect `disarmed_by_master_pin` websocket event

* Fix docs
  • Loading branch information
bachya authored Dec 21, 2023
1 parent 5d80d39 commit 0386d74
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/websocket.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ The `event_type` property will be one of the following values:
- `camera_motion_detected`
- `connection_lost`
- `connection_restored`
- `disarmed_by_master_pin`
- `disarmed_by_keypad`
- `disarmed_by_remote`
- `doorbell_detected`
- `entity_test`
Expand Down
4 changes: 2 additions & 2 deletions simplipy/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
EVENT_CAMERA_MOTION_DETECTED: Final = "camera_motion_detected"
EVENT_CONNECTION_LOST: Final = "connection_lost"
EVENT_CONNECTION_RESTORED: Final = "connection_restored"
EVENT_DISARMED_BY_MASTER_PIN: Final = "disarmed_by_master_pin"
EVENT_DISARMED_BY_KEYPAD: Final = "disarmed_by_keypad"
EVENT_DISARMED_BY_REMOTE: Final = "disarmed_by_remote"
EVENT_DOORBELL_DETECTED: Final = "doorbell_detected"
EVENT_DEVICE_TEST: Final = "device_test"
Expand Down Expand Up @@ -70,7 +70,7 @@
1301: EVENT_POWER_OUTAGE,
1350: EVENT_CONNECTION_LOST,
1381: EVENT_SENSOR_NOT_RESPONDING,
1400: EVENT_DISARMED_BY_MASTER_PIN,
1400: EVENT_DISARMED_BY_KEYPAD,
1406: EVENT_ALARM_CANCELED,
1407: EVENT_DISARMED_BY_REMOTE,
1409: EVENT_SECRET_ALERT_TRIGGERED,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
WebsocketError,
)
from simplipy.websocket import (
EVENT_DISARMED_BY_MASTER_PIN,
EVENT_DISARMED_BY_KEYPAD,
Watchdog,
WebsocketClient,
websocket_event_from_payload,
Expand Down Expand Up @@ -138,7 +138,7 @@ def test_create_event(ws_message_event: dict[str, Any]) -> None:
ws_message_event: A websocket event payload.
"""
event = websocket_event_from_payload(ws_message_event)
assert event.event_type == EVENT_DISARMED_BY_MASTER_PIN
assert event.event_type == EVENT_DISARMED_BY_KEYPAD
assert event.info == "System Disarmed by Master PIN"
assert event.system_id == 12345
assert event.timestamp == datetime(2021, 9, 29, 23, 14, 46, tzinfo=timezone.utc)
Expand Down

0 comments on commit 0386d74

Please sign in to comment.