-
Notifications
You must be signed in to change notification settings - Fork 107
Update time and scheduled charging plans for new topic structure (Koala theme) #2480
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
Update time and scheduled charging plans for new topic structure (Koala theme) #2480
Conversation
1d913e5 to
8da6e31
Compare
| const plans = vehicleScheduledChargingPlans.value(chargePointId); | ||
| const plan = plans.find((p) => p.id === planId); | ||
| return plan?.phases_to_use_pv; | ||
| }, | ||
| set(newValue: number) { | ||
| const baseTopic = `openWB/chargepoint/${chargePointId}/set/charge_template/chargemode/scheduled_charging/plans/${planId}`; | ||
| updateTopic(baseTopic, newValue, 'phases_to_use_pv', true); | ||
| const plans = vehicleScheduledChargingPlans.value(chargePointId); | ||
| const planIndex = plans.findIndex((plan) => plan.id === planId); | ||
| if (planIndex === -1) return; | ||
| const objectPath = `chargemode.scheduled_charging.plans.${planIndex}.phases_to_use_pv`; | ||
| updateTopic( | ||
| `openWB/chargepoint/${chargePointId}/set/charge_template`, | ||
| newValue, | ||
| objectPath, | ||
| true, | ||
| ); |
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.
Hier wird mehrfach der gleiche Code ausgeführt. Kann man das in eine Methode zusammen fassen?
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.
Hilfsfunktion hinzugefügt, um wiederholten Code zu vermeiden.
8da6e31 to
25cbd10
Compare
|
SoC-Symbole entfernt, wenn die Energiemenge im Ladeplan aktiv ist. |
Kannst Du das bitte in einen eigenen PR packen? Das hat inhaltlich nichts mit der Umstrukturierung der Pläne zu tun und muss auch nicht in den Feature-Branch, sondern kann direkt in den Master. |
17d9168 to
8e39264
Compare
|
Commit SoC-Symbole entfernt |
8e39264 to
4755868
Compare
139af9b
into
openWB:feature-integrated-charging-plans
* cards display: switch to integrated plans * standard-legacy: switch to integrated plans * backend * fixes * standard legacy: switch to plan lists * cards display: switch to plan lists * plans as list * autolock update config * fixes, remove subdata workaround * fixes * fixes, pytest * fixes * fixes * fix copying auto lock plan * fix initial once timestamp, fix max ids * add missing ids in templates * fix * fix once * fix once * fix pytest * Colors theme: adapt to integrated charging plans (#2495) * adapt to integrated charging plans * align time charging information to new temporary template * fix pricechart axis * Update time and scheduled charging plans for new topic structure (#2480) * fix no plans * build UI * fix update config --------- Co-authored-by: Lutz Bender <github@lutz-bender.de> Co-authored-by: cshagen <cshagen@hagens.ch> Co-authored-by: BrettS <168732306+Brett-S-OWB@users.noreply.github.com>
No description provided.