-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathitho.yaml
130 lines (104 loc) · 2.75 KB
/
itho.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
esphome:
name: fancontrol
includes:
- itho.h
libraries:
- SPI
- https://github.com/jodur/ITHO-Lib#NewLib
#Set ID from remotes that are used, so you can identify the root of the last State change
on_boot:
then:
- lambda: |-
Idlist[0]={"51,40,61","Badkamer"};
Idlist[1]={"73,82,11","Toilet"};
Idlist[2]={"ID3","ID3"};
Mydeviceid="Homeassistant";
rf.setDeviceID(10,87,81); //ID for sending: 10,87,81 was used in old library
id(swfan_low).turn_on(); //This ensures fan is at low-speed at boot
esp8266:
board: d1_mini
framework:
version: recommended
wifi:
ssid: <YOURSSID>
password: <YOURPASSWORD>
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "FALLBACK AP"
password: "jdsh348201"
captive_portal:
# Enable logging
logger:
# level: VERBOSE #Enable this line to find out the ID of youre remote
# Enable Home Assistant API
api:
ota:
on_begin:
then:
- lambda: |-
ESP_LOGI("custom", "Disable Interrupts, to allow OTA without intterupts");
detachInterrupt(D1);
delay(500);
switch:
- platform: custom
lambda: |-
auto fansendlow = new FanSendLow();
App.register_component(fansendlow);
return {fansendlow};
switches:
name: "FanSendLow"
id: swfan_low
- platform: custom
lambda: |-
auto fansendmedium = new FanSendMedium();
App.register_component(fansendmedium);
return {fansendmedium};
switches:
name: "FanSendMedium"
- platform: custom
lambda: |-
auto fansendhigh = new FanSendHigh();
App.register_component(fansendhigh);
return {fansendhigh};
switches:
name: "FanSendHigh"
- platform: custom
lambda: |-
auto fansendt1 = new FanSendIthoTimer1();
App.register_component(fansendt1);
return {fansendt1};
switches:
name: "FanSendTimer1"
- platform: custom
lambda: |-
auto fansendt2 = new FanSendIthoTimer2();
App.register_component(fansendt2);
return {fansendt2};
switches:
name: "FanSendTimer2"
- platform: custom
lambda: |-
auto fansendt3 = new FanSendIthoTimer3();
App.register_component(fansendt3);
return {fansendt3};
switches:
name: "FanSendTimer3"
- platform: custom
lambda: |-
auto fansendjoin = new FanSendIthoJoin();
App.register_component(fansendjoin);
return {fansendjoin};
switches:
name: "FanSendJoin"
text_sensor:
- platform: custom
lambda: |-
auto fanrecv = new FanRecv();
App.register_component(fanrecv);
return {fanrecv->fanspeed,fanrecv->fantimer,fanrecv->Lastid};
text_sensors:
- name: "fanspeed"
icon: "mdi:transfer"
- name: "fantimer"
icon: "mdi:timer"
- name: "lastid"