Function node to create the payload, adapt to your needs.
[{"id":"83f15108.74e64","type":"function","z":"9774f299.39eb8","name":"format entity","func":"msg.entity_id = \"sensor.warning1\";\nvar nr = 0;\n\nif(msg.payload.length > nr) { \n\n msg.payload = {\n data: {\n state: \"on\",\n attributes: {\n start: msg.payload[nr].start,\n end: msg.payload[nr].end,\n active: msg.payload[nr].active,\n color: msg.payload[nr].color,\n icon: msg.payload[nr].icon,\n headline: msg.payload[nr].headline,\n description: msg.payload[nr].description,\n instruction: msg.payload[nr].instruction,\n sender: msg.payload[nr].sender,\n location: msg.payload[nr].location\n }\n }\n };\n}\nelse {\n msg.payload = {\n data: {\n state: \"off\",\n attributes: {}\n }\n };\n}\nreturn msg;\n","outputs":1,"noerr":0,"x":550,"y":180,"wires":[["532e10c.69c63f"]]}]
API node, see node documentation to create an access token for HA
[{"id":"532e10c.69c63f","type":"ha-api","z":"9774f299.39eb8","name":"","server":"2b393d9c.07d642","protocol":"http","method":"post","path":"/api/states/{{entity_id}}","data":"","dataType":"json","location":"payload","locationType":"msg","responseType":"json","x":730,"y":180,"wires":[[]]},{"id":"2b393d9c.07d642","type":"server","z":"","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true}]
Connect the function node to the API node.
Or, if you can send a static payload for the sensor creation / update, configure that in the API node.
An API call to update an entity will create the entity if it does not exist. That is quite elegant.