Changeset 70


Ignore:
Timestamp:
2017-02-07 18:17:18 (8 years ago)
Author:
tudor.leferman
Message:

VUI-13659
VUI-13657

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/L_VeraConnectWWN1.lua

    r69 r70  
    2222local JSON_FILES = { 
    2323    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" 
    2526} 
    2627local DEVICE_TYPES = { 
     
    486487        log("appendDevices", "Append smoke sensor: ".. v.name) 
    487488        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) 
    489491        count = count + 1 
    490492        if count > 20 then 
     
    550552            end 
    551553 
    552             local nestCurrentTemperature = tostring(value["ambient_temperature_".. temperatureScale]):match("[%d.]+") 
     554            local nestCurrentTemperature = tostring(value["ambient_temperature_".. temperatureScale]):match("[%d.-]+") 
    553555            if nestCurrentTemperature then 
    554556                local veraCurrentTemperature = luup.variable_get(SID.TEMP, "CurrentTemperature", deviceId) or "" 
Note: See TracChangeset for help on using the changeset viewer.