File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -210,13 +210,19 @@ In this example a :doc:`/components/cover/time_based` is used with the GPIO conf
210
210
if (id(my_cover).current_operation == COVER_OPERATION_IDLE) {
211
211
// Cover is idle, check current state and either open or close cover.
212
212
if (id(my_cover).is_fully_closed()) {
213
- id(my_cover).open();
213
+ auto call = id(my_cover).make_call();
214
+ call.set_command_open();
215
+ call.perform();
214
216
} else {
215
- id(my_cover).close();
217
+ auto call = id(my_cover).make_call();
218
+ call.set_command_close();
219
+ call.perform();
216
220
}
217
221
} else {
218
222
// Cover is opening/closing. Stop it.
219
- id(my_cover).stop();
223
+ auto call = id(my_cover).make_call();
224
+ call.set_command_stop();
225
+ call.perform();
220
226
}
221
227
222
228
switch :
You can’t perform that action at this time.
0 commit comments