forked from dmslabsbr/esphome-somfy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathesp_somfy.yaml
94 lines (79 loc) · 2.07 KB
/
esp_somfy.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
94
esphome:
name: esp_somfy
platform: ESP8266
board: d1_mini
platformio_options:
board_build.ldscript: eagle.flash.4m1m.ld
board_build.filesystem: littlefs
includes:
- RFsomfy.h
- SomfyRts.h
- SomfyRts.cpp
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
#web_server:
# port: 80
# Enable logging
logger:
level: INFO
esp8266_store_log_strings_in_flash: False
baud_rate: 115200
api:
password: !secret api_password
ota:
password: !secret ota_password
cover:
- platform: custom
lambda: |-
std::vector<Cover *> covers;
auto rfSomfy0 = new RFsomfy(0);
rfSomfy0->set_code(0);
App.register_component(rfSomfy0);
auto rfSomfy1 = new RFsomfy(1);
//rfSomfy1->set_code(100); // Set initial rolling code. After it works, remove this line.
App.register_component(rfSomfy1);
auto rfSomfy2 = new RFsomfy(2);
//rfSomfy2->set_code(150);
App.register_component(rfSomfy2);
auto rfSomfy3 = new RFsomfy(3);
//rfSomfy3->set_code(200);
App.register_component(rfSomfy3);
auto rfSomfy4 = new RFsomfy(4);
//rfSomfy4->set_code(250);
App.register_component(rfSomfy4);
covers.push_back(rfSomfy0);
covers.push_back(rfSomfy1);
covers.push_back(rfSomfy2);
covers.push_back(rfSomfy3);
covers.push_back(rfSomfy4);
return {covers};
covers:
- name: "Roller curtain channel 1"
device_class: shutter
id: somfy0
- name: "Roller curtain channel 2"
device_class: shutter
id: somfy1
- name: "Roller curtain channel 3"
device_class: shutter
id: somfy2
- name: "Roller curtain channel 4"
device_class: shutter
id: somfy3
- name: "Roller curtain all channels"
device_class: shutter
id: somfy4
text_sensor:
- platform: version
name: "RFsomfy version"
- platform: custom
lambda: |-
auto rfSomfyInfo = new RFsomfyInfo();
App.register_component(rfSomfyInfo);
return {rfSomfyInfo};
text_sensors:
name: "RFsomfy info"
binary_sensor:
- platform: status
name: "RFsomfy status"