-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Feature Request: Fixed Pricing Based on Day of Week #51
Comments
Hello! Is this quite a common thing to have it vary across different days of the week? I've heard of it varying across the year before e.g. summer and winter pricing but not really across a week before. If you have Home Assistant I'd recommend using that to set your prices as dynamically as you like, details in the readme of how to do that. If not, I could try to add something for this but I'm not sure when I'll be able to get around to it. Contributions welcome of course! |
It does seem to be fairly common, at least in the mountain west states. The
pricing also varies across the year (summer vs winter) similar to what
you’ve mentioned, so I have a reminder to adjust the config when those
hours adjust.
The full day on the weekend is always in the lower tier pricing.
I don’t have Home Assistant currently, but maybe it’s time to check that
out.
…On Sat, Feb 10, 2024 at 8:31 AM Matt Jeanes ***@***.***> wrote:
Hello! Is this quite a common thing to have it vary across different days
of the week? I've heard of it varying across the year before e.g. summer
and winter pricing but not really across a week before.
If you have Home Assistant I'd recommend using that to set your prices as
dynamically as you like, details in the readme of how to do that. If not, I
could try to add something for this but I'm not sure when I'll be able to
get around to it. Contributions welcome of course!
—
Reply to this email directly, view it on GitHub
<#51 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACFNWXTQA5TDLV6HSYKPGX3YS6HDPAVCNFSM6AAAAABDCQNROCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZXGA2DINJSG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Here in Spain we also have diferent plans for weekdays and weekends: Monday - Friday 00:00-08:00 low tier Saturday - Sunday 00:00 - 23:59 low tier |
Hey @jakest / @jfg31113 - I have made a first version of this and I would love if you could help me test it. I've just released test version v1.17.0-rc.1 which contains a new I have tested various different scenarios but I can't promise that it'll work perfectly, so I invite you to give it a go and try and break it, and most importantly let me know what you think! See the documentation for how to configure the new provider. |
Thanks for the update! Updating and testing now.
|
@MattJeanes I'm getting the following log error with the following config.
I've tried EDIT: Looks like whatever I do, it thinks there's a gap between Price 4 and Price 5 going from Friday - Saturday. |
Ah I see, make sure you are using the new |
Oh, and all of the settings should be prefixed with - TeslaMate__EnergyProvider=FixedPriceWeekly
- FixedPriceWeekly__TimeZone=America/Denver
- FixedPriceWeekly__Prices__0=Mon-Fri=00:00-08:00=0.052004
- FixedPriceWeekly__Prices__1=Mon-Fri=08:00-10:00=0.253532
- FixedPriceWeekly__Prices__2=Mon-Fri=10:00-15:00=0.052004
- FixedPriceWeekly__Prices__3=Mon-Fri=15:00-20:00=0.253532
- FixedPriceWeekly__Prices__4=Mon-Fri=20:00-00:00=0.052004
- FixedPriceWeekly__Prices__5=Sat,Sun=0.052004 Apologies I needed to make it a brand new provider rather than extending the existing one hence the changes. |
EDIT: Still failing with the following.
Looks like I'm getting a new error now that is preventing the container from starting with this config.
|
Ah I didn't notice from your previous config but you will need to explicitly use the preview version as
|
I totally missed that, my fault. Was going to look at the SHA hash, then got busy with work. Looks like we had our first run! Looks like I only have one error now.
It failed on the latest charge for some reason. Feels like we're so close. |
Actually, I just deleted a few more costs to see if it would update any of them. It looks like it's failing to update any entries that don't have a cost associated yet. |
Thanks, looking into that now - I can reproduce the error locally. It's erroring as part of a self-check in the internal part of the code, nothing wrong on your side this time! |
Okay, fixed! Looks like if your one of your time ranges crosses over exactly midnight it breaks! Please try the new version v1.17.0-rc.2 which resolves this problem. image: mattjeanes/teslamateagile:v1.17.0-rc.2 |
Look at that! The one I didn't have a price for succeeded. The one I deleted the pricing information for manually is still failing, but since I only deleted it to test, it's likely not an edge case worth fixing. But just in case, here are the logs for that one.
By the way, do you have a way to accept donations? I really appreciate your help with this! |
Thank you, that is another useful test case too. Apologies, this new provider is rather complex in it's logic so trying to squash as many bugs as I can in it before releasing it to everyone. I can reproduce this issue as well, investigating now! |
Okay, fixed that problem too. That one was caused by the timezone jumping into the previous day (relative to UTC) and not correctly retrieving the prices for the previous date. I love timezones 😁 The new version v1.17.0-rc.3 should fix this problem! image: mattjeanes/teslamateagile:v1.17.0-rc.3 As for donations, I've also just set up GitHub Sponsors if you want to contribute anything! I don't ask for donations and I do this work for free to give back to the community, but if you did want to I would appreciate your support a lot 😊 You can access GitHub Sponsors on the TeslaMateAgile repository main page or on my GitHub profile page, there should be a 'Sponsor' button there now. |
I didn't even consider that. Good find! That resolved the issue. I'll let you know if I see anything else over the next few weeks. Thanks again for adding this! |
Awesome, yes please keep me posted if anything is acting weird or erroring I would love to hear about it. Keep in mind that even if it works there's a chance the calculated cost might be wrong if my calculations are wrong, which is definitely a possibility 👀 so if anything looks weird or doesn't seem to add up please shout! You're welcome, and thank you also for helping me test it, real world test scenarios are so much more useful than my fake ones I made for testing which already missed a couple of real issues as we found out 😁 I've also just seen your donation, thank you very much!! It means a lot that you value my work enough to do that ❤️ |
Hey @jakest - how's it been going? All good still or seeing any issues? |
It has been working perfectly! Thanks for checking in. I’ve had charges during peak, off peak, on every day, and some that cross over. I think every edge case is covered now.
Thanks!
|
Awesome! Thank you for testing that out - let me know if you spot anything in future of course! I'll keep this issue open until I push the release out properly, just waiting on some feedback on a different change in this update first 🙂 |
This has now been released in version |
My power plan is as follows:
Monday - Friday
Saturday - Sunday
When I charge during the weekend, the costs are calculated at a high tier rate if charging during one of the high tier times (only applicable on weekdays) as TeslaMateAgile can’t currently be setup with pricing tiers dependent upon the day of the week.
It would be amazing to be able to set up Fixed Pricing based on the day of the week to account for that.
The text was updated successfully, but these errors were encountered: