mirror of
https://github.com/esphome/esphome.git
synced 2026-01-10 04:00:51 -07:00
[light] Use zero-copy set_effect overload in JSON schema parsing (#12979)
This commit is contained in:
@@ -160,7 +160,7 @@ void LightJSONSchema::parse_json(LightState &state, LightCall &call, JsonObject
|
||||
|
||||
if (root[ESPHOME_F("effect")].is<const char *>()) {
|
||||
const char *effect = root[ESPHOME_F("effect")];
|
||||
call.set_effect(effect);
|
||||
call.set_effect(effect, strlen(effect));
|
||||
}
|
||||
|
||||
if (root[ESPHOME_F("effect_index")].is<uint32_t>()) {
|
||||
|
||||
Reference in New Issue
Block a user