diff --git a/docs/websocket.md b/docs/websocket.md index 75ad44b1..82bc7ec2 100644 --- a/docs/websocket.md +++ b/docs/websocket.md @@ -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` diff --git a/simplipy/websocket.py b/simplipy/websocket.py index 7f22d224..90529840 100644 --- a/simplipy/websocket.py +++ b/simplipy/websocket.py @@ -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" @@ -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, diff --git a/tests/test_websocket.py b/tests/test_websocket.py index 5e27259c..f4fb8145 100644 --- a/tests/test_websocket.py +++ b/tests/test_websocket.py @@ -27,7 +27,7 @@ WebsocketError, ) from simplipy.websocket import ( - EVENT_DISARMED_BY_MASTER_PIN, + EVENT_DISARMED_BY_KEYPAD, Watchdog, WebsocketClient, websocket_event_from_payload, @@ -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)