-
Notifications
You must be signed in to change notification settings - Fork 3
Feat/new assets api fields #156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…em in a resuable way Signed-off-by: Nicolas Höning <nicolas@seita.nl>
Signed-off-by: Nicolas Höning <nicolas@seita.nl>
…week Signed-off-by: Nicolas Höning <nicolas@seita.nl>
Flix6x
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A preliminary unprompted review. 😁
|
I am currently battling the tests, probably need to bring some mock in place correctly. |
Signed-off-by: Nicolas Höning <nicolas@seita.nl>
|
I can easily fix that for you. |
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Thanks!! |
…flexmeasures-client into feat/new-assets-api-fields
…ors() so it returns the root asset, then use that for asset lookup Signed-off-by: Nicolas Höning <nicolas@seita.nl>
|
Just noticing this PR partly duplicates changes in https://github.com/FlexMeasures/flexmeasures-client/pull/148/changes. It's good that the work done on |
I don't believe these changes would cause real problems, but I will reverse them if you want. |
Signed-off-by: Nicolas Höning <nicolas@seita.nl>
Flix6x
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be my preference, yes.
|
Oh, you mean everything under examples/HEMS, also the usage of the building asset for querying? |
…and_sensors() so it returns the root asset, then use that for asset lookup" This reverts commit ce4d618.
|
Done. There is only one change left in the HEMS folder, which I would like to keep: instead of just calling If you don't object, I'll merge it later on. |
FlexMeasures/flexmeasures#1885 made the /assets endpoint more powerful in selecting subtrees of assets and saving bandwidth.
This PR supports that in the client.
Also, it implements that the client keeps knowledge of the server version, so it can look it up for handling such cases - if the new fields are being used against an older server version than v0.31, they will not be applied but a warning is printed.
I tested this with the HEMS example (in the server, I turned
FLEXMEASURES_API_SUNSET_ACTIVE=True). I found one place where I needed to use the newfieldsparameter, and I used theroot` parameter, as well (the root asset is the building asset).