Daylight sensor does not have attributes lat and long

rItemDescriptors.emplace_back(ResourceItemDescriptor(DataTypeString, QVariant::String, RConfigLat));

                else if (rid.suffix == RConfigLat || rid.suffix == RConfigLong) // String
                {
                    updated = true;
                }

Can you try with string instead of number ?