aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--kauf-plug.yaml4
1 files changed, 2 insertions, 2 deletions
diff --git a/kauf-plug.yaml b/kauf-plug.yaml
index fca4725..e6a42bd 100644
--- a/kauf-plug.yaml
+++ b/kauf-plug.yaml
@@ -595,7 +595,7 @@ number: # used as a threshold for whether the plugged-in devices is running
set_action:
- script.execute: script_save_changes
on_value:
- - lambda: id(blue_led_pwm).set_level(x/100);
+ - lambda: if ( id(blue_led).state ) id(blue_led_pwm).set_level(x/100);
- platform: template
name: ${friendly_name} Red LED Brightness
@@ -616,7 +616,7 @@ number: # used as a threshold for whether the plugged-in devices is running
set_action:
- script.execute: script_save_changes
on_value:
- - lambda: id(red_led_pwm).set_level(x/100);
+ - lambda: if ( id(red_led).state ) id(red_led_pwm).set_level(x/100);
- platform: template
name: ${friendly_name} Scale Power