Skip to content

Commit

Permalink
Update example to match spec. (WebThingsIO#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrstegeman authored and benfrancis committed Sep 24, 2019
1 parent 351c642 commit e7b6586
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,31 @@ <h2>Example</h2>
<pre><code class="language-json">{
"@context": "https://iot.mozilla.org/schemas/",
"@type": ["Light", "OnOffSwitch"],
"name":"My Lamp",
"id": "https://mywebthingserver.com/things/lamp",
"title":"My Lamp",
"description": "A web connected lamp",
"properties": {
"on": {
"@type": "OnOffProperty",
"type": "boolean",
"title": "On/Off",
"description": "Whether the lamp is turned on",
"href": "/things/lamp/properties/on"
"links": [{"href": "/things/lamp/properties/on"}]
},
"brightness" : {
"@type": "BrightnessProperty",
"type": "integer",
"title": "Brightness",
"description": "The level of light from 0-100",
"minimum" : 0,
"maximum" : 100,
"href": "/things/lamp/properties/brightness"
"links": [{"href": "/things/lamp/properties/brightness"}]
}
},
"actions": {
"fade": {
"@type": "FadeAction",
"title": "Fade",
"description": "Fade the lamp to a given level",
"input": {
"type": "object",
Expand All @@ -60,16 +64,17 @@ <h2>Example</h2>
}
}
},
"href": "/things/lamp/actions/fade"
"links": [{"href": "/things/lamp/actions/fade"}]
}
},
"events": {
"overheated": {
"title": "Overheated",
"@type": "OverheatedEvent",
"type": "number",
"unit": "degree celsius",
"description": "The lamp has exceeded its safe operating temperature",
"href": "/things/lamp/events/overheated"
"links": [{"href": "/things/lamp/events/overheated"}]
}
},
"links": [
Expand Down

0 comments on commit e7b6586

Please sign in to comment.