Skip to content

Commit 4a654d3

Browse files
committed
Docs and examples updated 2
1 parent 32f73d1 commit 4a654d3

4 files changed

Lines changed: 206 additions & 20 deletions

File tree

docs/examples/max-hon.yaml

Lines changed: 103 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,109 @@ switch:
103103
name: Haier hOn Climate quiet mode
104104

105105
select:
106-
- platform: haier
107-
haier_id: haier_ac
108-
vertical_airflow:
109-
name: Haier hOn Climate airflow vertical
110-
horizontal_airflow:
111-
name: Haier hOn Climate airflow horizontal
106+
- platform: template
107+
id: haier_ac_vertical_direction
108+
name: Haier hOn Climate airflow vertical
109+
entity_category: config
110+
icon: mdi:arrow-expand-vertical
111+
update_interval: 5s
112+
options:
113+
- Health Up
114+
- Max Up
115+
- Up
116+
- Center
117+
- Down
118+
- Max Down
119+
- Health Down
120+
- Auto
121+
lambda: >-
122+
switch (id(haier_ac).get_vertical_airflow().value_or(esphome::haier::hon_protocol::VerticalSwingMode::CENTER))
123+
{
124+
case esphome::haier::hon_protocol::VerticalSwingMode::HEALTH_UP:
125+
return std::string("Health Up");
126+
case esphome::haier::hon_protocol::VerticalSwingMode::MAX_UP:
127+
return std::string("Max Up");
128+
case esphome::haier::hon_protocol::VerticalSwingMode::UP:
129+
return std::string("Up");
130+
default:
131+
case esphome::haier::hon_protocol::VerticalSwingMode::CENTER:
132+
return std::string("Center");
133+
case esphome::haier::hon_protocol::VerticalSwingMode::DOWN:
134+
return std::string("Down");
135+
case esphome::haier::hon_protocol::VerticalSwingMode::MAX_DOWN:
136+
return std::string("Max Down");
137+
case esphome::haier::hon_protocol::VerticalSwingMode::HEALTH_DOWN:
138+
return std::string("Health Down");
139+
case esphome::haier::hon_protocol::VerticalSwingMode::AUTO:
140+
case esphome::haier::hon_protocol::VerticalSwingMode::AUTO_SPECIAL:
141+
return std::string("Auto");
142+
}
143+
set_action:
144+
- climate.haier.set_vertical_airflow:
145+
id: haier_ac
146+
vertical_airflow: !lambda >-
147+
if (x == "Health Up")
148+
return esphome::haier::hon_protocol::VerticalSwingMode::HEALTH_UP;
149+
else if (x == "Max Up")
150+
return esphome::haier::hon_protocol::VerticalSwingMode::MAX_UP;
151+
else if (x == "Up")
152+
return esphome::haier::hon_protocol::VerticalSwingMode::UP;
153+
else if (x == "Down")
154+
return esphome::haier::hon_protocol::VerticalSwingMode::DOWN;
155+
else if (x == "Max Down")
156+
return esphome::haier::hon_protocol::VerticalSwingMode::MAX_DOWN;
157+
else if (x == "Health Down")
158+
return esphome::haier::hon_protocol::VerticalSwingMode::HEALTH_DOWN;
159+
else if (x == "Auto")
160+
return esphome::haier::hon_protocol::VerticalSwingMode::AUTO;
161+
else
162+
return esphome::haier::hon_protocol::VerticalSwingMode::CENTER;
163+
- platform: template
164+
id: haier_ac_horizontal_direction
165+
name: Haier hOn Climate airflow horizontal
166+
entity_category: config
167+
icon: mdi:arrow-expand-horizontal
168+
update_interval: 5s
169+
options:
170+
- Max Left
171+
- Left
172+
- Center
173+
- Right
174+
- Max Right
175+
- Auto
176+
lambda: >-
177+
switch (id(haier_ac).get_horizontal_airflow().value_or(esphome::haier::hon_protocol::HorizontalSwingMode::CENTER))
178+
{
179+
case esphome::haier::hon_protocol::HorizontalSwingMode::MAX_LEFT:
180+
return std::string("Max Left");
181+
case esphome::haier::hon_protocol::HorizontalSwingMode::LEFT:
182+
return std::string("Left");
183+
default:
184+
case esphome::haier::hon_protocol::HorizontalSwingMode::CENTER:
185+
return std::string("Center");
186+
case esphome::haier::hon_protocol::HorizontalSwingMode::RIGHT:
187+
return std::string("Right");
188+
case esphome::haier::hon_protocol::HorizontalSwingMode::MAX_RIGHT:
189+
return std::string("Max Right");
190+
case esphome::haier::hon_protocol::HorizontalSwingMode::AUTO:
191+
return std::string("Auto");
192+
}
193+
set_action:
194+
- climate.haier.set_horizontal_airflow:
195+
id: haier_ac
196+
horizontal_airflow: !lambda >-
197+
if (x == "Max Left")
198+
return esphome::haier::hon_protocol::HorizontalSwingMode::MAX_LEFT;
199+
else if (x == "Left")
200+
return esphome::haier::hon_protocol::HorizontalSwingMode::LEFT;
201+
else if (x == "Right")
202+
return esphome::haier::hon_protocol::HorizontalSwingMode::RIGHT;
203+
else if (x == "Max Right")
204+
return esphome::haier::hon_protocol::HorizontalSwingMode::MAX_RIGHT;
205+
else if (x == "Auto")
206+
return esphome::haier::hon_protocol::HorizontalSwingMode::AUTO;
207+
else
208+
return esphome::haier::hon_protocol::HorizontalSwingMode::CENTER;
112209
113210
sensor:
114211
- platform: haier

docs/examples/usb_c6.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ esp32:
77
flash_size: 8MB
88
framework:
99
type: esp-idf
10-
sdkconfig_options:
11-
CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG: y
12-
version: 5.3.1
13-
platform_version: 6.8.1
1410

1511
wifi:
1612
ssid: !secret wifi_ssid

docs/hon_example.rst

Lines changed: 103 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,109 @@ Maximum configuration witch will use all possible options will look like this:
131131
name: Haier hOn Climate quiet mode
132132
133133
select:
134-
- platform: haier
135-
haier_id: haier_ac
136-
vertical_airflow:
137-
name: Haier hOn Climate airflow vertical
138-
horizontal_airflow:
139-
name: Haier hOn Climate airflow horizontal
134+
- platform: template
135+
id: haier_ac_vertical_direction
136+
name: Haier hOn Climate airflow vertical
137+
entity_category: config
138+
icon: mdi:arrow-expand-vertical
139+
update_interval: 5s
140+
options:
141+
- Health Up
142+
- Max Up
143+
- Up
144+
- Center
145+
- Down
146+
- Max Down
147+
- Health Down
148+
- Auto
149+
lambda: >-
150+
switch (id(haier_ac).get_vertical_airflow().value_or(esphome::haier::hon_protocol::VerticalSwingMode::CENTER))
151+
{
152+
case esphome::haier::hon_protocol::VerticalSwingMode::HEALTH_UP:
153+
return std::string("Health Up");
154+
case esphome::haier::hon_protocol::VerticalSwingMode::MAX_UP:
155+
return std::string("Max Up");
156+
case esphome::haier::hon_protocol::VerticalSwingMode::UP:
157+
return std::string("Up");
158+
default:
159+
case esphome::haier::hon_protocol::VerticalSwingMode::CENTER:
160+
return std::string("Center");
161+
case esphome::haier::hon_protocol::VerticalSwingMode::DOWN:
162+
return std::string("Down");
163+
case esphome::haier::hon_protocol::VerticalSwingMode::MAX_DOWN:
164+
return std::string("Max Down");
165+
case esphome::haier::hon_protocol::VerticalSwingMode::HEALTH_DOWN:
166+
return std::string("Health Down");
167+
case esphome::haier::hon_protocol::VerticalSwingMode::AUTO:
168+
case esphome::haier::hon_protocol::VerticalSwingMode::AUTO_SPECIAL:
169+
return std::string("Auto");
170+
}
171+
set_action:
172+
- climate.haier.set_vertical_airflow:
173+
id: haier_ac
174+
vertical_airflow: !lambda >-
175+
if (x == "Health Up")
176+
return esphome::haier::hon_protocol::VerticalSwingMode::HEALTH_UP;
177+
else if (x == "Max Up")
178+
return esphome::haier::hon_protocol::VerticalSwingMode::MAX_UP;
179+
else if (x == "Up")
180+
return esphome::haier::hon_protocol::VerticalSwingMode::UP;
181+
else if (x == "Down")
182+
return esphome::haier::hon_protocol::VerticalSwingMode::DOWN;
183+
else if (x == "Max Down")
184+
return esphome::haier::hon_protocol::VerticalSwingMode::MAX_DOWN;
185+
else if (x == "Health Down")
186+
return esphome::haier::hon_protocol::VerticalSwingMode::HEALTH_DOWN;
187+
else if (x == "Auto")
188+
return esphome::haier::hon_protocol::VerticalSwingMode::AUTO;
189+
else
190+
return esphome::haier::hon_protocol::VerticalSwingMode::CENTER;
191+
- platform: template
192+
id: haier_ac_horizontal_direction
193+
name: Haier hOn Climate airflow horizontal
194+
entity_category: config
195+
icon: mdi:arrow-expand-horizontal
196+
update_interval: 5s
197+
options:
198+
- Max Left
199+
- Left
200+
- Center
201+
- Right
202+
- Max Right
203+
- Auto
204+
lambda: >-
205+
switch (id(haier_ac).get_horizontal_airflow().value_or(esphome::haier::hon_protocol::HorizontalSwingMode::CENTER))
206+
{
207+
case esphome::haier::hon_protocol::HorizontalSwingMode::MAX_LEFT:
208+
return std::string("Max Left");
209+
case esphome::haier::hon_protocol::HorizontalSwingMode::LEFT:
210+
return std::string("Left");
211+
default:
212+
case esphome::haier::hon_protocol::HorizontalSwingMode::CENTER:
213+
return std::string("Center");
214+
case esphome::haier::hon_protocol::HorizontalSwingMode::RIGHT:
215+
return std::string("Right");
216+
case esphome::haier::hon_protocol::HorizontalSwingMode::MAX_RIGHT:
217+
return std::string("Max Right");
218+
case esphome::haier::hon_protocol::HorizontalSwingMode::AUTO:
219+
return std::string("Auto");
220+
}
221+
set_action:
222+
- climate.haier.set_horizontal_airflow:
223+
id: haier_ac
224+
horizontal_airflow: !lambda >-
225+
if (x == "Max Left")
226+
return esphome::haier::hon_protocol::HorizontalSwingMode::MAX_LEFT;
227+
else if (x == "Left")
228+
return esphome::haier::hon_protocol::HorizontalSwingMode::LEFT;
229+
else if (x == "Right")
230+
return esphome::haier::hon_protocol::HorizontalSwingMode::RIGHT;
231+
else if (x == "Max Right")
232+
return esphome::haier::hon_protocol::HorizontalSwingMode::MAX_RIGHT;
233+
else if (x == "Auto")
234+
return esphome::haier::hon_protocol::HorizontalSwingMode::AUTO;
235+
else
236+
return esphome::haier::hon_protocol::HorizontalSwingMode::CENTER;
140237
141238
sensor:
142239
- platform: haier

docs/usb_2_uart_boards.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,6 @@ Curently, only confirmed board with ESP32-C6 that can be used for UART over USB
107107
flash_size: 8MB
108108
framework:
109109
type: esp-idf
110-
sdkconfig_options:
111-
CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG: y
112-
version: 5.3.1
113-
platform_version: 6.8.1
114110
115111
wifi:
116112
ssid: !secret wifi_ssid

0 commit comments

Comments
 (0)