Inconsistency in persisted value for device attribute


I noticed strange behavior when persisting an object with null values.

I’m sending null as in the images below, but when I see the device’s timeseries, I see that the state was not ignored, but considered as 0 .

NOTE: The attribute is of numeric type.

Is this behavior expected? Shouldn’t the attribute be ignored when being null or undefined?

Thank you in advance.

Hello @Andressa_Borre,

Yes, what you are seeing is intended behavior.

When an attribute is present on the incoming payload and the value is null, the value is translated as 0. When it is undefined, it will be ignored.

Ok Heath,

Thank you!

1 Like