Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve memory footprint #71

Merged
merged 8 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/test-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ lock:

battery_level:
name: "Nuki Battery Level"
bt_signal_strength:
name: "Bluetooth Signal Strength"

door_sensor_state:
name: "Nuki Door Sensor: State"
Expand Down Expand Up @@ -100,6 +102,8 @@ lock:
pairing_mode_timeout: 300s
event: "nuki"
security_pin: 1234
alternative_connect_mode: true
pairing_as_app: false

on_pairing_mode_on_action:
- lambda: ESP_LOGI("nuki_lock", "Pairing mode turned on");
Expand Down
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ The lock entity updates whenever the lock's state changes - whether through the


## How to Use
To integrate your Nuki Smartlock, add the following code snippet to your ESPHome YAML file:
To integrate your Nuki Smartlock, add the following code snippet to your ESPHome YAML file.

> [!WARNING]
> This component relies on NimBLE, which is incompatible with the ESPHome BLE stack.
> Please remove all Bluetooth components (esp32_ble, esp32_improv, ...) from your configuration to use this component.

> [!TIP]
> 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.

```yaml
external_components:
Expand All @@ -29,6 +36,9 @@ lock:
pairing_mode_timeout: 300s
event: "nuki"
security_pin: 1234
# Optional: Advanced Settings
alternative_connect_mode: true
pairing_as_app: false
# Optional: Binary Sensors
is_connected:
name: "Nuki Connected"
Expand All @@ -41,6 +51,8 @@ lock:
# Optional: Sensors
battery_level:
name: "Nuki Battery Level"
bt_signal_strength:
name: "Bluetooth Signal Strength"
# Optional: Text Sensors
door_sensor_state:
name: "Nuki Door Sensor: State"
Expand Down Expand Up @@ -198,7 +210,7 @@ on_...:

### Action: Security Pin

> [!IMPORTANT]
> [!CAUTION]
> Overriding the security PIN will save it to flash!
> To revert back to the PIN defined in your YAML configuration, you must set the override PIN to `0`.

Expand All @@ -223,7 +235,7 @@ on_paired_action:
### Events
By default, this component sends Nuki logs as events to Home Assistant, enabling you to use them in automations.

> [!IMPORTANT]
> [!NOTE]
> To receive events, **you must set your security PIN**.
> Without it, it's not possible to access any event logs from your lock.

Expand Down Expand Up @@ -262,7 +274,7 @@ context:

## Entities

> [!IMPORTANT]
> [!NOTE]
> Most settings entities **require the security PIN** to make changes.
> Without the PIN, modifying these settings is not possible.
> Additionally, the `Last Unlock User` feature will only function if events are enabled!
Expand Down Expand Up @@ -325,5 +337,4 @@ The module depends on the work done by [I-Connect](https://github.com/I-Connect)
- Nuki smart lock v4
- Nuki smart lock v3
- Nuki smart lock v2
- Nuki door sensor

- Nuki door sensor
Loading
Loading