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:
@@ -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(); }
|
||||
|
||||
Reference in New Issue
Block a user