-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
homekey-test-c3.yaml
67 lines (58 loc) · 1.33 KB
/
homekey-test-c3.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
esphome:
name: homekey-test
platformio_options:
board_build.flash_mode: dio
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
lock:
- platform: template
id: "this_lock"
name: "Main Lock"
optimistic: True
on_lock:
- logger.log: "Door Locked!"
on_unlock:
- logger.log: "Door Unlocked!"
external_components:
source: github://rednblkx/HAP-ESPHome@main
spi:
clk_pin: 4
miso_pin: 5
mosi_pin: 6
pn532_spi:
id: nfc_spi_module
cs_pin: 7
update_interval: 100ms
esp32:
board: esp32-c3-devkitm-1
flash_size: 4MB
framework:
type: esp-idf
version: 5.2.1
platform_version: 6.7.0
sdkconfig_options:
CONFIG_COMPILER_OPTIMIZATION_SIZE: y
CONFIG_LWIP_MAX_SOCKETS: "16"
CONFIG_MBEDTLS_HKDF_C: y
homekit_base:
setup_code: '159-35-728'
homekit:
lock:
- id: this_lock
nfc_id: nfc_spi_module
on_hk_success:
lambda: |-
ESP_LOGI("HEREHERE", "IssuerID: %s", x.c_str());
ESP_LOGI("HEREHERE", "EndpointID: %s", y.c_str());
if (id(this_lock).state == LOCK_STATE_LOCKED) {
id(this_lock).unlock();
} else {
id(this_lock).lock();
}
on_hk_fail:
lambda: |-
ESP_LOGI("GSDGSGS", "IT FAILED :(");
hk_hw_finish: "SILVER"
logger:
level: DEBUG