-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest-h2.yaml
79 lines (68 loc) · 1.8 KB
/
test-h2.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
esphome:
name: ott-h2
esp32:
board: esp32-h2-devkitm-1
variant: esp32h2
framework:
type: esp-idf
version: "5.3.0"
# This contains the esp32-h2-devkit board
platform_version: "https://github.com/pioarduino/platform-espressif32/releases/download/53.03.10%%2Brc1/platform-espressif32.zip"
external_components:
- source: my_components
components:
- openthread
network:
enable_ipv6: true
# Enable logging
logger:
level: DEBUG
hardware_uart: USB_SERIAL_JTAG
debug:
update_interval: 5s
openthread:
channel: !secret ot_channel
network_name: !secret ot_network_name
network_key: !secret ot_network_key
panid: !secret ot_panid
extpanid: !secret ot_extpanid
pskc: !secret ot_pskc
# The web server will cause the HA integration to fail, see note in the README
# web_server:
# port: 80
api:
encryption:
key: !secret noise_key
# This is the "Boot" button on my dev board
binary_sensor:
- platform: gpio
id: button1
name: "Button"
publish_initial_state: true
pin:
number: GPIO9
mode: INPUT_PULLUP
inverted: true
text_sensor:
- platform: template
name: "OTT Thread RLOC16"
lambda: |-
if (!esp_openthread_lock_acquire(1)) {
return {"Unknown"};
}
auto instance = esp_openthread_get_instance();
auto rloc16 = otThreadGetRloc16(instance);
esp_openthread_lock_release();
char buf[10];
snprintf(buf, sizeof(buf), "%04x", rloc16);
return {buf};
- platform: template
name: "OTT Thread Role"
lambda: |-
if (!esp_openthread_lock_acquire(1)) {
return {"Unknown"};
}
auto instance = esp_openthread_get_instance();
auto role = otThreadDeviceRoleToString(otThreadGetDeviceRole(instance));
esp_openthread_lock_release();
return {role};