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

[enhancement] Find next low point #18

Closed
dala318 opened this issue Sep 23, 2022 · 1 comment
Closed

[enhancement] Find next low point #18

dala318 opened this issue Sep 23, 2022 · 1 comment
Labels
question Further information is requested

Comments

@dala318
Copy link

dala318 commented Sep 23, 2022

Are no good message function in GitHub so writing this as a ticket for now, feel free to close it at any time.

I was looking for how to find a way to plan electricity usage in the future by nordpool_diff but failed in the HA templates and scripts.
But thought it would be easier to do it in native python inside the integration with all the raw data available.
Started by forking your repo but soon realized it became an integration of it's own.

Hope you don't mind me making a rather new integration from your work, I did put a disclaimer in the readme.md top to your integration but let me know if you disapprove.

It's still seem to be some bugs in the code to resolve but it do seem to work (sometimes)
If you like to, have a look at it https://github.com/dala318/nordpool_planner and if you find it useful feel free to include in nordpool_diff (or contribute in mine).

@jpulakka
Copy link
Owner

jpulakka commented Sep 23, 2022

Fine by me to chat here, this is much better than Discourse or whatever they use in forums nowadays :D

I was looking for how to find a way to plan electricity usage in the future by nordpool_diff but failed in the HA templates and scripts.
But thought it would be easier to do it in native python inside the integration with all the raw data available.

This is exactly how nordpool_diff started; what it does is relatively simple, but expressing that in Jinja templates felt super complicated. After figuring out all the needed boilerplate to set up SensorEntity, the rest has been easy.

Hope you don't mind me making a rather new integration from your work, I did put a disclaimer in the readme.md top to your integration but let me know if you disapprove.

No problem, https://github.com/jpulakka/nordpool_diff/blob/main/LICENSE is MIT so basically do whatever you want as long as you keep the copyright & permission notice.

It's still seem to be some bugs in the code to resolve but it do seem to work (sometimes)
If you like to, have a look at it https://github.com/dala318/nordpool_planner and if you find it useful feel free to include in nordpool_diff (or contribute in mine).

I had a quick look and I think the idea Given a time-span from now and an number of hours forward it searches for the start-time that has the lowest average price over a specified duration window is clear enough. It solves the problem that nordpool_diff currently doesn't solve - that its output is not directly suitable for controlling things that require X contiguous hours to work, such as washing machines.

It may be somewhat tricky to port the changes to nordpool_diff because you have renamed a lot of things and even changed the entity type to BinarySensorEntity. But that's also good, because now it's possible for anyone to use both nordpool_diff and nordpool_planner simultaneously.

Cheers!

@jpulakka jpulakka added the question Further information is requested label Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants