There is no ready made function - you have to do it yourself.
function QuickApp:iconCount(typ)
local map = {
[QuickAppBase.iconProviders.single]=1, -- single icon
[QuickAppBase.iconProviders.binary]=2, -- off,on
[QuickAppBase.iconProviders.multilevel]=11, -- 0%,10%,20%,30%,40%,50%,60%,70%,80%,90%,100%
[QuickAppBase.iconProviders.baseShutter]=5 -- opening,opened,closing,closed,unknown
}
local iconProvider = QuickAppBase.deviceIconTypeMapping[typ] or ""
return map[iconProvider]
end
function QuickApp:onInit()
self:debug(self.name, self.id)
print(self:iconCount("com.fibaro.energyMeter"))
print(self:iconCount("com.fibaro.multilevelSwitch"))
print(self:iconCount("com.fibaro.baseShutter"))
end
iconCount returns number of icons for a specific type. Currently there only seems to be 4 options, 1,2,5,11 icons.
If it is not mapped (return nil), try with the device baseType and see if that is mapped.
...or Fibaro has forgot to do the mapping.