-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathesp-rc-ir-bedroom.yaml
215 lines (205 loc) · 5.11 KB
/
esp-rc-ir-bedroom.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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
substitutions:
node_name: esp-rc-ir-bedroom
node_friendly_name: Bedroom IR Controller
project_name: kbxIRBlaster
project_version: v4
packages:
esp_common: !include shared/esp__common_core.yaml
wifi:
enable_btm: true
enable_rrm: true
esp32:
board: esp32-c6-devkitm-1
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
globals:
# makes sure we don't switch the air cleaner state if it's already in the desired state
- id: air_cleaner_state
type: bool
initial_value: "false"
restore_value: yes
status_led:
pin: 20
remote_receiver:
- id: ir_rx
dump: [samsung, toshiba_ac]
# dump: all
# dump: raw
rmt_symbols: 48
pin:
inverted: true
number: 1
remote_transmitter:
- id: ir_tx
pin: 0
carrier_duty_percent: 50%
rmt_symbols: 48
# - pin: 7
# id: rf_tx
# carrier_duty_percent: 100%
light:
- platform: esp32_rmt_led_strip
id: toshiba_ac_comfort_sense_status
restore_mode: RESTORE_DEFAULT_OFF
rgb_order: GRB
rmt_symbols: 48
pin: 8
num_leds: 2
chipset: ws2812
name: Status
switch:
- platform: gpio
id: green_led_mode
name: Green LED to GPIO 0
pin: 23
entity_category: config
restore_mode: RESTORE_DEFAULT_ON
- platform: gpio
id: red_led_mode
name: Red LED to GPIO 0
pin: 21
entity_category: config
restore_mode: RESTORE_DEFAULT_OFF
- platform: template
id: air_cleaner_power
name: Air Cleaner Power
lambda: "return id(air_cleaner_state);"
turn_off_action:
- if:
condition:
lambda: "return id(air_cleaner_state);"
then:
- globals.set:
id: air_cleaner_state
value: "false"
- remote_transmitter.transmit_nec:
transmitter_id: ir_tx
address: 0xFF00
command: 0xF20D
turn_on_action:
- if:
condition:
lambda: "return !id(air_cleaner_state);"
then:
- globals.set:
id: air_cleaner_state
value: "true"
- remote_transmitter.transmit_nec:
transmitter_id: ir_tx
address: 0xFF00
command: 0xF20D
button:
- platform: template
id: nixie_a
name: Nixie A
on_press:
- remote_transmitter.transmit_nec:
transmitter_id: ir_tx
address: 0xBF00
command: 0xF609
- platform: template
id: nixie_b
name: Nixie B
on_press:
- remote_transmitter.transmit_nec:
transmitter_id: ir_tx
address: 0xBF00
command: 0xF50A
- platform: template
id: nixie_c
name: Nixie C
on_press:
- remote_transmitter.transmit_nec:
transmitter_id: ir_tx
address: 0xBF00
command: 0xF708
- platform: template
id: nixie_d
name: Nixie D
on_press:
- remote_transmitter.transmit_nec:
transmitter_id: ir_tx
address: 0xBF00
command: 0xF20D
- platform: template
id: nixie_e
name: Nixie E
on_press:
- remote_transmitter.transmit_nec:
transmitter_id: ir_tx
address: 0xBF00
command: 0xF906
- platform: template
id: nixie_u
name: Nixie U
on_press:
- remote_transmitter.transmit_nec:
transmitter_id: ir_tx
address: 0xBF00
command: 0xFA05
- platform: template
id: air_cleaner_sleep
name: Air Cleaner Sleep
on_press:
- remote_transmitter.transmit_nec:
transmitter_id: ir_tx
address: 0xFF00
command: 0xF50A
- platform: template
id: air_cleaner_fan_down
name: Air Cleaner Fan Down
on_press:
- remote_transmitter.transmit_nec:
transmitter_id: ir_tx
address: 0xFF00
command: 0xF807
- platform: template
id: air_cleaner_fan_up
name: Air Cleaner Fan Up
on_press:
- remote_transmitter.transmit_nec:
transmitter_id: ir_tx
address: 0xFF00
command: 0xFB04
- platform: template
id: air_cleaner_purify_down
name: Air Cleaner Purify Down
on_press:
- remote_transmitter.transmit_nec:
transmitter_id: ir_tx
address: 0xFF00
command: 0xE01F
- platform: template
id: air_cleaner_purify_up
name: Air Cleaner Purify Up
on_press:
- remote_transmitter.transmit_nec:
transmitter_id: ir_tx
address: 0xFF00
command: 0xEF10
- platform: template
id: air_cleaner_anion
name: Air Cleaner Anion
on_press:
- remote_transmitter.transmit_nec:
transmitter_id: ir_tx
address: 0xFF00
command: 0xFA05
- platform: template
id: air_cleaner_sterilize
name: Air Cleaner Sterilize
on_press:
- remote_transmitter.transmit_nec:
transmitter_id: ir_tx
address: 0xFF00
command: 0xFD02
- platform: template
id: air_cleaner_time_set
name: Air Cleaner Time/Set
on_press:
- remote_transmitter.transmit_nec:
transmitter_id: ir_tx
address: 0xFF00
command: 0xF708