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?
LevelProperty
float
I’ve looked through https://webthings.io/schemas/ but can only find integer definitions.
Cheers. all.
Just found the answer to my question.
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.
integer
number
multipleOf
Hi Ben. Yes, I happened upon documentation describing multipeOf member, just after posting. That fixed the issue.
Cheers.