Skip to content

Instantly share code, notes, and snippets.

@fwartner
Last active December 17, 2023 15:50
Show Gist options
  • Save fwartner/caaf173e49ec2e257df51450119ad044 to your computer and use it in GitHub Desktop.
Save fwartner/caaf173e49ec2e257df51450119ad044 to your computer and use it in GitHub Desktop.
alias: Türen
description: ""
trigger:
- platform: zone
entity_id: person.florian
zone: zone.home
event: enter
id: zoneHomeOn
- platform: state
entity_id:
- binary_sensor.nuki_haustur_ring_action
to: "on"
id: nukiRingOn
- platform: event
event_type: mobile_app_notification_action
event_data:
action: UNLOCK_HOUSE
id: unlockHouse
- platform: event
event_type: mobile_app_notification_action
event_data:
action: UNLOCK_APARTMENT
id: unlockApartment
condition: []
action:
- choose:
- conditions:
- condition: and
conditions:
- condition: trigger
id:
- zoneHomeOn
- nukiRingOn
- condition: numeric_state
entity_id: sensor.historystats_florian_away_minutes
above: 0.05
sequence:
- service: notify.mobile_app_florians_iphone
data:
message: Möchtest du die Tür öffnen?
title: 🔐 Türen öffnen
data:
actions:
- action: UNLOCK_HOUSE
title: Haustür öffnen
icon: sfsymbols:lock.open.fill
- action: UNLOCK_APARTMENT
title: Wohnungstür öffnen
icon: sfsymbols:lock.open.fill
alias: Notification
- conditions:
- condition: trigger
id:
- unlockHouse
sequence:
- service: lock.open
target:
entity_id: lock.nuki_haustur_lock
data: {}
alias: Haustür Öffnen
- conditions:
- condition: trigger
id:
- unlockApartment
sequence:
- service: lock.open
data: {}
target:
entity_id: lock.nuki_wohnungstur_lock
alias: Wohnungstür Öffnen
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment