diff options
author | Kaufman Home Automation <[email protected]> | 2022-06-21 21:06:00 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2022-06-21 21:06:00 -0700 |
commit | ed8d434290e8cfd698d338f6425b933b6e8f1f9e (patch) | |
tree | 332ec9076e05c0cf673c9520638a4cb66f971ac3 | |
parent | a25b6d82a61afc9b2794471148abed6436f53376 (diff) | |
download | PLF10-ed8d434290e8cfd698d338f6425b933b6e8f1f9e.tar.gz PLF10-ed8d434290e8cfd698d338f6425b933b6e8f1f9e.zip |
set initial option when restoring config
-rw-r--r-- | kauf-plug.yaml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/kauf-plug.yaml b/kauf-plug.yaml index a05fdd8..4d35745 100644 --- a/kauf-plug.yaml +++ b/kauf-plug.yaml @@ -643,9 +643,15 @@ 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"); } + if ( i == 1 ) { + call_sel.set_option("Don't Toggle"); + id(select_button).set_initial_option("Don't Toggle"); + } else if ( i >= 5 ) { call_sel.set_option("Toggle on Release"); } - else { call_sel.set_option("Toggle on Press"); } + else { + call_sel.set_option("Toggle on Press"); + id(select_button).set_initial_option("Toggle on Press"); + } call_sel.perform(); // set number_debounce if configured for longer than 100ms. |