`post_entity` will not completely override the existing entity
Closed this issue · 1 comments
djs0109 commented
Describe the bug
post_entity
will not completely override the existing entity
To Reproduce
- create entity
entity = {
"id": "Test:001",
"type": "Test",
"humidity": {
"type": "Number",
"value": 1,
"metadata": {}
},
"temperature": {
"type": "Number",
"value": 1,
"metadata": {}
}
}
cb_client.post_entity(ContextEntity(**entity))
- delete an attribute and update entity with
post_entity
entity_delete_attr = {
"id": "Test:001",
"type": "Test",
"temperature": {
"type": "Number",
"value": 1,
"metadata": {}
}
}
cb_client.post_entity(ContextEntity(**entity_delete_attr ), update=True)
Expected behavior
The attribute humidity
is deleted, which is currently not.
Environment
- Orion 3.7.0
github-actions commented