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

Feature: repeating plans #685

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions docs/features/plans.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,31 @@ Mit dem "Aktiv"-Schalter aktivierst du deinen Plan.
caption="Screenshot einer Ladeplanung mittels Ladestand"
/>

## Wiederholende Pläne

Zusätzlich kannst du auch wiederholende Pläne anlegen.
Definiere, an welchen **Wochentagen** der Plan gelten soll.
Sind mehrere Pläne aktiv, wird immer der nächste passende Zeitpunkt verwendet und die Planung im Diagramm dargestellt.

<Screenshot
name="features/screenshots/plan-soc-repeating"
caption="Screenshot einer wiederholenden Ladeplanung"
/>

:::note Hinweis
Diese Ladestand-basierten Pläne werden pro Fahrzeug gespeichert.
Das heißt, du kannst [mehrere Fahrzeuge](./vehicle#mehrere-fahrzeuge) an derselben Wallbox laden.
Es wird immer die Planung des aktuell verbundenen Fahrzeugs verwendet.
:::

## Plan nach Energiemenge

Sind Ladestand und Kapazität nicht bekannt, wird über die Angabe einer **Energiemenge in kWh** geplant.

<Screenshot
name="features/screenshots/plan-energy"
caption="Screenshot einer Ladeplanung mittels Energiemenge"
/>

Das Ladeziel wird gespeichert.
Steckst du dein Fahrzeug vor Erreichen des Ziels ab und steckst es später wieder an, wird der Plan fortgesetzt.

Aktuell ist die Planung auf einen Eintrag beschränkt.
In einem späteren Release wird es möglich sein, mehrere Pläne zu setzen und Wiederholungen zu definieren.
Dieser Plan gilt nur für den aktuellen Ladevorgang.
In diesem Modus sind die wiederholenden Pläne nicht verfügbar.
Binary file modified docs/features/screenshots/plan-energy-dark-1x.webp
Binary file not shown.
Binary file modified docs/features/screenshots/plan-energy-dark-2x.webp
Binary file not shown.
Binary file modified docs/features/screenshots/plan-energy-light-1x.webp
Binary file not shown.
Binary file modified docs/features/screenshots/plan-energy-light-2x.webp
Binary file not shown.
Binary file modified docs/features/screenshots/plan-soc-dark-1x.webp
Binary file not shown.
Binary file modified docs/features/screenshots/plan-soc-dark-2x.webp
Binary file not shown.
Binary file modified docs/features/screenshots/plan-soc-light-1x.webp
Binary file not shown.
Binary file modified docs/features/screenshots/plan-soc-light-2x.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
30 changes: 23 additions & 7 deletions i18n/en/docusaurus-plugin-content-docs/current/features/plans.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,31 @@ Use the "Active" switch to activate your plan.
caption="Screenshot of a charging plan using the charging status"
/>

If the charge level and capacity are not known, planning is done by specifying an **energy quantity in kWh**.
## Repeating plans

You can also create repeating plans.
Define on which **weekdays** the plan should be active.
When multiple plans are active, the next matching time will be used and the plan prognosis will be shown in the diagram.

<Screenshot
name="features/screenshots/plan-energy"
caption="Screenshot of a charging plan using energy quantity"
name="features/screenshots/plan-soc-repeating"
caption="Screenshot of a recurring charging plan"
/>

The charging goal is saved.
If you unplug your vehicle before reaching the goal and plug it back in later, the plan will continue.
:::note Note
These state-of-charge based plans are stored per vehicle.
This means you can charge [multiple vehicles](./vehicle#multiple-vehicles) at the same charging point.
The planning of the currently connected vehicle will always be used.
:::

## Energy amount plan

If the charge level and capacity are not known, planning is done by specifying an **energy amount in kWh**.

<Screenshot
name="features/screenshots/plan-energy"
caption="Screenshot of a charging plan using energy amount"
/>

Currently, planning is limited to one entry.
In a later release, it will be possible to set multiple plans and define repetitions.
This plan only applies to the current charging session.
Repeating plans are not available in this mode.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 5 additions & 1 deletion screenshot-generator/playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ module.exports = defineConfig({
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"], deviceScaleFactor: 2 },
use: {
...devices["Desktop Chrome"],
deviceScaleFactor: 2,
viewport: { width: 1280, height: 1600 },
},
},
],
});
28 changes: 21 additions & 7 deletions screenshot-generator/recipes/plan.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { test, expect } = require("@playwright/test");
import { loop } from "./utils/loop";
import { CURSOR, ARROW, placeOverlay } from "./utils/overlay";
import { CURSOR, placeOverlay, removeOverlays } from "./utils/overlay";
const { start, stop } = require("./utils/evcc");

const BASE_PATH = "features/screenshots";
Expand All @@ -19,9 +19,9 @@ loop((screenshot) => {
await page.goto(`/`);
await page.locator("[data-testid=charging-plan] button").first().click();
await wait(300);
await page.getByTestId("plan-soc").selectOption("90");
await page.getByTestId("plan-active").click();
await placeOverlay(page, "#chargingplan-1_0-goal", CURSOR, 60, 5);
await page.getByTestId("static-plan-soc").selectOption("90");
await page.getByTestId("static-plan-active").click();
await placeOverlay(page, "#chargingplan-lp1-1-goal", CURSOR, 60, 5);
await screenshot(
page,
`${BASE_PATH}/plan-soc`,
Expand All @@ -30,6 +30,20 @@ loop((screenshot) => {
all: 20,
},
);
await removeOverlays(page);
await page.getByTestId("static-plan-active").click();
await page.getByTestId("repeating-plan-add").click();
await page.getByTestId("repeating-plan-soc").selectOption("40");
await page.getByTestId("repeating-plan-active").click();
await placeOverlay(page, "#chargingplan-lp1-2-weekdays", CURSOR, 0, 5);
await screenshot(
page,
`${BASE_PATH}/plan-soc-repeating`,
"#chargingPlanModal_1 .modal-content",
{
all: 20,
},
);
});

test("charging plan energy", async ({ page }) => {
Expand All @@ -41,9 +55,9 @@ loop((screenshot) => {

await page.locator("[data-testid=charging-plan] button").first().click();
await wait(300);
await page.getByTestId("plan-energy").selectOption("20");
await page.getByTestId("plan-active").click();
await placeOverlay(page, "#chargingplan-1_0-goal", CURSOR, 60, 5);
await page.getByTestId("static-plan-energy").selectOption("20");
await page.getByTestId("static-plan-active").click();
await placeOverlay(page, "#chargingplan-lp1-1-goal", CURSOR, 60, 5);
await screenshot(
page,
`${BASE_PATH}/plan-energy`,
Expand Down
Loading