1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 14:43:51 +00:00

Add cover toggle support (#1809)

* Add cover toggle support

Step through open/stop/close/stop sequence with every toggle

* Move the cover toggle logic to perform()

* Add clang-tidy CI suggestion

* Implement cover toggle action as cover trait

* Handle toggle correctly if cover fully closed on POR

* Fix CI finding

* Add deprecated warning

* Don't add already deprecated interface

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>

* Don't add already deprecated interface

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>

* Don't add already deprecated interface

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>

Co-authored-by: Mueller, Daniel <daniel.mueller@karlstorz.com>
Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
This commit is contained in:
Daniel Müller
2021-09-27 22:31:15 +02:00
committed by GitHub
parent e30f17f64f
commit 2eb5f89d82
8 changed files with 70 additions and 1 deletions

View File

@@ -729,6 +729,12 @@ binary_sensor:
id: r0_sensor
name: 'R0 Sensor'
component_name: page0.r0
- platform: template
id: 'cover_toggle'
on_press:
then:
- cover.toggle: time_based_cover
globals:
- id: my_global_string
type: std::string
@@ -1018,6 +1024,7 @@ cover:
max_duration: 10min
- platform: time_based
name: Time Based Cover
id: time_based_cover
stop_action:
- switch.turn_on: gpio_switch1
open_action: