Skip to content

Commit 2d40c85

Browse files
committed
Add LED Brightness slider to be able to set the LED brightness and color brightness from UI
1 parent 49730e0 commit 2d40c85

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

firmware/common-manual-ams.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ esphome:
2323
- light.turn_on:
2424
id: neopixel_light
2525
effect: Breathing Blue
26-
brightness: 100%
2726
- wait_until:
2827
condition:
2928
wifi.connected:

firmware/conf.d/led-external.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,30 @@
11
---
22
substitutions:
33
led_count: "17" # Match the max_value from filament_slots
4+
5+
number:
6+
- platform: template
7+
name: "LED Brightness"
8+
id: led_brightness
9+
icon: mdi:led-on
10+
entity_category: config
11+
min_value: 1
12+
max_value: 100
13+
step: 1
14+
initial_value: 50
15+
unit_of_measurement: "%"
16+
optimistic: true
17+
restore_value: true
18+
on_value:
19+
then:
20+
- lambda: |-
21+
auto call = id(neopixel_light).make_call();
22+
call.set_brightness(x / 100.0);
23+
call.set_color_brightness(x / 100.0);
24+
call.perform();
25+
- delay: 500ms
26+
- script.execute: select_led
27+
428
light:
529
- platform: esp32_rmt_led_strip
630
name: External LEDs

0 commit comments

Comments
 (0)