-
Notifications
You must be signed in to change notification settings - Fork 48
/
hp-sejour.yaml
206 lines (176 loc) · 4.58 KB
/
hp-sejour.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
substitutions:
name: "hpsejour"
friendly_name: Climatisation Séjour
esphome:
name: ${name}
friendly_name: ${friendly_name}
esp8266:
board: d1_mini
mqtt:
broker: home-io.local
username: heatpumpSejour
password: !secret mqtt_password
discovery: true
# Enable logging
logger:
hardware_uart: UART1
level: INFO
logs:
EVT_SETS : INFO
WIFI : INFO
MQTT : INFO
WRITE_SETTINGS : INFO
SETTINGS : INFO
STATUS : INFO
CN105Climate: WARN
CN105: INFO
climate: WARN
sensor: WARN
chkSum : INFO
WRITE : WARN
READ : WARN
Header: INFO
Decoder : INFO
CONTROL_WANTED_SETTINGS: INFO
# level: DEBUG
# logs:
# EVT_SETS : DEBUG
# WIFI : INFO
# MQTT : INFO
# WRITE_SETTINGS : DEBUG
# SETTINGS : DEBUG
# STATUS : INFO
# CN105Climate: WARN
# CN105: DEBUG
# climate: WARN
# sensor: WARN
# chkSum : INFO
# WRITE : WARN
# READ : WARN
# Header: INFO
# Decoder : DEBUG
# CONTROL_WANTED_SETTINGS: DEBUG
# Enable Home Assistant API
api:
services:
- service: reboot
then:
- logger.log: "Redémarrage en cours..."
- lambda: |-
ESP.restart();
- service: set_remote_temperature
variables:
temperature: float
then:
- lambda: 'id(clim_sejour).set_remote_temperature(temperature);'
- service: use_internal_temperature
then:
- lambda: 'id(clim_sejour).set_remote_temperature(0);'
encryption:
key: !secret encryption_key
ota:
- platform: esphome
password: !secret ota_pwd
wifi:
#ssid: !secret wifi_ssid
#password: !secret wifi_password
networks:
- ssid : !secret wifi_ssid
password: !secret wifi_password
- ssid: !secret wifi_ssid2
password: !secret wifi_password2
#- ssid: !secret wifi_ssid2
# password: !secret wifi_password2
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Heatpump-Sejour Fallback Hotspot"
password: !secret ota_pwd
captive_portal:
# pas assez de place pour update ota
#web_server:
# port: 80
time:
- platform: homeassistant
id: homeassistant_time
# this setting is for local component (code is not on github)
external_components:
- source:
type: local
path: components
# this setting is for github component
# external_components:
# - source: github://echavet/MitsubishiCN105ESPHome
# refresh: 0s
# Text sensors with general information.
text_sensor:
# Expose ESPHome version as sensor.
- platform: version
name: ${name} ESPHome Version
# Expose WiFi information as sensors.
- platform: wifi_info
ip_address:
name: ${name} IP
ssid:
name: ${name} SSID
bssid:
name: ${name} BSSID
# Sensors with general information.
sensor:
# Uptime sensor.
- platform: uptime
name: ${name} Uptime
# WiFi Signal sensor.
- platform: wifi_signal
name: ${name} WiFi Signal
update_interval: 60s
uart:
id: HP_UART
baud_rate: 2400
tx_pin: 1
rx_pin: 3
# Configuration pour l'objet 'climate'
climate:
- platform: cn105 # remplis avec la plateforme de ton choix
name: ${friendly_name}
id: "clim_sejour"
update_interval: 2s # shouldn't be less than 1 second
# horizontal_vane_select:
# name: ${name} Horizontal Vane
# id: "clim_sejour_horizontal_vane"
vertical_vane_select:
name: ${name} Vertical Vane
id: "clim_sejour_vertical_vane"
compressor_frequency_sensor:
name: ${name} Compressor Frequency
id: "clim_sejour_compressor_frequency"
# Configuration pour l'objet 'switch' (bouton)
switch:
- platform: template
name: ${name} UART Setup Switch
id: uart_setup_switch
#setup_priority : -100.0 ## late
optimistic: true
turn_on_action:
- lambda: |-
// Appelle la méthode 'setupUART' quand le switch est activé
id(clim_sejour).setupUART();
turn_off_action:
- lambda: |-
// Appelle la méthode 'setupUART' quand le switch est activé
id(clim_sejour).disconnectUART();
- platform: template
name: Send 1st packet to ${name}
id: send_packet_switch
#setup_priority : -100.0 ## late
optimistic: true
turn_on_action:
- lambda: |-
id(clim_sejour).sendFirstConnectionPacket();
# - platform: template
# name: Requests ${name} Synchro
# id: build_and_send_requests_info_packets
# #setup_priority : -100.0 ## late
# optimistic: true
# turn_on_action:
# - lambda: |-
# id(clim_sejour).buildAndSendRequestsInfoPackets();