Skip to content
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

Downrange ratio between 0-1 for self consumption and autonomy metrics #31

Merged
merged 2 commits into from
Jun 11, 2021

Conversation

ccremer
Copy link
Owner

@ccremer ccremer commented Jun 11, 2021

Summary

Downranges the percentages from Symo API (0-100) to 0-1 as Prometheus convention expects.
Also, in case the photovoltaic power is zero, the device API returns null, which doesn't make sense.

Checklist

  • Keep pull requests small so they can be easily reviewed.
  • Categorize the PR by setting a good title and adding one of the labels:
    fix, enhancement, documentation, change, breaking, dependency
    as they show up in the changelog

@ccremer ccremer added the bug Something isn't working label Jun 11, 2021
@ccremer ccremer changed the title Fix self consumption rate in metrics Fix self consumption rate being zero when photovoltaic is also zero in metrics Jun 11, 2021
While the Symo API returns percentage ranging from 0-100,
prometheus convention expects percentages in range of 0-1

Additionally sets the ratio 1 in case the photovoltaic power is zero
(the Symo API returns null in that case, which doesn't make sense)
@ccremer ccremer changed the title Fix self consumption rate being zero when photovoltaic is also zero in metrics Downrange ratio between 0-1 for self consumption and autonomy Jun 11, 2021
@ccremer ccremer changed the title Downrange ratio between 0-1 for self consumption and autonomy Downrange ratio between 0-1 for self consumption and autonomy metrics Jun 11, 2021
@ccremer ccremer added breaking A breaking change for the user and removed bug Something isn't working labels Jun 11, 2021
@ccremer ccremer merged commit e96e9ae into master Jun 11, 2021
@ccremer ccremer deleted the metrics branch June 11, 2021 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking A breaking change for the user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant