-
Notifications
You must be signed in to change notification settings - Fork 0
/
esphome-aranet4.yaml
93 lines (92 loc) · 2.7 KB
/
esphome-aranet4.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
ble_client:
- mac_address: ${aranet4_mac_address}
id: aranet4
sensor:
- platform: ble_client
type: characteristic
ble_client_id: aranet4
service_uuid: "fce0"
characteristic_uuid: "f0cd3001-95da-4f4b-9ac8-aa55d312af0c"
name: "${aranet4_name} CO2"
state_class: "measurement"
device_class: "carbon_dioxide"
unit_of_measurement: "ppm"
lambda: |-
return (x[0] | x[1] << 8);
- platform: ble_client
type: characteristic
ble_client_id: aranet4
service_uuid: "fce0"
characteristic_uuid: "f0cd3001-95da-4f4b-9ac8-aa55d312af0c"
name: "${aranet4_name} Temperature"
state_class: "measurement"
device_class: "temperature"
accuracy_decimals: 1
unit_of_measurement: "°C"
lambda: |-
return (x[2] | x[3] << 8) / 20.0;
- platform: ble_client
type: characteristic
ble_client_id: aranet4
service_uuid: "fce0"
characteristic_uuid: "f0cd3001-95da-4f4b-9ac8-aa55d312af0c"
name: "${aranet4_name} Pressure"
state_class: "measurement"
device_class: "pressure"
accuracy_decimals: 1
unit_of_measurement: "hPa"
lambda: |-
return (x[4] | x[5] << 8) / 10.0;
- platform: ble_client
type: characteristic
ble_client_id: aranet4
service_uuid: "fce0"
characteristic_uuid: "f0cd3001-95da-4f4b-9ac8-aa55d312af0c"
name: "${aranet4_name} Humidity"
state_class: "measurement"
device_class: "humidity"
unit_of_measurement: "%"
lambda: |-
return x[6];
- platform: ble_client
type: characteristic
ble_client_id: aranet4
service_uuid: "fce0"
characteristic_uuid: "f0cd3001-95da-4f4b-9ac8-aa55d312af0c"
name: "${aranet4_name} Battery"
state_class: "measurement"
device_class: "battery"
unit_of_measurement: "%"
lambda: |-
return x[7];
- platform: ble_client
type: characteristic
ble_client_id: aranet4
service_uuid: "fce0"
characteristic_uuid: "f0cd3001-95da-4f4b-9ac8-aa55d312af0c"
name: "${aranet4_name} Status"
state_class: "measurement"
lambda: |-
return x[8];
- platform: ble_client
type: characteristic
ble_client_id: aranet4
service_uuid: "fce0"
characteristic_uuid: "f0cd3001-95da-4f4b-9ac8-aa55d312af0c"
name: "${aranet4_name} Interval"
state_class: "measurement"
device_class: "duration"
unit_of_measurement: "s"
lambda: |-
return (x[9] | x[10] << 8);
- platform: ble_client
type: characteristic
ble_client_id: aranet4
service_uuid: "fce0"
characteristic_uuid: "f0cd3001-95da-4f4b-9ac8-aa55d312af0c"
name: "${aranet4_name} Ago"
state_class: "measurement"
device_class: "duration"
unit_of_measurement: "s"
lambda: |-
return (x[11] | x[12] << 8);