1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 14:43:51 +00:00

Reduce LightCall memory usage by 50 bytes per call (#9333)

This commit is contained in:
J. Nick Koston
2025-07-07 15:20:40 -05:00
committed by GitHub
parent 3ef392d433
commit 31f36df4ba
9 changed files with 522 additions and 263 deletions

View File

@@ -0,0 +1,80 @@
esphome:
name: light-calls-test
host:
api: # Port will be automatically injected
logger:
level: DEBUG
# Test outputs for RGBCW light
output:
- platform: template
id: test_red
type: float
write_action:
- logger.log:
format: "Red output: %.2f"
args: [state]
- platform: template
id: test_green
type: float
write_action:
- logger.log:
format: "Green output: %.2f"
args: [state]
- platform: template
id: test_blue
type: float
write_action:
- logger.log:
format: "Blue output: %.2f"
args: [state]
- platform: template
id: test_cold_white
type: float
write_action:
- logger.log:
format: "Cold white output: %.2f"
args: [state]
- platform: template
id: test_warm_white
type: float
write_action:
- logger.log:
format: "Warm white output: %.2f"
args: [state]
light:
- platform: rgbww
name: "Test RGBCW Light"
id: test_light
red: test_red
green: test_green
blue: test_blue
cold_white: test_cold_white
warm_white: test_warm_white
cold_white_color_temperature: 6536 K
warm_white_color_temperature: 2000 K
constant_brightness: true
effects:
- random:
name: "Random Effect"
transition_length: 100ms
update_interval: 200ms
- strobe:
name: "Strobe Effect"
- pulse:
name: "Pulse Effect"
transition_length: 100ms
# Additional lights to test memory with multiple instances
- platform: rgb
name: "Test RGB Light"
id: test_rgb_light
red: test_red
green: test_green
blue: test_blue
- platform: binary
name: "Test Binary Light"
id: test_binary_light
output: test_red