1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-19 16:25:50 +00:00

[light] Use std::initializer_list for add_effects to reduce flash overhead (#11485)

This commit is contained in:
J. Nick Koston
2025-10-22 15:21:53 -10:00
committed by GitHub
parent f2f6c597ef
commit 6efe346cc5
2 changed files with 3 additions and 6 deletions

View File

@@ -163,7 +163,7 @@ class LightState : public EntityBase, public Component {
const FixedVector<LightEffect *> &get_effects() const;
/// Add effects for this light state.
void add_effects(const std::vector<LightEffect *> &effects);
void add_effects(const std::initializer_list<LightEffect *> &effects);
/// Get the total number of effects available for this light.
size_t get_effect_count() const { return this->effects_.size(); }