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

Estimated price is zero rather than None #1

Closed
Bre77 opened this issue Aug 26, 2024 · 1 comment
Closed

Estimated price is zero rather than None #1

Bre77 opened this issue Aug 26, 2024 · 1 comment

Comments

@Bre77
Copy link
Contributor

Bre77 commented Aug 26, 2024

When the library cannot calculate an average it returns 0, but this causes issues for Home Assistant because 0 is a valid price.

I believe this should return None instead. Home Assistant handles this as unknown, and it won’t get confused with an actual zero price.

current_30min_avg = 0

@Bre77 Bre77 changed the title Estimated price is zero rather than nill Estimated price is zero rather than None Aug 26, 2024
@cabberley
Copy link
Owner

Thanks, have merged it and will push through new releases for the Python module and HA Integration shortly!

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

No branches or pull requests

5 participants
@Bre77 @cabberley and others