Skip to content

Commit

Permalink
Merge branch 'master' into chore/validvalues
Browse files Browse the repository at this point in the history
  • Loading branch information
naltatis committed Dec 24, 2024
2 parents e3ed2cf + 11779a6 commit 172ddf6
Show file tree
Hide file tree
Showing 140 changed files with 2,211 additions and 615 deletions.
6 changes: 5 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"moby": true,
"installDockerBuildx": true,
"installDockerComposeSwitch": true,
"version": "latest",
"dockerDashComposeVersion": "v2"
},
"ghcr.io/devcontainers/features/node:1": {
"nodeGypDependencies": true,
"installYarnUsingApt": true,
"version": "latest",
"version": "lts",
"pnpmVersion": "latest",
"nvmVersion": "latest"
},
"ghcr.io/devcontainers/features/go:1": {
"version": "latest"
}
},
"postCreateCommand": "make install-ui && make install",
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,6 @@ jobs:
- name: Build Go
run: make build

- uses: actions/cache@v4
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('**/package-lock.json') }}

- name: Install playwright
run: npx playwright install --with-deps chromium

- name: Run tests
run: npx playwright test

Expand Down
1 change: 1 addition & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export default {
printWidth: 100,
trailingComma: "es5",
plugins: ["prettier-plugin-sh"],
};
21 changes: 0 additions & 21 deletions assets/js/components/ChargingPlan.story.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,6 @@ const hoursFromNow = function (hours) {
<Variant title="target charge">
<ChargingPlan id="1" :targetTime="hoursFromNow(14)" />
</Variant>
<Variant title="price EUR limit">
<ChargingPlan
id="1"
:smartCostLimit="0.13"
smartCostType="price"
currency="EUR"
:tariffGrid="0.3"
/>
</Variant>
<Variant title="price SEK limit">
<ChargingPlan
id="1"
:smartCostLimit="0.43"
smartCostType="price"
currency="SEK"
:tariffGrid="0.32"
/>
</Variant>
<Variant title="co2 limit">
<ChargingPlan id="1" :smartCostLimit="400" smartCostType="co2" :tariffCo2="623" />
</Variant>
<Variant title="min soc">
<ChargingPlan id="1" :minSoc="30" :vehicleSoc="25" />
</Variant>
Expand Down
1 change: 0 additions & 1 deletion assets/js/components/ChargingPlan.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ export default {
planTimeUnreachable: Boolean,
planOverrun: Number,
rangePerSoc: Number,
smartCostLimit: Number,
smartCostType: String,
socBasedPlanning: Boolean,
socBasedCharging: Boolean,
Expand Down
23 changes: 0 additions & 23 deletions assets/js/components/ChargingPlanWarnings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
<span v-if="timeTooFarInTheFuture" class="d-block evcc-gray mb-1">
{{ $t("main.targetCharge.targetIsTooFarInTheFuture") }}
</span>
<span v-if="costLimitExists" class="d-block evcc-gray mb-1">
{{ $t("main.targetCharge.costLimitIgnore", { limit: costLimitText }) }}
</span>
<span v-if="notReachableInTime" class="d-block text-warning mb-1">
{{ $t("main.targetCharge.notReachableInTime", { overrun: overrunFmt }) }}
</span>
Expand All @@ -22,7 +19,6 @@
</template>

<script>
import { CO2_TYPE } from "../units";
import formatter from "../mixins/formatter";
export default {
Expand All @@ -38,9 +34,6 @@ export default {
socBasedPlanning: Boolean,
socPerKwh: Number,
rangePerSoc: Number,
smartCostLimit: Number,
smartCostType: String,
currency: String,
mode: String,
tariff: Object,
plan: Object,
Expand Down Expand Up @@ -108,22 +101,6 @@ export default {
}
return this.fmtWh(this.planEnergy * 1e3);
},
costLimitExists: function () {
return this.smartCostLimit !== null;
},
costLimitText: function () {
if (this.isCo2) {
return this.$t("main.targetCharge.co2Limit", {
co2: this.fmtCo2Short(this.smartCostLimit),
});
}
return this.$t("main.targetCharge.priceLimit", {
price: this.fmtPricePerKWh(this.smartCostLimit, this.currency, true),
});
},
isCo2() {
return this.smartCostType === CO2_TYPE;
},
},
methods: {
fmtSoc(soc) {
Expand Down
1 change: 0 additions & 1 deletion assets/js/components/ChargingPlansSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ export default {
socBasedPlanning: Boolean,
socPerKwh: Number,
rangePerSoc: Number,
smartCostLimit: Number,
smartCostType: String,
currency: String,
mode: String,
Expand Down
5 changes: 2 additions & 3 deletions assets/js/components/VehicleStatus.story.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const planProjectedEnd = getFutureTime(5, 43);
</script>

<template>
<Story title="VehicleStatus" :layout="{ type: 'grid', iframe: false, width: 420 }">
<Story title="VehicleStatus" :layout="{ type: 'grid', iframe: false, width: 320 }">
<Variant title="status: disconnected">
<VehicleStatus />
</Variant>
Expand Down Expand Up @@ -124,7 +124,6 @@ const planProjectedEnd = getFutureTime(5, 43);
<VehicleStatus
connected
enabled
charging
:smartCostLimit="500"
smartCostType="co2"
:smartCostNextStart="planProjectedStart"
Expand Down Expand Up @@ -219,7 +218,7 @@ const planProjectedEnd = getFutureTime(5, 43);
<Variant title="combination: maximal">
<VehicleStatus
connected
charging
enabled
:sessionSolarPercentage="94"
:minSoc="20"
:vehicleSoc="10"
Expand Down
11 changes: 8 additions & 3 deletions assets/js/components/VehicleStatus.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<template>
<div
class="d-flex justify-content-between gap-4 evcc-gray"
class="d-flex justify-content-between gap-3 evcc-gray align-items-start flex-wrap"
style="min-height: 24px"
data-testid="vehicle-status"
>
<div class="text-nowrap" data-testid="vehicle-status-charger">{{ chargerStatus }}</div>
<div class="d-flex flex-wrap justify-content-end gap-3">
<div class="charger-status" data-testid="vehicle-status-charger">
{{ chargerStatus }}
</div>
<div class="d-flex flex-wrap justify-content-end gap-3 flex-grow-1">
<!-- pv/phase timer -->
<div
v-if="pvTimerVisible"
Expand Down Expand Up @@ -716,6 +718,9 @@ export default {
</script>
<style scoped>
.charger-status {
padding-top: 2px;
}
.entry {
display: flex;
align-items: center;
Expand Down
8 changes: 4 additions & 4 deletions assets/js/views/Log.vue
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export default {
},
},
watch: {
selectedAreas() {
areas() {
this.updateLogs();
},
level() {
Expand Down Expand Up @@ -339,7 +339,7 @@ export default {
--opacity: 1;
opacity: var(--opacity);
animation-name: fadeIn;
animation-duration: 1s;
animation-duration: var(--transition-duration-fast);
animation-fill-mode: forwards;
animation-timing-function: ease-out;
text-indent: 1rem hanging;
Expand All @@ -361,9 +361,9 @@ export default {
color: var(--bs-danger);
}
.log-debug {
--opacity: 0.6;
--opacity: 0.7;
}
.log-trace {
--opacity: 0.4;
--opacity: 0.5;
}
</style>
2 changes: 1 addition & 1 deletion charger/abl.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func NewABLeMHFromConfig(other map[string]interface{}) (api.Charger, error) {
return NewABLeMH(cc.URI, cc.Device, cc.Comset, cc.Baudrate, cc.ID, cc.Timeout)
}

//go:generate go run ../cmd/tools/decorate.go -f decorateABLeMH -b *ABLeMH -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)"
//go:generate decorate -f decorateABLeMH -b *ABLeMH -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)"

// NewABLeMH creates ABLeMH charger
func NewABLeMH(uri, device, comset string, baudrate int, slaveID uint8, timeout time.Duration) (api.Charger, error) {
Expand Down
2 changes: 1 addition & 1 deletion charger/alfen.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func init() {
registry.AddCtx("alfen", NewAlfenFromConfig)
}

//go:generate go run ../cmd/tools/decorate.go -f decorateAlfen -b *Alfen -r api.Charger -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)"
//go:generate decorate -f decorateAlfen -b *Alfen -r api.Charger -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)"

// NewAlfenFromConfig creates a Alfen charger from generic config
func NewAlfenFromConfig(ctx context.Context, other map[string]interface{}) (api.Charger, error) {
Expand Down
2 changes: 1 addition & 1 deletion charger/amperfied.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func init() {
registry.AddCtx("amperfied", NewAmperfiedFromConfig)
}

//go:generate go run ../cmd/tools/decorate.go -f decorateAmperfied -b *Amperfied -r api.Charger -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)"
//go:generate decorate -f decorateAmperfied -b *Amperfied -r api.Charger -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)"

// NewAmperfiedFromConfig creates a Amperfied charger from generic config
func NewAmperfiedFromConfig(ctx context.Context, other map[string]interface{}) (api.Charger, error) {
Expand Down
2 changes: 1 addition & 1 deletion charger/bender.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func NewBenderCCFromConfig(other map[string]interface{}) (api.Charger, error) {
return NewBenderCC(cc.URI, cc.ID)
}

//go:generate go run ../cmd/tools/decorate.go -f decorateBenderCC -b *BenderCC -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.PhaseVoltages,Voltages,func() (float64, float64, float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.Battery,Soc,func() (float64, error)" -t "api.Identifier,Identify,func() (string, error)"
//go:generate decorate -f decorateBenderCC -b *BenderCC -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.PhaseVoltages,Voltages,func() (float64, float64, float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.Battery,Soc,func() (float64, error)" -t "api.Identifier,Identify,func() (string, error)"

// NewBenderCC creates BenderCC charger
func NewBenderCC(uri string, id uint8) (api.Charger, error) {
Expand Down
2 changes: 1 addition & 1 deletion charger/cfos.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func init() {
registry.Add("cfos", NewCfosPowerBrainFromConfig)
}

//go:generate go run ../cmd/tools/decorate.go -f decorateCfos -b *CfosPowerBrain -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.PhaseSwitcher,Phases1p3p,func(int) error"
//go:generate decorate -f decorateCfos -b *CfosPowerBrain -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.PhaseSwitcher,Phases1p3p,func(int) error"

// NewCfosPowerBrainFromConfig creates a cFos charger from generic config
func NewCfosPowerBrainFromConfig(other map[string]interface{}) (api.Charger, error) {
Expand Down
2 changes: 1 addition & 1 deletion charger/charger.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func init() {
registry.AddCtx(api.Custom, NewConfigurableFromConfig)
}

//go:generate go run ../cmd/tools/decorate.go -f decorateCustom -b *Charger -r api.Charger -t "api.ChargerEx,MaxCurrentMillis,func(float64) error" -t "api.Identifier,Identify,func() (string, error)" -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.Resurrector,WakeUp,func() error" -t "api.Battery,Soc,func() (float64, error)" -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.PhaseVoltages,Voltages,func() (float64, float64, float64, error)"
//go:generate decorate -f decorateCustom -b *Charger -r api.Charger -t "api.ChargerEx,MaxCurrentMillis,func(float64) error" -t "api.Identifier,Identify,func() (string, error)" -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.Resurrector,WakeUp,func() error" -t "api.Battery,Soc,func() (float64, error)" -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.PhaseVoltages,Voltages,func() (float64, float64, float64, error)"

// NewConfigurableFromConfig creates a new configurable charger
func NewConfigurableFromConfig(ctx context.Context, other map[string]interface{}) (api.Charger, error) {
Expand Down
2 changes: 1 addition & 1 deletion charger/eebus.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func NewEEBusFromConfig(other map[string]interface{}) (api.Charger, error) {
return NewEEBus(cc.Ski, cc.Ip, cc.Meter, cc.ChargedEnergy, cc.VasVW)
}

//go:generate go run ../cmd/tools/decorate.go -f decorateEEBus -b *EEBus -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.ChargeRater,ChargedEnergy,func() (float64, error)"
//go:generate decorate -f decorateEEBus -b *EEBus -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.ChargeRater,ChargedEnergy,func() (float64, error)"

// NewEEBus creates EEBus charger
func NewEEBus(ski, ip string, hasMeter, hasChargedEnergy, vasVW bool) (api.Charger, error) {
Expand Down
2 changes: 1 addition & 1 deletion charger/em2go.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func init() {
registry.Add("em2go-home", NewEm2GoFromConfig)
}

//go:generate go run ../cmd/tools/decorate.go -f decorateEm2Go -b *Em2Go -r api.Charger -t "api.ChargerEx,MaxCurrentMillis,func(float64) error" -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)"
//go:generate decorate -f decorateEm2Go -b *Em2Go -r api.Charger -t "api.ChargerEx,MaxCurrentMillis,func(float64) error" -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)"

// NewEm2GoFromConfig creates a Em2Go charger from generic config
func NewEm2GoFromConfig(other map[string]interface{}) (api.Charger, error) {
Expand Down
2 changes: 1 addition & 1 deletion charger/evsewifi.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func init() {
registry.Add("evsewifi", NewEVSEWifiFromConfig)
}

//go:generate go run ../cmd/tools/decorate.go -f decorateEVSE -b *EVSEWifi -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.PhaseVoltages,Voltages,func() (float64, float64, float64, error)" -t "api.ChargerEx,MaxCurrentMillis,func(float64) error" -t "api.Identifier,Identify,func() (string, error)"
//go:generate decorate -f decorateEVSE -b *EVSEWifi -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.PhaseVoltages,Voltages,func() (float64, float64, float64, error)" -t "api.ChargerEx,MaxCurrentMillis,func(float64) error" -t "api.Identifier,Identify,func() (string, error)"

// NewEVSEWifiFromConfig creates a EVSEWifi charger from generic config
func NewEVSEWifiFromConfig(other map[string]interface{}) (api.Charger, error) {
Expand Down
2 changes: 1 addition & 1 deletion charger/go-e.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func init() {
registry.Add("go-e", NewGoEFromConfig)
}

//go:generate go run ../cmd/tools/decorate.go -f decorateGoE -b *GoE -r api.Charger -t "api.PhaseSwitcher,Phases1p3p,func(int) error"
//go:generate decorate -f decorateGoE -b *GoE -r api.Charger -t "api.PhaseSwitcher,Phases1p3p,func(int) error"

// NewGoEFromConfig creates a go-e charger from generic config
func NewGoEFromConfig(other map[string]interface{}) (api.Charger, error) {
Expand Down
2 changes: 1 addition & 1 deletion charger/hardybarth-salia.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func init() {
registry.AddCtx("hardybarth-salia", NewSaliaFromConfig)
}

//go:generate go run ../cmd/tools/decorate.go -f decorateSalia -b *Salia -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)"
//go:generate decorate -f decorateSalia -b *Salia -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)"

// NewSaliaFromConfig creates a Salia cPH2 charger from generic config
func NewSaliaFromConfig(ctx context.Context, other map[string]interface{}) (api.Charger, error) {
Expand Down
2 changes: 1 addition & 1 deletion charger/innogy.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func NewInnogyFromConfig(other map[string]interface{}) (api.Charger, error) {
return decorateInnogy(wb, totalEnergy, voltages), nil
}

//go:generate go run ../cmd/tools/decorate.go -f decorateInnogy -b *Innogy -r api.Charger -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseVoltages,Voltages,func() (float64, float64, float64, error)"
//go:generate decorate -f decorateInnogy -b *Innogy -r api.Charger -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseVoltages,Voltages,func() (float64, float64, float64, error)"

// NewInnogy creates a Innogy charger
func NewInnogy(uri string, id uint8) (*Innogy, error) {
Expand Down
2 changes: 1 addition & 1 deletion charger/keba-modbus.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func init() {
registry.AddCtx("keba-modbus", NewKebaFromConfig)
}

//go:generate go run ../cmd/tools/decorate.go -f decorateKeba -b *Keba -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.Identifier,Identify,func() (string, error)" -t "api.StatusReasoner,StatusReason,func() (api.Reason, error)" -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)"
//go:generate decorate -f decorateKeba -b *Keba -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.Identifier,Identify,func() (string, error)" -t "api.StatusReasoner,StatusReason,func() (api.Reason, error)" -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)"

// NewKebaFromConfig creates a new Keba ModbusTCP charger
func NewKebaFromConfig(ctx context.Context, other map[string]interface{}) (api.Charger, error) {
Expand Down
2 changes: 1 addition & 1 deletion charger/keba-udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func init() {
registry.Add("keba-udp", NewKebaUdpFromConfig)
}

//go:generate go run ../cmd/tools/decorate.go -f decorateKebaUdp -b *KebaUdp -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)"
//go:generate decorate -f decorateKebaUdp -b *KebaUdp -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)"

// NewKebaUdpFromConfig creates a new Keba UDP charger
func NewKebaUdpFromConfig(other map[string]interface{}) (api.Charger, error) {
Expand Down
2 changes: 1 addition & 1 deletion charger/kse.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func NewKSEFromConfig(other map[string]interface{}) (api.Charger, error) {
return NewKSE(cc.URI, cc.Device, cc.Comset, cc.Baudrate, cc.ID)
}

//go:generate go run ../cmd/tools/decorate.go -f decorateKSE -b *KSE -r api.Charger -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)" -t "api.Identifier,Identify,func() (string, error)"
//go:generate decorate -f decorateKSE -b *KSE -r api.Charger -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)" -t "api.Identifier,Identify,func() (string, error)"

// NewKSE creates KSE charger
func NewKSE(uri, device, comset string, baudrate int, slaveID uint8) (api.Charger, error) {
Expand Down
2 changes: 1 addition & 1 deletion charger/nrggen2.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func init() {
registry.Add("nrggen2", NewNRGKickGen2FromConfig)
}

//go:generate go run ../cmd/tools/decorate.go -f decorateNRGKickGen2 -b *NRGKickGen2 -r api.Charger -t "api.PhaseSwitcher,Phases1p3p,func(int) error"
//go:generate decorate -f decorateNRGKickGen2 -b *NRGKickGen2 -r api.Charger -t "api.PhaseSwitcher,Phases1p3p,func(int) error"

// NewNRGKickGen2FromConfig creates a NRGKickGen2 charger from generic config
func NewNRGKickGen2FromConfig(other map[string]interface{}) (api.Charger, error) {
Expand Down
Loading

0 comments on commit 172ddf6

Please sign in to comment.