Skip to content

Commit

Permalink
Release 4.8.1 - Don't always retreive consumption
Browse files Browse the repository at this point in the history
  • Loading branch information
BJReplay committed Mar 27, 2022
1 parent 13f3d2a commit 99facf2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions PowerwallService/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("4.8.0.0")>
<Assembly: AssemblyFileVersion("4.8.0.0")>
<Assembly: AssemblyVersion("4.8.1.0")>
<Assembly: AssemblyFileVersion("4.8.1.0")>
6 changes: 4 additions & 2 deletions PowerwallService/PowerwallService.vb
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,10 @@ Public Class PowerwallService
Private Sub GetPeakConsumption()
PeakConsumption = 0
Try
PeakConsumption = CInt(SPs.fnGetMonthlyPeakLoad(PeakStartHour:=PeakStartHour, PeakEndHour:=(OffPeakStartHour - 1)))
EventLog.WriteEntry(String.Format("Peak Consumption Set To: {0}", PeakConsumption), EventLogEntryType.Information, 803)
If My.Settings.PWPeakConsumptionUseHistory Then
PeakConsumption = CInt(SPs.fnGetMonthlyPeakLoad(PeakStartHour:=PeakStartHour, PeakEndHour:=(OffPeakStartHour - 1)))
EventLog.WriteEntry(String.Format("Peak Consumption Set To: {0}", PeakConsumption), EventLogEntryType.Information, 803)
End If
Catch ex As Exception
EventLog.WriteEntry(String.Format("Failed to get Peak Consumption: Exception: {0}, Stack Trace: {1}", ex.Message, ex.StackTrace), EventLogEntryType.Error, 804)
End Try
Expand Down

0 comments on commit 99facf2

Please sign in to comment.