bruxy70 / Venetian-Blinds-Control

Control Shutters or Venetian blinds via buttons and MQTT. Use 2 relays (up and down) and 2 binary inputs to independently control position and tilt.
MIT License
44 stars 19 forks source link

fix: add support for stopping the cover #15

Closed goldmann closed 11 months ago

goldmann commented 11 months ago

Required to be able to stop the moving cover when running on 2023.5.0 or later. Tested with 2023.7.0.

Without this, it is not possible to use the stop_action, like this:

cover:
  - platform: venetian_blinds
    name: "wardrobe"
    id: cover1
    open_action:
      - switch.turn_on: up
    open_duration: 65000ms
    close_action:
      - switch.turn_on: down
    close_duration: 65000ms
    tilt_duration: 1650ms
    stop_action:
      - switch.turn_off: up
      - switch.turn_off: down

This PR restores this behavior for newer ESPHome.

Related:

goldmann commented 11 months ago

Thanks for the quick merge!