From a95868547317f8f465cef706dbfea97135d3eb14 Mon Sep 17 00:00:00 2001 From: Ben Francis Date: Tue, 30 Apr 2024 15:01:19 +0100 Subject: [PATCH] Add sse subprotocol to SSE example TD - fixes #370 --- index.html | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 8da7b7c..211bdec 100644 --- a/index.html +++ b/index.html @@ -1952,7 +1952,17 @@

Protocol Binding

"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", @@ -1961,7 +1971,18 @@

Protocol Binding

"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": {