Rename the fields to be consistent. I guess the desired name is grid connection point as it is more specific and introduced in newer versions of the API, so:
Rename COMPONENT_CATEGORY_GRID to COMPONENT_CATEGORY_GRID_CONNECTION_POINT.
In particular the inconsistency between ComponentCategoryMetadataVariant.metadata and COMPONENT_CATEGORY_XXX makes it hard to do sanity checks to make sure the declared category and attached metadata category matches in a programatic way.
What's needed?
All component categories match the name of the message that carries category-specific metadata.
COMPONENT_CATEGORY_BATTERY
->message Battery
->ComponentCategoryMetadataVariant.metadata.battery
, except for the grid:COMPONENT_CATEGORY_GRID
->message GridConnectionPoint
->ComponentCategoryMetadataVariant.metadata.grid
.Proposed solution
Rename the fields to be consistent. I guess the desired name is grid connection point as it is more specific and introduced in newer versions of the API, so:
COMPONENT_CATEGORY_GRID
toCOMPONENT_CATEGORY_GRID_CONNECTION_POINT
.ComponentCategoryMetadataVariant.metadata.grid
->ComponentCategoryMetadataVariant.metadata.grid_connection_point
Use cases
In particular the inconsistency between
ComponentCategoryMetadataVariant.metadata
andCOMPONENT_CATEGORY_XXX
makes it hard to do sanity checks to make sure the declared category and attached metadata category matches in a programatic way.