ThingProperty, LevelProperty and number with two decimal points

The following line defines a ThingProperty in a module which I assisting a student with.

ThingProperty motionPower("dcpower", "Power Status", NUMBER, "LevelProperty");

LevelProperty is indicated as being an integer. Is there any options for defining a float value, to two decimal places?

I’ve looked through https://webthings.io/schemas/ but can only find integer definitions.

Cheers. all.

Just found the answer to my question.

1 Like

Not exactly sure what answer you found, but from memory LevelProperty can have a type of integer or number (which in JSON can be a float). I believe you can also use the multipleOf member to set the number of decimal points.

Hi Ben.
Yes, I happened upon documentation describing multipeOf member, just after posting.
That fixed the issue.

Cheers.