forked from CoMPaTech/esphome_c1101_alt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
itho.yaml
100 lines (90 loc) · 1.96 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
esphome:
name: fancontrol
platform: ESP8266
board: d1_mini_pro
includes:
- ITHO/c1101.h
libraries:
- https://github.com/CoMPaTech/esphome_itho.git
wifi:
ssid: "secret"
password: "evenmoresecret"
# Enable logging
logger:
# Enable Home Assistant API
api:
password: 'fan'
ota:
password: 'fan'
switch:
- platform: custom
lambda: |-
auto fansendjoin = new FanSendIthoJoin();
App.register_component(fansendjoin);
return {fansendjoin};
switches:
name: "FanSendJoin"
- platform: template
id: update_fan_speed
optimistic: True
turn_on_action:
then:
- delay: 200ms
- if:
condition:
text_sensor.state:
id: fanspeed
state: "Off"
then:
- fan.turn_off: mech_fan
- if:
condition:
text_sensor.state:
id: fanspeed
state: "Low"
then:
- fan.turn_on:
id: mech_fan
speed: LOW
- if:
condition:
text_sensor.state:
id: fanspeed
state: "Medium"
then:
- fan.turn_on:
id: mech_fan
speed: MEDIUM
- if:
condition:
text_sensor.state:
id: fanspeed
state: "Full"
then:
- fan.turn_on:
id: mech_fan
speed: HIGH
- switch.turn_off: update_fan_speed
output:
- platform: custom
type: float
outputs:
id: fanoutput
lambda: |-
auto mech_fan = new FanOutput();
App.register_component(mech_fan);
return {mech_fan};
text_sensor:
- platform: custom
lambda: |-
auto fanrecv = new FanRecv();
App.register_component(fanrecv);
return {fanrecv->fanspeed};
text_sensors:
name: "FanSpeed"
id: fanspeed
fan:
- platform: speed
output: fanoutput
id: mech_fan
name: "Fan"