forked from echavet/MitsubishiCN105ESPHome
-
Notifications
You must be signed in to change notification settings - Fork 1
/
me_airco_atom_s3_lite.yaml
269 lines (242 loc) · 6.45 KB
/
me_airco_atom_s3_lite.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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
substitutions:
name: airco-boven
friendly_name: Airco boven
esphome:
name: ${name}
friendly_name: ${friendly_name}
on_boot:
priority: 200
then:
- delay: 30s
- switch.turn_off:
id: eps32_s3_led_switch
esp32:
board: esp32-s3-devkitc-1
## Atom S3 lite
framework:
type: arduino
version: latest
light:
## G35=RGB WS2812C-2020
- platform: esp32_rmt_led_strip
name: Led
id: led
internal: true
rgb_order: GRB
pin: 35
num_leds: 4
# RMT 0 channels will be occupied by IR
rmt_channel: 1
chipset: ws2812
restore_mode: ALWAYS_ON #OFF?
## Uart on CN105
uart:
id: HP_UART
baud_rate: 2400
tx_pin: GPIO1
rx_pin: GPIO2
## Default logging level
logger:
#hardware_uart: UART1 # This line can be removed for ESP32 devices
level: INFO
## Enable Home Assistant API
api:
services:
- service: reboot
then:
- logger.log: "Esp reboot..."
- lambda: |-
ESP.restart();
- service: set_remote_temperature
variables:
temperature: float
then:
## Select between the C version and the F version
## Uncomment just ONE of the below lines. The top receives the temperature value in C,
## the bottom receives the value in F, converting to C here.
- lambda: 'id(hp).set_remote_temperature(temperature);'
# - lambda: 'id(hp).set_remote_temperature((temperature - 32.0) * (5.0 / 9.0));'
- service: use_internal_temperature
then:
- lambda: 'id(hp).set_remote_temperature(0);'
# encryption:
# key: "xJpzPUEla1JWNtgVhi1J5O/9zweBt7Y9xG3LX/tlq+8=" # needs to be your key
ota:
- platform: esphome
# password: "7a7e990eb0f3d57cbeb41e21dffa4331"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: ${friendly_name}
password: "configesp"
## Captive portal when wifi connection fails
captive_portal:
## Bluetooth proxy
## uncomment if you want to use it
#esp32_ble_tracker:
# scan_parameters:
# # We currently use the defaults to ensure Bluetooth
# # can co-exist with WiFi In the future we may be able to
# # enable the built-in coexistence logic in ESP-IDF
# active: true
#bluetooth_proxy:
# active: true
## Enable Web server.
web_server:
port: 80
## External component reference
external_components:
- source: github://echavet/MitsubishiCN105ESPHome
refresh: always
# Climate entity configuration
climate:
- platform: cn105
id: hp
name: ${friendly_name}
icon: mdi:heat-pump
visual:
min_temperature: 15
max_temperature: 31
temperature_step:
target_temperature: 1
current_temperature: 0.1
compressor_frequency_sensor:
name: Compressor Frequency
vertical_vane_select:
name: Vertical Vane
#horizontal_vane_select:
# name: Horizontal Vane
isee_sensor:
name: ISEE Sensor
remote_temperature_timeout: 30min
debounce_delay : 500ms
update_interval: 4s
supports:
mode: [COOL, HEAT, FAN_ONLY, DRY]
fan_mode: [AUTO, QUIET, LOW, MEDIUM, HIGH]
swing_mode: ["OFF", VERTICAL]
## Diagnostics
text_sensor:
- platform: wifi_info
ip_address:
name: IP
icon: mdi:ip
ssid:
name: SSID
icon: mdi:wifi
- platform: version
name: Version
hide_timestamp: true
disabled_by_default: false
icon: mdi:new-box
entity_category: diagnostic
## ESP restart button
button:
- platform: restart
id: restart_button
name: ESP restart
## G41=Button
binary_sensor:
- platform: gpio
id: esp_button
pin:
number: GPIO41
inverted: true
mode:
input: true
pullup: true
filters:
- delayed_off: 10ms
on_multi_click:
- timing:
- ON for at most 2s
- OFF for at least 0.2s
then:
- switch.toggle: eps32_s3_led_switch
sensor:
## use external temperature from sensor in home assistant
## uncomment to use this function directly / or use the service in home assistant (see api services)
# - platform: homeassistant
# id: current_temp
# internal: true
# entity_id: sensor.selected_temperature_main
# on_value:
# then:
# - lambda: |-
# float temp_f = id(current_temp).state;
# float temp_c = (temp_f - 32.0) * (5.0 / 9.0);
# ESP_LOGD("custom", "Current Temp (F): %.1f, Temp (C): %.1f", temp_f, temp_c);
# id(hp).set_remote_temperature(temp_c);
# filters:
# - heartbeat: 10s
- platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB
name: Signal dB
id: wifi_signal_db
update_interval: 60s
entity_category: diagnostic
- platform: copy # Reports the WiFi signal strength in %
source_id: wifi_signal_db
name: Signal %
filters:
- lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
unit_of_measurement: " %"
entity_category: diagnostic
device_class: ""
- platform: uptime # Reports the Uptime in days
id: esp32_uptime
name: "Uptime"
unit_of_measurement: days
update_interval: 3600s
accuracy_decimals: 1
filters:
- multiply: 0.000011574
device_class: duration
state_class: total_increasing
entity_category: diagnostic
- platform: internal_temperature
name: Internal ESP temperature
entity_category: diagnostic
switch:
- platform: template
id: eps32_s3_led_switch
name: Led switch #${led_switch}
optimistic: true
restore_mode: RESTORE_DEFAULT_ON
lambda: return id(eps32_s3_led_switch).state;
turn_on_action:
- light.turn_on:
id: led
brightness: !lambda |-
// output value must be in range 0 - 1.0
return id(led_brightness).state / 100.0;
turn_off_action:
- light.turn_off:
id: led
number:
## Set led brightness
- platform: template
id: led_brightness
name: Led brightness #${led_brightness}
icon: mdi:toggle-switch-variant
mode: slider
entity_category: config
optimistic: true
min_value: 0
max_value: 100
step: 10
initial_value: 70
restore_value: yes
unit_of_measurement: "%"
on_value:
then:
- if:
condition:
- light.is_on: led
then:
- light.turn_on:
id: led
brightness: !lambda |-
// output value must be in range 0 - 1.0
return id(led_brightness).state / 100.0;