Changeset 36


Ignore:
Timestamp:
2011-07-13 16:09:59 (14 years ago)
Author:
mcvflorin
Message:
  • Filled the missing part of the 'getPartitionState' function.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified I_ElkAlarmPanel1.lua ΒΆ

    r35 r36  
    343343        local v = luup.variable_get (SID.PARTITION, variable, device) 
    344344        debug (string.format ("(getPartitionState) partition %d (device %d), got '%s'", partNo, device, tostring (v))) 
     345        if (not v or v == "") then 
     346            log ("(getPartitionState) ERROR: Failed to get the value of '" .. variable .. "'.") 
     347            return nil 
     348        end 
     349        return v 
    345350    else 
    346351        log (string.format ("(getPartitionState) ERROR: No device for partition %d (variable=%s).", partNo, variable)) 
Note: See TracChangeset for help on using the changeset viewer.