-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathesphome-rtl433.yaml
75 lines (65 loc) · 1.58 KB
/
esphome-rtl433.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
esphome:
name: esphome-rtl433
includes:
- rtl433.h
libraries:
- "SPI"
- "ArduinoJson"
- "/~https://github.com/NorthernMan54/rtl_433_ESP"
platformio_options:
lib_ldf_mode: chain+
# Configuration build flags for the Heltec WiFi LoRa 32 v2 device
build_flags:
- "-D RF_SX1278=1"
- "-D RF_MODULE_DIO0=26"
- "-D RF_MODULE_DIO1=35"
- "-D RF_MODULE_DIO2=34"
- "-D RF_MODULE_RST=14"
- "-D RF_MODULE_CS=18"
- "-D RF_MODULE_MOSI=27"
- "-D RF_MODULE_MISO=19"
- "-D RF_MODULE_SCK=5"
esp32:
board: esp32dev
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
logger:
level: DEBUG
api:
custom_component:
- lambda: |-
auto rtl_433 = new RTL433();
App.register_component(rtl_433);
return {rtl_433};
components:
- id: rtl_433
binary_sensor:
- platform: template
name: "Push Button"
lambda: |-
return ((RTL433*) id(rtl_433))->matches(568150, "0x1 (Lock)");
filters:
- delayed_off: 300ms
- platform: template
name: "Office-Door Open"
internal: yes
lambda: |-
return ((RTL433*) id(rtl_433))->matches(49198, 10);
on_press:
- binary_sensor.template.publish:
id: office_door
state: ON
- platform: template
name: "Office-Door Closed"
internal: yes
lambda: |-
return ((RTL433*) id(rtl_433))->matches(49198, 14);
on_press:
- binary_sensor.template.publish:
id: office_door
state: OFF
- platform: template
name: "Office-Door"
device_class: door
id: office_door