Skip to content

Commit

Permalink
chore: change ngsi-v2 update to keyValues
Browse files Browse the repository at this point in the history
  • Loading branch information
djs0109 committed Mar 1, 2024
1 parent 7d0be6f commit 0db565a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions backend/gateway/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,12 @@ async def process_mqtt_message(
)
if value:
payload = {
datapoint["attribute_name"]: {
"type": "Number",
"value": value,
}
datapoint["attribute_name"]: value
}
# Send the payload to the Orion Context Broker
try:
await session.patch(
url=f"{orion}/v2/entities/{datapoint['entity_id']}/attrs?type={datapoint['entity_type']}",
url=f"{orion}/v2/entities/{datapoint['entity_id']}/attrs?type={datapoint['entity_type']}&options=keyValues",
json=payload,
headers={
"fiware-service": service,
Expand Down

0 comments on commit 0db565a

Please sign in to comment.