|
|
|
@ -313,7 +313,7 @@ func startCharge(m chat1.MsgSummary) {
@@ -313,7 +313,7 @@ func startCharge(m chat1.MsgSummary) {
|
|
|
|
|
log.LogError("%+v: %+v", tracker, err) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if state.ChargingState != "Disconnected" { |
|
|
|
|
if state.ChargingState != "Disconnected" && state.FastChargerBrand != "Tesla" { |
|
|
|
|
err := v.StartCharging() |
|
|
|
|
if err != nil { |
|
|
|
|
tracker := uuid.NewString() |
|
|
|
@ -322,7 +322,7 @@ func startCharge(m chat1.MsgSummary) {
@@ -322,7 +322,7 @@ func startCharge(m chat1.MsgSummary) {
|
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
k.SendMessageByConvID(m.ConvID, "You must plug in first, to be able to charge.") |
|
|
|
|
k.SendMessageByConvID(m.ConvID, "You must plug in to an L1/L2 charger to use this command.") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -339,7 +339,7 @@ func stopCharge(m chat1.MsgSummary) {
@@ -339,7 +339,7 @@ func stopCharge(m chat1.MsgSummary) {
|
|
|
|
|
log.LogError("%+v: %+v", tracker, err) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if state.ChargingState != "Disconnected" { |
|
|
|
|
if state.ChargingState != "Disconnected" && state.FastChargerBrand != "Tesla" { |
|
|
|
|
err := v.StopCharging() |
|
|
|
|
if err != nil { |
|
|
|
|
tracker := uuid.NewString() |
|
|
|
@ -348,7 +348,7 @@ func stopCharge(m chat1.MsgSummary) {
@@ -348,7 +348,7 @@ func stopCharge(m chat1.MsgSummary) {
|
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
k.SendMessageByConvID(m.ConvID, "You must plug in first, to be able to stop charging.") |
|
|
|
|
k.SendMessageByConvID(m.ConvID, "You must plug in to an L1/L2 charger to use this command.") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|