Browse Source

add random lambda effect with randomness

master
Fr3deric 5 years ago
parent
commit
25ba9763e0
  1. 9
      blaue_lichterkette.yaml

9
blaue_lichterkette.yaml

@ -33,6 +33,15 @@ light:
output: pwm_output output: pwm_output
name: "Blaue Lichterkette" name: "Blaue Lichterkette"
id: blaue_lichterkette id: blaue_lichterkette
effects:
- lambda:
name: "My Random Lambda Effect with Randomness"
update_interval: 3s
lambda: |-
auto call = id(blaue_lichterkette).turn_on();
call.set_transition_length(3000);
call.set_brightness(0.5 + random_float() * 0.5);
call.perform();
binary_sensor: binary_sensor:
- platform: gpio - platform: gpio

Loading…
Cancel
Save