[prometheus] Avoid generating unused light color metrics to reduce memory usage on ESP8266 (#9530)

Co-authored-by: J. Nick Koston <nick+github@koston.org>
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
Pawelo
2025-11-26 19:06:51 +01:00
committed by GitHub
parent 12a51ff047
commit 083886c4b0
3 changed files with 92 additions and 78 deletions

View File

@@ -112,6 +112,25 @@ cover:
}
return COVER_CLOSED;
light:
- platform: binary
name: "Binary Light"
output: test_output
- platform: monochromatic
name: "Brightness Light"
output: test_output
- platform: rgb
name: "RGB Light"
red: test_output
green: test_output
blue: test_output
- platform: rgbw
name: "RGBW Light"
red: test_output
green: test_output
blue: test_output
white: test_output
lock:
- platform: template
id: template_lock1
@@ -122,6 +141,14 @@ lock:
return LOCK_STATE_UNLOCKED;
optimistic: true
output:
- platform: template
id: test_output
type: float
write_action:
- lambda: |-
// no-op for CI/build tests
(void)state;
select:
- platform: template
id: template_select1