diff options
author | Kaufman Home Automation <[email protected]> | 2022-05-01 13:51:28 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2022-05-01 13:51:28 -0700 |
commit | a1d7d52fe3c563f8ca8b95be58b97e757c9bda93 (patch) | |
tree | 8d6788c61172d0817ea715104f597f6f2abffcce | |
parent | 06bae17ae35b37b7fcd4dd50e3ee97d31e3b52b1 (diff) | |
download | PLF10-a1d7d52fe3c563f8ca8b95be58b97e757c9bda93.tar.gz PLF10-a1d7d52fe3c563f8ca8b95be58b97e757c9bda93.zip |
Update kauf-plug.yaml
-rw-r--r-- | kauf-plug.yaml | 53 |
1 files changed, 14 insertions, 39 deletions
diff --git a/kauf-plug.yaml b/kauf-plug.yaml index c1daf04..a8fa544 100644 --- a/kauf-plug.yaml +++ b/kauf-plug.yaml @@ -61,8 +61,6 @@ substitutions: sub_update_interval: 10s sub_initial_mode: CURRENT - # can be used to block status led from blinking - sub_blink_check: script_blink_check # https://esphome.io/components/esp8266.html esp8266: @@ -220,7 +218,6 @@ script: then: - lambda: |- - auto call = id(blue_led).make_call(); // blue power status @@ -251,43 +248,10 @@ script: call.perform(); - - - - ############################################################################ - # scripts for different things the button can do: # - # * toggle # - # * nothing # - ############################################################################ - - id: script_toggle - then: - - if: - condition: # only toggle relay if button is enabled - lambda: return (id(select_button).state == "Enabled"); - then: - switch.toggle: relay - - - id: script_do_nothing - then: - - lambda: return; - - - - ############################################################################ - # scripts for status led # - # * Blink LED - blinks led once. keeps calling itself as long as # - # warning/error exists # - # * Blink check - cancel blinking before it happens if desired # - # can be used to block blinking in specified conditions # - ############################################################################ - id: blink_status_led mode: queued then: - # allows the blinking to be blocked if desired by overwriting script substitution - # the script will need 'script.stop: blink_status_led' to stop status led - - script.execute: $sub_blink_check - - lambda: |- // turn on blue LED if configured for error status @@ -307,7 +271,6 @@ script: call.set_save(false); call.perform(); } - - delay: 350ms @@ -342,9 +305,21 @@ script: - script.execute: script_set_power_leds # done with status LED, restore light power status - - id: script_blink_check + ############################################################################ + # scripts for different things the button can do: # + # * toggle # + # * nothing # + ############################################################################ + - id: script_toggle + then: + - if: + condition: # only toggle relay if button is enabled + lambda: return (id(select_button).state == "Enabled"); + then: + switch.toggle: relay + + - id: script_do_nothing then: - # - script.stop: blink_status_led # prevents status led from blinking. - lambda: return; |