Removing faulty onpress/onrelease code from garage.yaml
This commit is contained in:
parent
f1db356421
commit
f62e04aef1
54
garage.yaml
54
garage.yaml
@ -63,37 +63,39 @@ binary_sensor:
|
||||
device_class: door
|
||||
id: garage_door_open
|
||||
filters:
|
||||
- invert:
|
||||
on_press:
|
||||
then:
|
||||
- lambda: |-
|
||||
id(garage_door).current_operation = COVER_OPERATION_IDLE;
|
||||
id(garage_door).position = COVER_OPEN;
|
||||
id(garage_door_state).publish_state("Open");
|
||||
on_release:
|
||||
then:
|
||||
- lambda: |-
|
||||
id(garage_door).current_operation = COVER_OPERATION_CLOSING;
|
||||
id(garage_door).publish_state();
|
||||
id(garage_door_state).publish_state("Moving");
|
||||
- invert
|
||||
# on_press:
|
||||
# then:
|
||||
# - lambda: |-
|
||||
# //id(garage_door).current_operation = COVER_OPERATION_IDLE;
|
||||
# //id(garage_door).position = COVER_OPEN;
|
||||
# //id(garage_door_state).publish_state("Open");
|
||||
# on_release:
|
||||
# then:
|
||||
# - lambda: |-
|
||||
# //id(garage_door).current_operation = COVER_OPERATION_CLOSING;
|
||||
# //id(garage_door).publish_state();
|
||||
# //id(garage_door_state).publish_state("Moving");
|
||||
|
||||
- platform: gpio
|
||||
pin: D1
|
||||
id: garage_door_closed
|
||||
filters:
|
||||
- invert:
|
||||
- invert
|
||||
internal: true
|
||||
on_press:
|
||||
then:
|
||||
- lambda: |-
|
||||
id(garage_door).current_operation = COVER_OPERATION_IDLE;
|
||||
id(garage_door).position = COVER_CLOSED;
|
||||
id(garage_door_state).publish_state("Closed");
|
||||
on_release:
|
||||
then:
|
||||
- lambda: |-
|
||||
id(garage_door).current_operation = COVER_OPERATION_OPENING;
|
||||
id(garage_door).publish_state();
|
||||
id(garage_door_state).publish_state("Moving");
|
||||
# on_press:
|
||||
# then:
|
||||
# - lambda: |-
|
||||
# //id(garage_door).current_operation = COVER_OPERATION_IDLE;
|
||||
# //id(garage_door).position = COVER_CLOSED;
|
||||
# //id(garage_door_state).publish_state("Closed");
|
||||
# on_release:
|
||||
# then:
|
||||
# - lambda: |-
|
||||
# //id(garage_door).current_operation = COVER_OPERATION_OPENING;
|
||||
# //id(garage_door).publish_state();
|
||||
# //id(garage_door_state).publish_state("Moving");
|
||||
|
||||
- platform: gpio
|
||||
pin: D2
|
||||
name: "Side Door"
|
||||
|
Loading…
Reference in New Issue
Block a user