forked from BeardedTinker/Home-Assistant_Config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocks.yaml
24 lines (22 loc) · 906 Bytes
/
locks.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#####
# Lock tempate for Nuki
# https://www.home-assistant.io/integrations/lock.template/
#####
lock:
- platform: template
name: "Nuki Lock Action"
unique_id: nuki_lock_action
value_template: >
{{ states('input_number.nuki_bridge_lock_sensor_state') | int == 1 if states('input_number.nuki_bridge_lock_sensor_state') | int != 'unknown' }}
availability_template: >
{{ states('input_text.nuki_bridge_lock_sensor') != 'unknown' }}
lock:
service: rest_command.nuki_lock_action
data:
action: >
{{ state_attr('input_select.nuki_choose_lock_action','options').index(states('input_select.nuki_choose_lock_action')) + 1 }}
unlock:
service: rest_command.nuki_lock_action
data:
action: >
{{ state_attr('input_select.nuki_choose_unlock_action','options').index(states('input_select.nuki_choose_unlock_action')) + 1 }}