Skip to content
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
7 changes: 6 additions & 1 deletion simpleAPI/simpleAPI_mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,12 @@ def _set_chargemode(self, chargepoint_id: str, mode: str):
'pv': 'pv_charging',
'eco': 'eco_charging',
'stop': 'stop',
'target': 'scheduled_charging'
'target': 'scheduled_charging',
# Support full names directly
'instant_charging': 'instant_charging',
'pv_charging': 'pv_charging',
'eco_charging': 'eco_charging',
'scheduled_charging': 'scheduled_charging'
}

if mode not in mode_mapping:
Expand Down
9 changes: 7 additions & 2 deletions simpleAPI/src/ParameterHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -772,13 +772,18 @@ private function getCounter($id)
*/
private function setChargemode($chargepointId, $mode)
{
// Gültige Modi mapping
// Gültige Modi mapping (sowohl kurze als auch vollständige Namen)
$validModes = [
'instant' => 'instant_charging',
'pv' => 'pv_charging',
'eco' => 'eco_charging',
'stop' => 'stop',
'target' => 'scheduled_charging'
'target' => 'scheduled_charging',
// Vollständige Namen direkt unterstützen
'instant_charging' => 'instant_charging',
'pv_charging' => 'pv_charging',
'eco_charging' => 'eco_charging',
'scheduled_charging' => 'scheduled_charging'
];

if (!isset($validModes[$mode])) {
Expand Down