-
Notifications
You must be signed in to change notification settings - Fork 4
Labels
enhancementNew feature or requestNew feature or request
Description
Using on_multi_click allows multiple different timings to be done in YAML and doesn't require a global to store the time.
PUMP-1/Integrations/ESPHome/Core.yaml
Lines 191 to 214 in b7db2e0
| 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(); | |
| } |
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request