From 6277a9170b2da876b2aa2fc40ee26a5178a98c94 Mon Sep 17 00:00:00 2001 From: Pergola Fabio Date: Mon, 3 Jun 2024 21:37:04 +0200 Subject: [PATCH] add employee id for event: MINOR_FINGERPRINT_COMPARE_PASS --- hikvision-doorbell/src/mqtt.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hikvision-doorbell/src/mqtt.py b/hikvision-doorbell/src/mqtt.py index bceb2cb..0a21822 100644 --- a/hikvision-doorbell/src/mqtt.py +++ b/hikvision-doorbell/src/mqtt.py @@ -257,6 +257,13 @@ async def acs_alarm( } trigger = DeviceTriggerMetadata(name=f"{major_alarm.name.lower()} {minor_alarm.name.lower()}", type=f"", subtype=f"{major_alarm.name.lower()} {minor_alarm.name.lower()}", payload=attributes) self.handle_device_trigger(doorbell, trigger) + case "MINOR_FINGERPRINT_COMPARE_PASS": + logger.debug("Minor control event: {} found on door {} with employee id: {}", minor_alarm.name.lower(), door_id, employee_id) + attributes = { + 'employee_id': employee_id, + } + trigger = DeviceTriggerMetadata(name=f"{major_alarm.name.lower()} {minor_alarm.name.lower()}", type=f"", subtype=f"{major_alarm.name.lower()} {minor_alarm.name.lower()}", payload=attributes) + self.handle_device_trigger(doorbell, trigger) case _: trigger = DeviceTriggerMetadata(name=f"{major_alarm.name.lower()} {minor_alarm.name.lower()}", type=f"", subtype=f"{major_alarm.name.lower()} {minor_alarm.name.lower()}") self.handle_device_trigger(doorbell, trigger)