Skip to content

Commit

Permalink
add employee id for event: MINOR_FINGERPRINT_COMPARE_PASS
Browse files Browse the repository at this point in the history
  • Loading branch information
pergolafabio committed Jun 3, 2024
1 parent 1a0ab1a commit 6277a91
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions hikvision-doorbell/src/mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6277a91

Please sign in to comment.