feat: Implement adhoc charging - #47
Conversation
Adhoc-charging allows a special "one-off" charge. Blackout period is still enforced. Adhoc is designed for people who mostly charge with solar, but need an extra boost from time-to-time. A cost estimate will be displayed. This is calculated from your electricity tariffs that you have configured.
|
Hey @mukaibot, Thats a cool feature. I think its pretty useful. I think the direction I would want is that the button on the card takes you to the schedules page, where you can make one there in the same way you currently do. I'm concerned with lots of different flows around the app and keeping things manageable and tight. I dont really use modals on purpose in this app where I don't need to. I think the language I'm working on 1 large piece of work thats finished now - OCPP support - and a couple of smaller pieces. This would have to be rebased on top of that work after those are merged. The OCPP support changes majorly overhaul the way cards work on the dashboard. Lastly, 53 touched files seems pretty massive for this feature. Have you reviewed every file before pushing this PR? I think if we were to reuse the current scheduling UI with some tweaks for this feature it would be a much smaller change set. |
|
Could you also lay out in words how things work
|
Will automatically charge the car when grid tariff is free. Home battery priority is still respected.
hey @startswithaj I don't know if you will want to accept this PR, but I've been finding it useful as it's currently winter where I live and I need to do the odd grid-assisted boost as there is not enough sun! This is exactly how I would have loved ChargeHQ to work, but now we have ChargeHA, I can finally implement the behaviour I want! Screenshots are a mix of my own instance and dev mode.
The feature starts with a new "adhoc" button on the vehicle card:

Clicking this pops up a modal that allows you to schedule a "one-off" charge. The blackout period, if overlapping, is still enforced. A cost estimate will also be displayed. This is calculated from your electricity tariffs that you have configured.
Adhoc is designed for people who mostly charge with solar, but need an extra boost from time-to-time, and don't want to muck around with creating and maintaining schedules for the odd charge here and there.
If you want to cancel the charge, it will appear in the Schedules tab as a one-off.

I used Claude 100% in this PR. If you'd like to accept it but have requests for changes, please let me know and I'm happy to make them.