Hi AK,
I was trying to set a number of attributes (model, manufacturer, device_json) via the statevariable on device creation and found they got ignored. Looking at the chdev.lue code I found that the specified attribute values get overruled by the defaults. So moved setting the attributes from the statevariable after the default (line 216) and it now behaved as a Vera does.
– 2019.09.13 set attributes from state variable as we can overwrite defaults.
if type(x.statevariables) == “table” then
for _,v in ipairs(x.statevariables) do
if (not v.service) and v.variable and v.value then – 2019.06.02
dev:attr_set (v.variable, v.value)
end
end
end
Can you look at this for a next release?
Cheers Rene