generated from github/codespaces-blank
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathESPHome Nuki fingerprint door opener.yaml
129 lines (107 loc) · 2.46 KB
/
ESPHome Nuki fingerprint door opener.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
esphome:
name: haustuer
#platform: ESP32
#board: wemos_d1_mini32
libraries:
- Preferences
- https://github.com/vinmenn/Crc16.git
- https://github.com/uriyacovy/NukiBleEsp32
external_components:
#- source: github://uriyacovy/ESPHome_nuki_lock
- source: github://Pe-MaKer/ESPHome_nuki_lock@dev
esp32:
board: "wemos_d1_mini32" # Or whatever other board you're using
framework:
type: arduino
version: 2.0.4
platform_version: 5.3.0
wifi:
networks:
- ssid: !secret wifi_ssid
password: !secret wifi_password
- ssid: !secret wifi_fallback_ssid
password: !secret wifi_fallback_password
# Optional manual IP
manual_ip:
static_ip: 10.0.2.3
gateway: 10.0.0.1
subnet: 255.0.0.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Tuer Fallback Hotspot"
password: "v"
captive_portal:
#bluetooth_proxy:
# active: true
logger:
api:
ota:
password: !secret ota_password
web_server:
port: 80
include_internal: true
#esp32_ble_tracker:
# scan_parameters:
# duration: 10s
button:
- platform: template
name: "Türöffner"
id: alohomora
icon: "mdi:door-open"
on_press:
- if:
condition:
lock.is_locked: nuki
then:
- lock.unlock: nuki
- delay: 5s
- switch.turn_on: oeffner
- delay: 2000ms
- switch.turn_off: oeffner
else:
- switch.turn_on: oeffner
- delay: 2000ms
- switch.turn_off: oeffner
- platform: template
name: "Durchgangslicht"
id: durchgangslicht
icon: "mdi:wall-sconce-flat"
on_press:
- output.turn_on: licht
- delay: 120000ms
- output.turn_off: licht
- platform: restart
name: "Restart haustuer"
switch:
- platform: gpio
id: oeffner
pin: 16
restore_mode: ALWAYS_OFF
name: "Schnapper"
icon: "mdi:gate"
output:
- platform: gpio
id: licht
pin: 17
light:
- platform: binary
name: "Licht"
output: licht
lock:
# Required:
- platform: nuki_lock
name: Nuki ESP
id: nuki
is_connected:
name: "Nuki ESP verbunden"
is_paired:
name: "Nuki ESP gekoppelt"
# Optional:
battery_critical:
name: "Nuki ESP Batterie kritisch"
battery_level:
name: "Nuki ESP Batteriestand"
door_sensor:
name: "Nuki ESP Türsensor"
door_sensor_state:
name: "Nuki ESP Türkontakt Zustand"