Changeset 70
- Timestamp:
- 2017-02-07 18:17:18 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/L_VeraConnectWWN1.lua ¶
r69 r70 22 22 local JSON_FILES = { 23 23 WWN_THERMOSTAT = "D_VeraConnectWWNThermostat1.json", 24 WWN_THERMOSTAT_NO_COOL = "D_VeraConnectWWNThermostat1_NoCool.json" 24 WWN_THERMOSTAT_NO_COOL = "D_VeraConnectWWNThermostat1_NoCool.json", 25 WWN_CO_SENSOR = "D_COSensor1.json" 25 26 } 26 27 local DEVICE_TYPES = { … … 486 487 log("appendDevices", "Append smoke sensor: ".. v.name) 487 488 luup.chdev.append(lug_device, g_appendPtr, "nest_smoke_".. v.device_id, "WWN Smoke - " .. v.name, DEVICE_TYPES.SMOKE_SENSOR, DEVICE_FILES.SMOKE_SENSOR, nil, ",category_num=4\n,subcategory_num=4", false) 488 luup.chdev.append(lug_device, g_appendPtr, "nest_co_".. v.device_id, "WWN CO - " .. v.name, DEVICE_TYPES.SMOKE_SENSOR, DEVICE_FILES.SMOKE_SENSOR, nil, ",category_num=4\n,subcategory_num=5", false) 489 local jsonFile = ",device_json=".. JSON_FILES.WWN_CO_SENSOR 490 luup.chdev.append(lug_device, g_appendPtr, "nest_co_".. v.device_id, "WWN CO - " .. v.name, DEVICE_TYPES.SMOKE_SENSOR, DEVICE_FILES.SMOKE_SENSOR, nil, ",category_num=4\n,subcategory_num=5\n"..jsonFile, false) 489 491 count = count + 1 490 492 if count > 20 then … … 550 552 end 551 553 552 local nestCurrentTemperature = tostring(value["ambient_temperature_".. temperatureScale]):match("[%d. ]+")554 local nestCurrentTemperature = tostring(value["ambient_temperature_".. temperatureScale]):match("[%d.-]+") 553 555 if nestCurrentTemperature then 554 556 local veraCurrentTemperature = luup.variable_get(SID.TEMP, "CurrentTemperature", deviceId) or ""
Note: See TracChangeset
for help on using the changeset viewer.