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

Add export meter support #8

Merged
merged 2 commits into from
May 18, 2024
Merged

Add export meter support #8

merged 2 commits into from
May 18, 2024

Conversation

DragonQ
Copy link

@DragonQ DragonQ commented May 13, 2024

With this change, "usage" and "cost" for export meters & tariffs are stored as negative values, which makes the default Grafana dashboard show correct "net" figures (e.g. 10 kWh import @ 10p/kWh and 5 kWh export @ 5p/kWh is shown as 5 kWh "total electricity used" and 75p "total cost" (assuming no standing charge in this example).

Copy link
Owner

@Yanson Yanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for this contribution. It looks like a very straightforward change, so I'm happy to merge it if you are ready.

points = []
net_modifier = 1.0
if export_meter:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might have condensed this to one line as such:

net_modifier = -1.0 if export_meter else 1.0

@DragonQ
Copy link
Author

DragonQ commented May 16, 2024

I'm guessing the flow failure is a transient issue unrelated to the change?

@Yanson
Copy link
Owner

Yanson commented May 17, 2024

I'm guessing the flow failure is a transient issue unrelated to the change?

I think it's a credentials issue. Might be related to building from a fork.

Happy to merge and see on main if you are.

@DragonQ
Copy link
Author

DragonQ commented May 17, 2024

I'm guessing the flow failure is a transient issue unrelated to the change?

I think it's a credentials issue. Might be related to building from a fork.

Happy to merge and see on main if you are.

Yes, happy to merge. I have a bugfix and big feature update for a future PR also, the latter will require some reviewing though as it's fairly complex.

@Yanson Yanson merged commit 6ac8f1b into Yanson:main May 18, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants