diff options
-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. |