Skip to content

Commit

Permalink
Required changes after rebase
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Hotze <[email protected]>
  • Loading branch information
florian-h05 committed Jan 19, 2025
1 parent 3821941 commit 25aa852
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,10 @@ ScheduleType.CHARGE_MIN, new TimeTableRecord(from.format(TIME_FORMATTER), until.
* @param percent the reserved battery capacity for backup power
* @throws FroniusCommunicationException when an error occurs during communication with the inverter
* @throws IllegalArgumentException if the percent is not in [10,95]
* @throws FroniusUnauthorizedException when the login failed due to invalid credentials
*/
public void setBackupReservedCapacity(PercentType percent) throws FroniusCommunicationException {
public void setBackupReservedCapacity(PercentType percent)
throws FroniusCommunicationException, FroniusUnauthorizedException {
if (percent.intValue() < 10 || percent.intValue() > 95) {
throw new IllegalArgumentException("invalid percent value: " + percent + " (must be in [10,95])");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ public boolean setBackupReservedBatteryCapacity(PercentType percent) {
return true;
} catch (FroniusCommunicationException e) {
logger.warn("Failed to set backup reserved battery capacity", e);
} catch (FroniusUnauthorizedException e) {
logger.warn("Failed to set backup reserved battery capacity: Invalid username or password");
}
}
return false;
Expand Down

0 comments on commit 25aa852

Please sign in to comment.