Adjusted time for HW long click
This commit is contained in:
@@ -745,22 +745,8 @@ binary_sensor:
|
||||
number: 14
|
||||
inverted: true
|
||||
on_multi_click:
|
||||
- timing: &double_click-timing
|
||||
- ON for at most 0.8s
|
||||
- OFF for at most 0.8s
|
||||
- ON for at most 0.8s
|
||||
- OFF for at least 0.2s
|
||||
then:
|
||||
- logger.log: "Left button - Double click"
|
||||
- script.execute:
|
||||
id: ha_button
|
||||
page: !lambda return id(current_page).state;
|
||||
component: "hw_bt_left"
|
||||
command: "double_click"
|
||||
|
||||
- timing: &long_click-timing
|
||||
- ON for 0.8s to 2s
|
||||
- OFF for at least 0.5s
|
||||
- ON for at least 0.8s
|
||||
then:
|
||||
- logger.log: "Left button - Long click"
|
||||
- script.execute:
|
||||
@@ -768,10 +754,8 @@ binary_sensor:
|
||||
page: !lambda return id(current_page).state;
|
||||
component: "hw_bt_left"
|
||||
command: "long_click"
|
||||
|
||||
- timing: &short_click-timing
|
||||
- ON for at most 0.8s
|
||||
- OFF for at least 0.5s
|
||||
then:
|
||||
- logger.log: "Left button - Short click"
|
||||
- if:
|
||||
@@ -794,15 +778,6 @@ binary_sensor:
|
||||
number: 27
|
||||
inverted: true
|
||||
on_multi_click:
|
||||
- timing: *double_click-timing
|
||||
then:
|
||||
- logger.log: "Right button - Double click"
|
||||
- script.execute:
|
||||
id: ha_button
|
||||
page: !lambda return id(current_page).state;
|
||||
component: "hw_bt_right"
|
||||
command: "double_click"
|
||||
|
||||
- timing: *long_click-timing
|
||||
then:
|
||||
- logger.log: "Right button - Long click"
|
||||
@@ -811,7 +786,6 @@ binary_sensor:
|
||||
page: !lambda return id(current_page).state;
|
||||
component: "hw_bt_right"
|
||||
command: "long_click"
|
||||
|
||||
- timing: *short_click-timing
|
||||
then:
|
||||
- logger.log: "Right button - Short click"
|
||||
|
||||
Reference in New Issue
Block a user