Diff
checker
文本
文本
圖像
文檔
Excel
文件夾
Legal
Enterprise
桌面版
定價
登入
下載 Diffchecker 桌面版
比較文本
尋找兩個文字檔案之間的差異
工具
歷史
即時編輯器
隱藏空白變更
摺疊未變更行
關閉換行
檢視
拆分
統一
比對精度
智能
單詞
字符
文字樣式
變更外觀
語法突出顯示
選擇語法
忽略
文字轉換
前往第一個差異
編輯輸入
Diffchecker Desktop
執行Diffchecker最安全的方式。取得Diffchecker桌面應用程式:您的差異永遠不會離開您的電腦!
取得桌面版
Timer
建立於
6 年前
差異永不過期
清除
匯出
分享
解釋
2 刪除
行
總計
刪除
字符
總計
刪除
要繼續使用此功能,請升級到
Diff
checker
Pro
查看價格
29 行
全部複製
2 新增
行
總計
新增
字符
總計
新增
要繼續使用此功能,請升級到
Diff
checker
Pro
查看價格
29 行
全部複製
return {
return {
on = {
on = {
複製
已複製
複製
已複製
--
timer = { 'every second' },
timer = { 'every second' },
devices = { 1 },
--
devices = { 1 },
httpResponses = { 'lampStatus' }
httpResponses = { 'lampStatus' }
},
},
execute = function(domoticz, item)
execute = function(domoticz, item)
domoticz.log("Hallo?")
domoticz.log("Hallo?")
local lamp = domoticz.devices(384)
local lamp = domoticz.devices(384)
複製
已複製
複製
已複製
if (item.
isDevice
) then
if (item.
isTimer
) then
domoticz.openURL({
domoticz.openURL({
url = 'http://192.168.1.149/json/state/0',
url = 'http://192.168.1.149/json/state/0',
method = 'GET',
method = 'GET',
callback = 'lampStatus'
callback = 'lampStatus'
})
})
domoticz.log("test?")
domoticz.log("test?")
elseif (item.isHTTPResponse) then
elseif (item.isHTTPResponse) then
if (item.ok) then
if (item.ok) then
local currentStatus = item.json.on
local currentStatus = item.json.on
if(currentStatus == true) then
if(currentStatus == true) then
lamp.switchOn()
lamp.switchOn()
elseif(currentStatus == false) then
elseif(currentStatus == false) then
lamp.switchOff()
lamp.switchOff()
end
end
end
end
end
end
end
end
}
}
已保存差異
原始文本
開啟檔案
return { on = { --timer = { 'every second' }, devices = { 1 }, httpResponses = { 'lampStatus' } }, execute = function(domoticz, item) domoticz.log("Hallo?") local lamp = domoticz.devices(384) if (item.isDevice) then domoticz.openURL({ url = 'http://192.168.1.149/json/state/0', method = 'GET', callback = 'lampStatus' }) domoticz.log("test?") elseif (item.isHTTPResponse) then if (item.ok) then local currentStatus = item.json.on if(currentStatus == true) then lamp.switchOn() elseif(currentStatus == false) then lamp.switchOff() end end end end }
更改後文本
開啟檔案
return { on = { timer = { 'every second' }, --devices = { 1 }, httpResponses = { 'lampStatus' } }, execute = function(domoticz, item) domoticz.log("Hallo?") local lamp = domoticz.devices(384) if (item.isTimer) then domoticz.openURL({ url = 'http://192.168.1.149/json/state/0', method = 'GET', callback = 'lampStatus' }) domoticz.log("test?") elseif (item.isHTTPResponse) then if (item.ok) then local currentStatus = item.json.on if(currentStatus == true) then lamp.switchOn() elseif(currentStatus == false) then lamp.switchOff() end end end end }
尋找差異