[light] Use zero-copy set_effect overload in JSON schema parsing (#12979)
This commit is contained in:
1 parent
3fb5b28930
commit
e87a3b3916
1 file changed
+1
-1
@@ -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