Skip to content

Commit

Permalink
Add sse subprotocol to SSE example TD - fixes #370
Browse files Browse the repository at this point in the history
  • Loading branch information
benfrancis authored and lu-zero committed May 7, 2024
1 parent 55f66b1 commit a958685
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1952,7 +1952,17 @@ <h2>Protocol Binding</h2>
"type": "boolean",
"title": "On/Off",
"description": "Whether the lamp is turned on",
"forms": [{"href": "properties/on"}]
"forms": [
{
"href": "properties/on",
"op": ["readproperty", "writeproperty"],
},
{
"href": "properties/on",
"op": ["observeproperty", "unobserveproperty"],
"subprotocol": "sse"
}
]
},
"level" : {
"type": "integer",
Expand All @@ -1961,7 +1971,18 @@ <h2>Protocol Binding</h2>
"unit": "percent",
"minimum" : 0,
"maximum" : 100,
"forms": [{"href": "properties/level"}]
"forms": [
{
"href": "properties/level",
"op": ["readproperty", "writeproperty"],
},
{
"href": "properties/level",
"op": ["observeproperty", "unobserveproperty"],
"subprotocol": "sse"
}
]
},
}
},
"actions": {
Expand Down

0 comments on commit a958685

Please sign in to comment.