Skip to content

Commit

Permalink
fix(sensor): removes resolution from fetch one response to only retur… (
Browse files Browse the repository at this point in the history
#779)

* fix(sensor): removes resolution from fetch one response to only return event_resolution

Signed-off-by: GustaafL <guus@seita.nl>

* docs(sensor): correct example response in docstring fetch_one

Signed-off-by: GustaafL <guus@seita.nl>

---------

Signed-off-by: GustaafL <guus@seita.nl>
  • Loading branch information
GustaafL committed Aug 1, 2023
1 parent d25deb2 commit 029e2a8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions flexmeasures/api/v3_0/sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ def fetch_one(self, id, sensor):
"name": "some gas sensor",
"unit": "m³/h",
"entity_address": "ea1.2023-08.localhost:fm1.1",
"event_resolution": 10,
"event_resolution": "PT10M",
"generic_asset_id": 4,
"timezone": "UTC",
}
Expand All @@ -531,7 +531,6 @@ def fetch_one(self, id, sensor):
:status 422: UNPROCESSABLE_ENTITY
"""

sensor.resolution = sensor.event_resolution
return sensor_schema.dump(sensor), 200

@route("", methods=["POST"])
Expand Down

0 comments on commit 029e2a8

Please sign in to comment.