-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtcl-ac.yml
78 lines (68 loc) · 1.4 KB
/
tcl-ac.yml
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
esphome:
name: tcl-ac
includes:
- tcl_climate.h
esp8266:
board: esp07
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
api:
ota:
password: 123
uart:
id: uart_bus
tx_pin: 1
rx_pin: 3
baud_rate: 9600
parity: EVEN
logger:
level: VERBOSE
baud_rate: 0
climate:
- platform: custom
lambda: |-
auto my_custom_climate = new MyCustomClimate(id(uart_bus));
App.register_component(my_custom_climate);
return {my_custom_climate};
climates:
- name: "TCL a/c"
id: my_custom_climate
select:
- platform: template
name: Vertical swing
id: vswing
entity_category: config
options:
- "Last position"
- "Fix top"
- "Fix upper"
- "Fix mid"
- "Fix lower"
- "Fix bottom"
- "Move full"
- "Move upper"
- "Move lower"
set_action:
then:
lambda: |-
static_cast<MyCustomClimate*>(id(my_custom_climate))->control_vertical_swing(x);
- platform: template
name: Horizontal swing
id: hswing
entity_category: config
options:
- "Last position"
- "Fix left"
- "Fix mid left"
- "Fix mid"
- "Fix mid right"
- "Fix right"
- "Move full"
- "Move left"
- "Move mid"
- "Move right"
set_action:
then:
lambda: |-
static_cast<MyCustomClimate*>(id(my_custom_climate))->control_horizontal_swing(x);