Skip to content

Commit 8a89a83

Browse files
committed
Update readme
1 parent c63cb7c commit 8a89a83

File tree

1 file changed

+118
-17
lines changed

1 file changed

+118
-17
lines changed

README.md

+118-17
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The lock entity updates whenever the lock's state changes - whether through the
88

99

1010
## How to Use
11-
To integrate your Nuki Smartlock, add the following code snippet to your ESPHome YAML file.
11+
To integrate your Nuki Smartlock, add one of the following code snippets to your ESPHome YAML file.
1212

1313
> [!WARNING]
1414
> This component relies on NimBLE, which is incompatible with the ESPHome BLE stack.
@@ -17,6 +17,122 @@ To integrate your Nuki Smartlock, add the following code snippet to your ESPHome
1717
> [!TIP]
1818
> If your ESP32 is equipped with PSRAM, you can add the `psram` component to enable the use of PSRAM for the NimBLE Stack, enhancing the reliability of this component.
1919
20+
### Example configuration YAML
21+
<details>
22+
<summary>ESP-IDF</summary>
23+
24+
```yaml
25+
external_components:
26+
- source: github://uriyacovy/ESPHome_nuki_lock
27+
28+
esp32:
29+
board: "esp32dev" # Or whatever other board you're using
30+
framework:
31+
type: esp-idf
32+
33+
lock:
34+
# Required
35+
- platform: nuki_lock
36+
name: Nuki Lock
37+
# Optional: Settings
38+
pairing_mode_timeout: 300s
39+
event: "nuki"
40+
security_pin: 1234
41+
# Optional: Advanced Settings
42+
alternative_connect_mode: true
43+
pairing_as_app: false
44+
query_interval_config: 3600s
45+
query_interval_auth_data: 7200s
46+
47+
# Optional: Binary Sensors
48+
is_connected:
49+
name: "Nuki Connected"
50+
is_paired:
51+
name: "Nuki Paired"
52+
battery_critical:
53+
name: "Nuki Battery Critical"
54+
door_sensor:
55+
name: "Nuki Door Sensor"
56+
# Optional: Sensors
57+
battery_level:
58+
name: "Nuki Battery Level"
59+
bt_signal_strength:
60+
name: "Bluetooth Signal Strength"
61+
# Optional: Text Sensors
62+
door_sensor_state:
63+
name: "Nuki Door Sensor: State"
64+
last_unlock_user:
65+
name: "Nuki Last Unlock User"
66+
last_lock_action:
67+
name: "Nuki Last Lock Action"
68+
last_lock_action_trigger:
69+
name: "Nuki Last Lock Action Trigger"
70+
# Optional: Switches
71+
pairing_mode:
72+
name: "Nuki Pairing Mode"
73+
auto_unlatch:
74+
name: "Nuki Auto unlatch"
75+
button_enabled:
76+
name: "Nuki Button: Locking operations"
77+
led_enabled:
78+
name: "Nuki LED Signal"
79+
# Optional: Number Inputs
80+
led_brightness:
81+
name: "Nuki LED Brightness"
82+
timezone_offset:
83+
name: "Nuki Timezone: Offset"
84+
# Optional: Switches
85+
night_mode_enabled:
86+
name: "Nuki Night Mode"
87+
night_mode_auto_lock_enabled:
88+
name: "Nuki Night Mode: Auto Lock"
89+
night_mode_auto_unlock_disabled:
90+
name: "Nuki Night Mode: Reject Auto Unlock"
91+
night_mode_immediate_lock_on_start_enabled:
92+
name: "Nuki Night Mode: Lock at Start Time"
93+
auto_lock_enabled:
94+
name: "Nuki Auto Lock"
95+
auto_unlock_disabled:
96+
name: "Nuki Auto Unlock: Disable"
97+
immediate_auto_lock_enabled:
98+
name: "Nuki Auto Lock: Immediately"
99+
auto_update_enabled:
100+
name: "Nuki Automatic Updates"
101+
single_lock_enabled:
102+
name: "Nuki Single Lock"
103+
dst_mode_enabled:
104+
name: "Nuki Daylight Saving Time"
105+
# Optional: Select Inputs
106+
single_buton_press_action:
107+
name: "Nuki Button: Single Press Action"
108+
double_buton_press_action:
109+
name: "Nuki Button: Double Press Action"
110+
fob_action_1:
111+
name: "Nuki Fob: Action 1"
112+
fob_action_2:
113+
name: "Nuki Fob: Action 2"
114+
fob_action_3:
115+
name: "Nuki Fob: Action 3"
116+
timezone:
117+
name: "Nuki Timezone"
118+
advertising_mode:
119+
name: "Nuki Advertising Mode"
120+
# Optional: Buttons
121+
unpair:
122+
name: "Nuki Unpair Device"
123+
# Optional: Callbacks
124+
on_pairing_mode_on_action:
125+
- lambda: ESP_LOGI("nuki_lock", "Pairing mode turned on");
126+
on_pairing_mode_off_action:
127+
- lambda: ESP_LOGI("nuki_lock", "Pairing mode turned off");
128+
on_paired_action:
129+
- lambda: ESP_LOGI("nuki_lock", "Paired sucessfuly");
130+
```
131+
</details>
132+
133+
<details>
134+
<summary>Arduino Framework</summary>
135+
20136
```yaml
21137
external_components:
22138
- source: github://uriyacovy/ESPHome_nuki_lock
@@ -126,6 +242,7 @@ lock:
126242
on_paired_action:
127243
- lambda: ESP_LOGI("nuki_lock", "Paired sucessfuly");
128244
```
245+
</details>
129246
130247
After running ESPHome (`esphome run <yamlfile.yaml>`), follow these steps to pair your Nuki Smartlock:
131248

@@ -137,22 +254,6 @@ After running ESPHome (`esphome run <yamlfile.yaml>`), follow these steps to pai
137254

138255
Your Nuki Smartlock is now connected and ready to use!
139256

140-
141-
## Settings
142-
143-
These settings allow you to customize the behavior of the Nuki Lock component to improve the performance and reliability.
144-
They can be configured in your ESPHome YAML file:
145-
146-
- **pairing_mode_timeout**: The duration (in seconds) for which the pairing mode will be active. Default is `300s`.
147-
- **event**: The event name used for the Nuki Lock component. Default is `nuki`.
148-
- **security_pin**: The Nuki security PIN required for certain operations.
149-
- **alternative_connect_mode**: Enable the alternative connection mode. Disable it if you encounter any issues. Default is `true`.
150-
- **pairing_as_app**: Specify if the pairing should be done as an app (not recommended). Default is `false`.
151-
- **query_interval_config**: The interval (in seconds) at which the configuration will be queried. Default is `3600s`.
152-
- **query_interval_auth_data**: The interval (in seconds) at which the authentication data will be queried. Default is `7200s`.
153-
154-
155-
156257
## Settings
157258

158259
The following settings allow you to customize the behavior of the Nuki Lock component, optimizing its performance and reliability. You can configure these in your ESPHome YAML file:

0 commit comments

Comments
 (0)