From 2dc7bc9e3048bc6d477a0d7a8c2f27d48b21b667 Mon Sep 17 00:00:00 2001 From: Chris Giard Date: Thu, 2 Jan 2025 17:44:17 -1000 Subject: [PATCH] Add commit 808bcd6 back --- custom_components/unifi_access/hub.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/custom_components/unifi_access/hub.py b/custom_components/unifi_access/hub.py index 6de3544..60424fd 100644 --- a/custom_components/unifi_access/hub.py +++ b/custom_components/unifi_access/hub.py @@ -588,6 +588,8 @@ def on_message(self, ws: websocket.WebSocketApp, message): # noqa: C901 if door_id in self.doors: existing_door = self.doors[door_id] actor = update["data"]["_source"]["actor"]["display_name"] + #"REMOTE_THROUGH_UAH" , "NFC" , "MOBILE_TAP" , "PIN_CODE" + authentication = update["data"]["_source"]["authentication"]["credential_provider"] device_config = next( ( target @@ -603,13 +605,15 @@ def on_message(self, ws: websocket.WebSocketApp, message): # noqa: C901 "door_name": existing_door.name, "door_id": door_id, "actor": actor, + "authentication": authentication, "type": ACCESS_EVENT.format(type=access_type), } _LOGGER.info( - "Door name %s with id %s accessed by %s. access type: %s", + "Door name %s with id %s accessed by %s. authentication %s, access type: %s", existing_door.name, door_id, actor, + authentication, access_type, ) changed_doors.append(existing_door)