diff options
author | Kaufman Home Automation <[email protected]> | 2022-06-08 07:35:04 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2022-06-08 07:35:04 -0700 |
commit | 017ce4a35724fbe898e12c738cef087d2bd60ed4 (patch) | |
tree | cfbc22a7aa1abd44331ce9d618a06b311ff3047d | |
parent | 51bea564b70f37d8646ff6fe417af1ab5aa50103 (diff) | |
download | PLF10-017ce4a35724fbe898e12c738cef087d2bd60ed4.tar.gz PLF10-017ce4a35724fbe898e12c738cef087d2bd60ed4.zip |
on_turn_on and on_turn_off scripts
-rw-r--r-- | kauf-plug.yaml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kauf-plug.yaml b/kauf-plug.yaml index 2b62d1a..b3c9e06 100644 --- a/kauf-plug.yaml +++ b/kauf-plug.yaml @@ -36,6 +36,9 @@ substitutions: sub_on_release: script_do_nothing # executes right when button is released sub_on_hold_5s: script_do_nothing # executes right when button has been held for 5s, while button is still being held + sub_on_turn_on: script_do_nothing + sub_on_turn_off: script_do_nothing + # an extra script that, if running, will stop the relay from toggling on button release. # used to not toggle when WiFi AP is re-enabled on update bin file. sub_toggle_check: script_do_nothing @@ -468,8 +471,10 @@ switch: restore_mode: $sub_restore_mode on_turn_on: - script.execute: script_set_power_leds + - script.execute: $sub_on_turn_on on_turn_off: - script.execute: script_set_power_leds + - script.execute: $sub_on_turn_off # https://esphome.io/components/switch/template.html - platform: template |