mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 06:33: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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user