forked from luar123/esphome_zb_sensor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathZB_sensor.yaml
63 lines (58 loc) · 1.44 KB
/
ZB_sensor.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
esphome:
name: zb-sensor
platformio_options:
platform: https://github.com/luar123/platform-espressif32H2/archive/refs/tags/v6.5.1.zip
includes:
- esphome_zb.h
- esp_zb_light.c
- esp_zb_light.h
esp32:
board: esp32-h2-devkitm-1
flash_size: 4MB
partitions: partitions_zb.csv
framework:
type: esp-idf
version: 5.1.2
sdkconfig_options:
CONFIG_ESPTOOLPY_FLASHSIZE_4MB: y
CONFIG_ZB_ENABLED: y
CONFIG_ZB_ZED: y
CONFIG_ZB_RADIO_NATIVE: y
ZB_ED_ROLE: y
variant: esp32h2
# Enable logging
logger:
hardware_uart: UART0
i2c:
sda: 12
scl: 22
sensor:
- platform: aht10
variant: AHT10
temperature:
name: "Living Room Temperature"
id: "temp"
filters:
- delta: 0.1
on_value:
then:
- lambda: |-
int16_t value = (int16_t)(x*100);
reportAttribute(ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT, ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_VALUE_ID, &value);
humidity:
name: "Living Room Humidity"
id: "hum"
filters:
- delta: 1
on_value:
then:
- lambda: |-
int16_t value = (int16_t)(x*100);
reportAttribute(ESP_ZB_ZCL_CLUSTER_ID_REL_HUMIDITY_MEASUREMENT, ESP_ZB_ZCL_ATTR_REL_HUMIDITY_MEASUREMENT_VALUE_ID, &value);
update_interval: 60s
custom_component:
- lambda: |-
auto my_zb = new esphomeZB();
return {my_zb};
components:
- id: zb