The pair.get("pv", "0") ensures that if pv is missing, it defaults to "0"
The try block attempts to convert pv to a float and adds it to the aggregation. If the conversion fails, it prints a message and skips the invalid value
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Got an error: "Could not convert string to float"
Issue #, if available:
Description of changes:
The pair.get("pv", "0") ensures that if pv is missing, it defaults to "0"
The try block attempts to convert pv to a float and adds it to the aggregation. If the conversion fails, it prints a message and skips the invalid value
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.