-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[aWattar] Add inverted best price #16877
[aWattar] Add inverted best price #16877
Conversation
fc0d235
to
fd686e8
Compare
As i understand this is what i've intended with the #16813, but in my situation i'm using both ... the "BestPrice" AND the "WorstPrice". Or can i add two BestPrice-Things at the same time? |
Yes, you can add as many as you want. |
You could now add two things, one inverted and one normal. That should solve your problem. |
There is maybe one scenario that the "inverted best price" logic could not cover: If for any reason you want to have a consecutive worst price range, this would not work, as the inverted consecutive best price range could give two ranges, one from midnight to the start of the bestprice range, the other one from the end of the bestprice range to midnight. Also an inverted WorstPrice Thing would then give two timeranges excluding the worst prices of one day. If there is really a usecase for that, then the WorstPrice thing would be needed. Is this the use case you are thinking of? |
Thanks for the review! The combination of inverted price range and the 'consecutive' flag is not implemented. Please have a look at my added docs here https://github.com/openhab/openhab-addons/pull/16877/files#diff-a36be23b36348afb82551140aebb05c720bd773cf7755c6a3a6e0cfa55da8890R48. I also added the inverted price range only to the non-consecutive code path. It's basically just a quality of life change, where I can specifically tell to, for example, not switch on the water boiler on the 10h with the highest price. It is also a request in this issue: #16813 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you very much
Can you fix the conflicts? |
Sure, but it might take me unfortunately until Wednesday. |
a3108f7
to
750cd4b
Compare
Signed-off-by: Thomas Leber <[email protected]>
750cd4b
to
e72d9b4
Compare
Signed-off-by: Thomas Leber <[email protected]>
Signed-off-by: Thomas Leber <[email protected]> Signed-off-by: Patrik Gfeller <[email protected]>
Signed-off-by: Thomas Leber <[email protected]>
Signed-off-by: Thomas Leber <[email protected]>
The goal is to add an inverted best price to the aWattar add-on.
If you set the ìnverted` flag via configuration it will return the inverted result of a best price.
So if you set for example 4h and inverted, the four hours with the highest price will be selected.
Does currently not work with the
consectuive
flag.