I have notes written up for a âdev-stateâ node but havenât fleshed it out. Canât decided whether to keep it simple, i.e. just a URL and JSON string or make a full UI for all the missing URLs that the current nodes donât touch for the HTTP and websocket API.
Currently, you could just use an HTTP request node to do this now. This is untested but should be pretty close.
[{"id":"4c695472.482f5c","type":"inject","z":"ffbd7f06.4a014","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":176,"y":528,"wires":[["b73c1dc7.e523c"]]},{"id":"91351050.598ea","type":"http request","z":"ffbd7f06.4a014","name":"","method":"POST","ret":"txt","url":"http://localhost:8123/api/states/<entity_id>","tls":"","x":454,"y":528,"wires":[["47b04928.5a7998"]]},{"id":"b73c1dc7.e523c","type":"function","z":"ffbd7f06.4a014","name":"","func":"const LongLivedAccessToken = \"jalfjalsfaslfjlsafj\";\nmsg.headers = {\"Authorization\": `Bearer ${LongLivedAccessToken}`};\nmsg.payload = {\n \"state\": \"custom_state\",\n \"attributes\": {\n \"attr1\":\"value1\",\n \"attr2\":\"value2\"\n }\n};\nreturn msg;","outputs":1,"noerr":0,"x":306,"y":528,"wires":[["91351050.598ea"]]},{"id":"47b04928.5a7998","type":"debug","z":"ffbd7f06.4a014","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":614,"y":528,"wires":[]}]