Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 23 additions & 28 deletions Integrations/ESPHome/Core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ api:
- script.execute: pumpUntilFull

globals:
- id: button_press_timestamp
restore_value: no
type: uint32_t
initial_value: '0'
- id: pump_start_time
restore_value: no
type: uint32_t
Expand Down Expand Up @@ -181,30 +177,29 @@ binary_sensor:
mode:
input: true
pullup: true
on_press:
then:
- lambda: |-
id(button_press_timestamp) = millis();
on_release:
then:
- lambda: |-
if (millis() - id(button_press_timestamp) >= 10000) {
// Remove Wifi
id(testCycleCount) = 0;
id(runTest) = true;
id(factory_reset_switch).turn_on();
}
else if (millis() - id(button_press_timestamp) >= 3000) {
// StatusCheck
id(statusCheck).execute();
delay(3000);
id(testCycleCount) = 0;
id(runTest) = true;
id(testScript).execute();
}
else {
id(run_pump_timed).execute();
}
on_multi_click:
- timing:
- ON for at least 10s
then:
- button.press: factory_reset_all
- timing:
- ON for at least 3s
- OFF for at least 0.2s
then:
- script.execute: statusCheck
- delay: 3s
- globals.set:
id: testCycleCount
value: "0"
- globals.set:
id: runTest
value: "true"
- script.execute: testScript
- timing:
- ON for at most 1s
- OFF for at least 0.2s
then:
- script.execute: run_pump_timed

- platform: gpio
name: Fluid Input
Expand Down