refactor(lua):重命名设备属性设置方法- 将 setDeviceProps 方法重命名为 setDeviceProp

- 更新 Lua 模块中对应的方法引用- 保持功能一致性和代码清晰度
This commit is contained in:
zhengjw22
2025-11-03 15:08:37 +08:00
parent 39ee792582
commit 3c0f7f7406

View File

@@ -23,8 +23,8 @@ func (lm *LuaModule) Loader(L *lua.LState) int {
//"cache_get": lm.GetCache,
"shadow": lm.getDeviceShadow,
//"device_list": lm.getDeviceShadow,
"getDevice": lm.getDevice,
"setDeviceProps": lm.setDeviceProps,
"getDevice": lm.getDevice,
"setDeviceProp": lm.setDeviceProp,
//"writeToMsgBus": lm.WriteToMsgBus,
})
L.Push(mod)
@@ -105,7 +105,7 @@ func (lm *LuaModule) getDevice(L *lua.LState) int {
/**
* setDeviceProps 设置设备属性
*/
func (lm *LuaModule) setDeviceProps(L *lua.LState) int {
func (lm *LuaModule) setDeviceProp(L *lua.LState) int {
deviceId := L.ToString(1)
propName := L.ToString(2)
propValue := L.ToString(3)