diff options
author | Kaufman Home Automation <[email protected]> | 2022-06-21 21:17:16 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2022-06-21 21:17:16 -0700 |
commit | e547f35f9e6cb333604cd9d549aa23e7b55fbc6a (patch) | |
tree | 8a33820e770176356528e87611627f253af435f9 | |
parent | ed8d434290e8cfd698d338f6425b933b6e8f1f9e (diff) | |
download | PLF10-e547f35f9e6cb333604cd9d549aa23e7b55fbc6a.tar.gz PLF10-e547f35f9e6cb333604cd9d549aa23e7b55fbc6a.zip |
in config restore, wait for new select setup
-rw-r--r-- | kauf-plug.yaml | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/kauf-plug.yaml b/kauf-plug.yaml index 4d35745..47c115b 100644 --- a/kauf-plug.yaml +++ b/kauf-plug.yaml @@ -635,6 +635,8 @@ select: forced_addr: 34 global_addr: global_forced_addr on_value: + - wait_until: # wait until new select entity is setup + lambda: return ( id(select_button).has_state() ); - lambda: |- if ( x == "Didn't Restore" ) { ESP_LOGD("Kauf Config Migration", "No legacy button configuration to migrate."); @@ -643,15 +645,9 @@ select: // set button config select entity based on press/release/disabled auto call_sel = id(select_button).make_call(); - if ( i == 1 ) { - call_sel.set_option("Don't Toggle"); - id(select_button).set_initial_option("Don't Toggle"); - } + if ( i == 1 ) { call_sel.set_option("Don't Toggle"); } else if ( i >= 5 ) { call_sel.set_option("Toggle on Release"); } - else { - call_sel.set_option("Toggle on Press"); - id(select_button).set_initial_option("Toggle on Press"); - } + else { call_sel.set_option("Toggle on Press"); } call_sel.perform(); // set number_debounce if configured for longer than 100ms. |