Skip to content

Commit

Permalink
Fix UnifiProtect Integration Examples to Prevent Triggering on Doorbe…
Browse files Browse the repository at this point in the history
…ll Reboot (home-assistant#36183)
  • Loading branch information
RaHehl authored Dec 5, 2024
1 parent 8d5c349 commit b6e06b7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions source/_integrations/unifiprotect.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,8 @@ conditions:
- condition: template
value_template: >
{% raw %}{{
not trigger.event.data.old_state.attributes.get('restored', false) and
not trigger.event.data.old_state.state == 'unavailable' and
trigger.event.data.new_state is not none and
trigger.event.data.new_state.attributes.event_type == 'scanned' and
trigger.event.data.new_state.attributes.nfc_id in ['ABCDEF1234', 'OTHER_ALLOWED_ID']
Expand All @@ -388,8 +390,8 @@ When processing NFC scans, always validate the scanned ID. Unknown NFC cards als
- **Event Attributes**:
- **event_type**: Either `identified` or `not_identified`
- **event_id**: A unique ID that identifies the fingerprint event.
- **ulp_id**: The fingerprint ID used to identify the person. If no fingerprint match is found, the `ulp_id` will be empty and the `event_type` will be `not_identified`.
- **Description**: This event is triggered when a fingerprint is scanned by a compatible device. If the fingerprint is recognized, it provides a `ulp_id`, which represents the fingerprint ID. If the fingerprint is not recognized, the `event_type` will be set to `not_identified`, and no `ulp_id` will be provided.
- **ulp_id**: The ID used to identify the person. If no fingerprint match is found, the `ulp_id` will be empty and the `event_type` will be `not_identified`.
- **Description**: This event is triggered when a fingerprint is scanned by a compatible device. If the fingerprint is recognized, it provides a `ulp_id`, which represents the a internal user ID. If the fingerprint is not recognized, the `event_type` will be set to `not_identified`, and no `ulp_id` will be provided.

#### Example G4 Doorbell Fingerprint Identified Automation

Expand All @@ -405,6 +407,8 @@ condition:
- condition: template
value_template: >
{% raw %}{{
not trigger.event.data.old_state.attributes.get('restored', false) and
not trigger.event.data.old_state.state == 'unavailable' and
trigger.event.data.new_state is not none and
trigger.event.data.new_state.attributes.event_type == 'identified' and
(trigger.event.data.new_state.attributes.ulp_id|default('')) != '' and
Expand Down

0 comments on commit b6e06b7

Please sign in to comment.