From 03d6d1418a3da353d677cc299d222edf28d3fb27 Mon Sep 17 00:00:00 2001 From: andig Date: Fri, 23 Dec 2022 10:19:23 +0100 Subject: [PATCH] Rename SoC to Soc and LoadPoint to Loadpoint (#5549) --- api/api.go | 18 +- api/proto/pb/vehicle.pb.go | 50 ++-- api/proto/pb/vehicle_grpc.pb.go | 28 +- api/proto/vehicle.proto | 6 +- .../Energyflow/Energyflow.story.vue | 14 +- .../js/components/Energyflow/Energyflow.vue | 8 +- .../components/Energyflow/EnergyflowEntry.vue | 4 +- .../components/Energyflow/Visualization.vue | 6 +- assets/js/components/Loadpoint.story.vue | 4 +- assets/js/components/Loadpoint.vue | 18 +- .../js/components/LoadpointSettingsModal.vue | 28 +- assets/js/components/Site.vue | 4 +- assets/js/components/TargetCharge.vue | 4 +- assets/js/components/TargetEnergySelect.vue | 16 +- ...argetSoCSelect.vue => TargetSocSelect.vue} | 10 +- assets/js/components/Vehicle.story.vue | 8 +- assets/js/components/Vehicle.vue | 48 ++-- assets/js/components/VehicleSoc.vue | 110 +++---- assets/js/components/VehicleStatus.vue | 14 +- assets/js/components/Vehicles.vue | 14 +- charger/eebus.go | 4 +- charger/openevse/api.yaml | 2 +- charger/openwb.go | 4 +- charger/openwb/topics.go | 4 +- charger/openwb_decorators.go | 2 +- cmd/config.go | 2 +- cmd/configure/devicetest.go | 6 +- cmd/demo.yaml | 34 +-- cmd/dump.go | 4 +- cmd/dumper.go | 12 +- cmd/root.go | 2 +- cmd/setup.go | 12 +- cmd/setup_test.go | 4 +- cmd/soc/main.go | 2 +- core/const.go | 2 +- core/loadpoint.go | 272 +++++++++--------- core/loadpoint/api.go | 18 +- core/loadpoint_adapter.go | 6 +- core/loadpoint_api.go | 108 +++---- core/loadpoint_phases.go | 10 +- core/loadpoint_phases_test.go | 42 +-- core/loadpoint_session.go | 10 +- core/loadpoint_test.go | 60 ++-- core/loadpoint_vehicle_test.go | 48 ++-- core/site.go | 34 +-- core/site/api.go | 10 +- core/site_api.go | 28 +- core/soc/estimator.go | 52 ++-- core/soc/estimator_test.go | 62 ++-- core/soc/timer.go | 6 +- .../{index.3fb53f91.js => index.286a4950.js} | 60 ++-- ...{index.a0d2f98d.css => index.b7c1c9f8.css} | 2 +- dist/index.html | 4 +- evcc.dist.yaml | 12 +- hems/ocpp/ocpp.go | 2 +- hems/semp/semp.go | 14 +- i18n/de.toml | 10 +- i18n/en.toml | 10 +- i18n/es.toml | 10 +- i18n/fr.toml | 10 +- i18n/hr.toml | 10 +- i18n/it.toml | 10 +- i18n/lb.toml | 10 +- i18n/lt.toml | 10 +- i18n/nl.toml | 10 +- i18n/no.toml | 10 +- i18n/pl.toml | 10 +- i18n/pt.toml | 10 +- i18n/uk.toml | 10 +- meter/bosch_bpts5_hybrid.go | 14 +- meter/bosch_bpts5_hybrid_decorators.go | 2 +- meter/lgess.go | 14 +- meter/lgess_decorators.go | 2 +- meter/meter.go | 18 +- meter/meter_average.go | 6 +- meter/meter_decorators.go | 2 +- meter/modbus.go | 14 +- meter/modbus_decorators.go | 2 +- meter/openwb.go | 2 +- meter/powerwall.go | 14 +- meter/powerwall_decorators.go | 2 +- meter/rct.go | 14 +- meter/rct_decorators.go | 2 +- meter/sma.go | 2 +- meter/sma_decorators.go | 2 +- mock/mock_api.go | 24 +- push/hub.go | 4 +- schema.json | 42 ++- server/http.go | 10 +- server/http_handler.go | 6 +- server/http_handler_test.go | 16 +- server/influxdb.go | 10 +- server/mqtt.go | 26 +- server/socket.go | 4 +- templates/definition/defaults.yaml | 26 +- .../definition/meter/kostal-plenticore.yaml | 2 +- .../definition/meter/sma-datamanager.yaml | 2 +- .../definition/meter/solarmax-maxstorage.yaml | 2 +- .../meter/solarwatt-myreserve-matrix.yaml | 2 +- .../definition/meter/victron-energy.yaml | 2 +- templates/definition/vehicle/fiat.yaml | 2 +- templates/definition/vehicle/offline.yaml | 6 +- templates/docs/vehicle/audi_0.yaml | 4 +- templates/docs/vehicle/bmw_0.yaml | 4 +- templates/docs/vehicle/carwings_0.yaml | 4 +- templates/docs/vehicle/citroen_0.yaml | 4 +- templates/docs/vehicle/cupra_0.yaml | 4 +- templates/docs/vehicle/dacia_0.yaml | 4 +- templates/docs/vehicle/ds_0.yaml | 4 +- templates/docs/vehicle/enyaq_0.yaml | 4 +- templates/docs/vehicle/etron_0.yaml | 4 +- templates/docs/vehicle/evnotify_0.yaml | 4 +- templates/docs/vehicle/fiat_0.yaml | 4 +- templates/docs/vehicle/ford_0.yaml | 4 +- templates/docs/vehicle/hyundai_0.yaml | 4 +- templates/docs/vehicle/id_0.yaml | 4 +- .../docs/vehicle/jaguar-landrover_0.yaml | 4 +- .../docs/vehicle/jaguar-landrover_1.yaml | 4 +- templates/docs/vehicle/kia_0.yaml | 4 +- templates/docs/vehicle/mini_0.yaml | 4 +- templates/docs/vehicle/nissan_0.yaml | 4 +- templates/docs/vehicle/niu-e-scooter_0.yaml | 4 +- templates/docs/vehicle/opel_0.yaml | 4 +- templates/docs/vehicle/ovms_0.yaml | 4 +- templates/docs/vehicle/peugeot_0.yaml | 4 +- templates/docs/vehicle/porsche_0.yaml | 4 +- templates/docs/vehicle/renault_0.yaml | 4 +- templates/docs/vehicle/seat_0.yaml | 4 +- templates/docs/vehicle/skoda_0.yaml | 4 +- templates/docs/vehicle/smart_0.yaml | 4 +- templates/docs/vehicle/tesla_0.yaml | 4 +- templates/docs/vehicle/tronity_0.yaml | 4 +- templates/docs/vehicle/volvo_0.yaml | 4 +- templates/docs/vehicle/vw_0.yaml | 4 +- util/cache.go | 10 +- util/param.go | 8 +- util/param_test.go | 2 +- vehicle/bluelink/provider.go | 8 +- vehicle/bmw/provider.go | 4 +- vehicle/carwings.go | 4 +- vehicle/cloud.go | 10 +- vehicle/fiat/provider.go | 4 +- vehicle/ford/provider.go | 4 +- vehicle/jlr/provider.go | 4 +- vehicle/mercedes/api.go | 8 +- vehicle/mercedes/provider.go | 8 +- vehicle/mercedes/types.go | 2 +- vehicle/nissan/provider.go | 4 +- vehicle/niu.go | 4 +- vehicle/ovms.go | 4 +- vehicle/porsche/provider.go | 4 +- vehicle/porsche/types.go | 2 +- vehicle/psa/provider.go | 4 +- vehicle/renault/provider.go | 4 +- vehicle/seat/cupra/provider.go | 8 +- vehicle/silence.go | 4 +- vehicle/skoda/provider.go | 8 +- vehicle/smart/provider.go | 4 +- vehicle/tesla.go | 8 +- vehicle/tronity.go | 4 +- vehicle/vehicle.go | 4 +- vehicle/volvo.go | 4 +- vehicle/vw/id/provider.go | 8 +- vehicle/vw/provider.go | 4 +- vehicle/wrapper/wrapper.go | 4 +- 165 files changed, 1054 insertions(+), 1032 deletions(-) rename assets/js/components/{TargetSoCSelect.vue => TargetSocSelect.vue} (91%) rename dist/assets/{index.3fb53f91.js => index.286a4950.js} (82%) rename dist/assets/{index.a0d2f98d.css => index.b7c1c9f8.css} (98%) diff --git a/api/api.go b/api/api.go index 6e5f2f92c7..4c6ebbf268 100644 --- a/api/api.go +++ b/api/api.go @@ -55,8 +55,8 @@ type ActionConfig struct { Mode *ChargeMode `mapstructure:"mode,omitempty"` // Charge Mode MinCurrent *float64 `mapstructure:"minCurrent,omitempty"` // Minimum Current MaxCurrent *float64 `mapstructure:"maxCurrent,omitempty"` // Maximum Current - MinSoC *int `mapstructure:"minSoC,omitempty"` // Minimum SoC - TargetSoC *int `mapstructure:"targetSoC,omitempty"` // Target SoC + MinSoc *int `mapstructure:"minSoc,omitempty"` // Minimum Soc + TargetSoc *int `mapstructure:"targetSoc,omitempty"` // Target Soc } // Merge merges all non-nil properties of the additional config into the base config. @@ -71,11 +71,11 @@ func (a ActionConfig) Merge(m ActionConfig) ActionConfig { if m.MaxCurrent != nil { a.MaxCurrent = m.MaxCurrent } - if m.MinSoC != nil { - a.MinSoC = m.MinSoC + if m.MinSoc != nil { + a.MinSoc = m.MinSoc } - if m.TargetSoC != nil { - a.TargetSoC = m.TargetSoC + if m.TargetSoc != nil { + a.TargetSoc = m.TargetSoc } return a } @@ -107,9 +107,9 @@ type MeterCurrent interface { Currents() (float64, float64, float64, error) } -// Battery is able to provide battery SoC in % +// Battery is able to provide battery Soc in % type Battery interface { - SoC() (float64, error) + Soc() (float64, error) } // ChargeState provides current charging status @@ -204,7 +204,7 @@ type VehiclePosition interface { // SocLimiter returns the vehicles charge limit type SocLimiter interface { - TargetSoC() (float64, error) + TargetSoc() (float64, error) } // VehicleChargeController allows to start/stop the charging session on the vehicle side diff --git a/api/proto/pb/vehicle.pb.go b/api/proto/pb/vehicle.pb.go index ac150212af..b6d2a4e56f 100644 --- a/api/proto/pb/vehicle.pb.go +++ b/api/proto/pb/vehicle.pb.go @@ -130,7 +130,7 @@ func (x *NewReply) GetVehicleId() int64 { return 0 } -type SoCRequest struct { +type SocRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -139,8 +139,8 @@ type SoCRequest struct { VehicleId int64 `protobuf:"varint,2,opt,name=vehicle_id,json=vehicleId,proto3" json:"vehicle_id,omitempty"` } -func (x *SoCRequest) Reset() { - *x = SoCRequest{} +func (x *SocRequest) Reset() { + *x = SocRequest{} if protoimpl.UnsafeEnabled { mi := &file_proto_vehicle_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -148,13 +148,13 @@ func (x *SoCRequest) Reset() { } } -func (x *SoCRequest) String() string { +func (x *SocRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SoCRequest) ProtoMessage() {} +func (*SocRequest) ProtoMessage() {} -func (x *SoCRequest) ProtoReflect() protoreflect.Message { +func (x *SocRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_vehicle_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -166,26 +166,26 @@ func (x *SoCRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SoCRequest.ProtoReflect.Descriptor instead. -func (*SoCRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use SocRequest.ProtoReflect.Descriptor instead. +func (*SocRequest) Descriptor() ([]byte, []int) { return file_proto_vehicle_proto_rawDescGZIP(), []int{2} } -func (x *SoCRequest) GetToken() string { +func (x *SocRequest) GetToken() string { if x != nil { return x.Token } return "" } -func (x *SoCRequest) GetVehicleId() int64 { +func (x *SocRequest) GetVehicleId() int64 { if x != nil { return x.VehicleId } return 0 } -type SoCReply struct { +type SocReply struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -193,8 +193,8 @@ type SoCReply struct { Soc float64 `protobuf:"fixed64,1,opt,name=soc,proto3" json:"soc,omitempty"` } -func (x *SoCReply) Reset() { - *x = SoCReply{} +func (x *SocReply) Reset() { + *x = SocReply{} if protoimpl.UnsafeEnabled { mi := &file_proto_vehicle_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -202,13 +202,13 @@ func (x *SoCReply) Reset() { } } -func (x *SoCReply) String() string { +func (x *SocReply) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SoCReply) ProtoMessage() {} +func (*SocReply) ProtoMessage() {} -func (x *SoCReply) ProtoReflect() protoreflect.Message { +func (x *SocReply) ProtoReflect() protoreflect.Message { mi := &file_proto_vehicle_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -220,12 +220,12 @@ func (x *SoCReply) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SoCReply.ProtoReflect.Descriptor instead. -func (*SoCReply) Descriptor() ([]byte, []int) { +// Deprecated: Use SocReply.ProtoReflect.Descriptor instead. +func (*SocReply) Descriptor() ([]byte, []int) { return file_proto_vehicle_proto_rawDescGZIP(), []int{3} } -func (x *SoCReply) GetSoc() float64 { +func (x *SocReply) GetSoc() float64 { if x != nil { return x.Soc } @@ -280,16 +280,16 @@ var file_proto_vehicle_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_proto_vehicle_proto_goTypes = []interface{}{ (*NewRequest)(nil), // 0: NewRequest (*NewReply)(nil), // 1: NewReply - (*SoCRequest)(nil), // 2: SoCRequest - (*SoCReply)(nil), // 3: SoCReply + (*SocRequest)(nil), // 2: SocRequest + (*SocReply)(nil), // 3: SocReply nil, // 4: NewRequest.ConfigEntry } var file_proto_vehicle_proto_depIdxs = []int32{ 4, // 0: NewRequest.config:type_name -> NewRequest.ConfigEntry 0, // 1: Vehicle.New:input_type -> NewRequest - 2, // 2: Vehicle.SoC:input_type -> SoCRequest + 2, // 2: Vehicle.Soc:input_type -> SocRequest 1, // 3: Vehicle.New:output_type -> NewReply - 3, // 4: Vehicle.SoC:output_type -> SoCReply + 3, // 4: Vehicle.Soc:output_type -> SocReply 3, // [3:5] is the sub-list for method output_type 1, // [1:3] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -328,7 +328,7 @@ func file_proto_vehicle_proto_init() { } } file_proto_vehicle_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SoCRequest); i { + switch v := v.(*SocRequest); i { case 0: return &v.state case 1: @@ -340,7 +340,7 @@ func file_proto_vehicle_proto_init() { } } file_proto_vehicle_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SoCReply); i { + switch v := v.(*SocReply); i { case 0: return &v.state case 1: diff --git a/api/proto/pb/vehicle_grpc.pb.go b/api/proto/pb/vehicle_grpc.pb.go index 891eded081..7451382ebb 100644 --- a/api/proto/pb/vehicle_grpc.pb.go +++ b/api/proto/pb/vehicle_grpc.pb.go @@ -19,7 +19,7 @@ const _ = grpc.SupportPackageIsVersion7 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type VehicleClient interface { New(ctx context.Context, in *NewRequest, opts ...grpc.CallOption) (*NewReply, error) - SoC(ctx context.Context, in *SoCRequest, opts ...grpc.CallOption) (*SoCReply, error) + Soc(ctx context.Context, in *SocRequest, opts ...grpc.CallOption) (*SocReply, error) } type vehicleClient struct { @@ -39,9 +39,9 @@ func (c *vehicleClient) New(ctx context.Context, in *NewRequest, opts ...grpc.Ca return out, nil } -func (c *vehicleClient) SoC(ctx context.Context, in *SoCRequest, opts ...grpc.CallOption) (*SoCReply, error) { - out := new(SoCReply) - err := c.cc.Invoke(ctx, "/Vehicle/SoC", in, out, opts...) +func (c *vehicleClient) Soc(ctx context.Context, in *SocRequest, opts ...grpc.CallOption) (*SocReply, error) { + out := new(SocReply) + err := c.cc.Invoke(ctx, "/Vehicle/Soc", in, out, opts...) if err != nil { return nil, err } @@ -53,7 +53,7 @@ func (c *vehicleClient) SoC(ctx context.Context, in *SoCRequest, opts ...grpc.Ca // for forward compatibility type VehicleServer interface { New(context.Context, *NewRequest) (*NewReply, error) - SoC(context.Context, *SoCRequest) (*SoCReply, error) + Soc(context.Context, *SocRequest) (*SocReply, error) mustEmbedUnimplementedVehicleServer() } @@ -64,8 +64,8 @@ type UnimplementedVehicleServer struct { func (UnimplementedVehicleServer) New(context.Context, *NewRequest) (*NewReply, error) { return nil, status.Errorf(codes.Unimplemented, "method New not implemented") } -func (UnimplementedVehicleServer) SoC(context.Context, *SoCRequest) (*SoCReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method SoC not implemented") +func (UnimplementedVehicleServer) Soc(context.Context, *SocRequest) (*SocReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method Soc not implemented") } func (UnimplementedVehicleServer) mustEmbedUnimplementedVehicleServer() {} @@ -98,20 +98,20 @@ func _Vehicle_New_Handler(srv interface{}, ctx context.Context, dec func(interfa return interceptor(ctx, in, info, handler) } -func _Vehicle_SoC_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SoCRequest) +func _Vehicle_Soc_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SocRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(VehicleServer).SoC(ctx, in) + return srv.(VehicleServer).Soc(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/Vehicle/SoC", + FullMethod: "/Vehicle/Soc", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VehicleServer).SoC(ctx, req.(*SoCRequest)) + return srv.(VehicleServer).Soc(ctx, req.(*SocRequest)) } return interceptor(ctx, in, info, handler) } @@ -128,8 +128,8 @@ var Vehicle_ServiceDesc = grpc.ServiceDesc{ Handler: _Vehicle_New_Handler, }, { - MethodName: "SoC", - Handler: _Vehicle_SoC_Handler, + MethodName: "Soc", + Handler: _Vehicle_Soc_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/api/proto/vehicle.proto b/api/proto/vehicle.proto index 074157ce94..b20b7146dd 100644 --- a/api/proto/vehicle.proto +++ b/api/proto/vehicle.proto @@ -6,7 +6,7 @@ option go_package = "proto/pb"; service Vehicle { rpc New (NewRequest) returns (NewReply) {} - rpc SoC (SoCRequest) returns (SoCReply) {} + rpc Soc (SocRequest) returns (SocReply) {} } message NewRequest { @@ -19,11 +19,11 @@ message NewReply { int64 vehicle_id = 1; } -message SoCRequest { +message SocRequest { string token = 1; int64 vehicle_id = 2; } -message SoCReply { +message SocReply { double soc = 1; } diff --git a/assets/js/components/Energyflow/Energyflow.story.vue b/assets/js/components/Energyflow/Energyflow.story.vue index 1f9fee151d..2323003435 100644 --- a/assets/js/components/Energyflow/Energyflow.story.vue +++ b/assets/js/components/Energyflow/Energyflow.story.vue @@ -25,7 +25,7 @@ import Energyflow from "./Energyflow.vue"; :gridPower="1200" :homePower="2000" :batteryPower="800" - :batterySoC="77" + :batterySoc="77" siteTitle="Home" /> @@ -40,7 +40,7 @@ import Energyflow from "./Energyflow.vue"; :loadpointsPower="1400" :activeLoadpointsCount="1" :batteryPower="-1500" - :batterySoC="75" + :batterySoc="75" siteTitle="Home" /> @@ -53,7 +53,7 @@ import Energyflow from "./Energyflow.vue"; :gridPower="700" :homePower="3300" :batteryPower="1500" - :batterySoC="30" + :batterySoc="30" siteTitle="Home" /> @@ -67,7 +67,7 @@ import Energyflow from "./Energyflow.vue"; :loadpointsPower="7500" :activeLoadpointsCount="2" :batteryPower="-700" - :batterySoC="95" + :batterySoc="95" siteTitle="Home" /> @@ -82,7 +82,7 @@ import Energyflow from "./Energyflow.vue"; :loadpointsPower="5600" :activeLoadpointsCount="2" :batteryPower="800" - :batterySoC="76" + :batterySoc="76" siteTitle="Home" /> @@ -97,7 +97,7 @@ import Energyflow from "./Energyflow.vue"; :loadpointsPower="5500" :activeLoadpointsCount="1" :batteryPower="0" - :batterySoC="0" + :batterySoc="0" siteTitle="Home" /> @@ -110,7 +110,7 @@ import Energyflow from "./Energyflow.vue"; :gridPower="-300" :homePower="300" :batteryPower="-100" - :batterySoC="55" + :batterySoc="55" siteTitle="Home" /> diff --git a/assets/js/components/Energyflow/Energyflow.vue b/assets/js/components/Energyflow/Energyflow.vue index a4b2af419e..a7fc58ede7 100644 --- a/assets/js/components/Energyflow/Energyflow.vue +++ b/assets/js/components/Energyflow/Energyflow.vue @@ -15,7 +15,7 @@ :batteryDischarge="batteryDischarge" :pvProduction="pvProduction" :homePower="homePower" - :batterySoC="batterySoC" + :batterySoc="batterySoc" :valuesInKw="valuesInKw" :vehicleIcons="vehicleIcons" /> @@ -62,7 +62,7 @@ v-if="batteryConfigured" :name="$t('main.energyflow.batteryDischarge')" icon="battery" - :soc="batterySoC" + :soc="batterySoc" :power="batteryDischarge" :valuesInKw="valuesInKw" /> @@ -105,7 +105,7 @@ v-if="batteryConfigured" :name="$t('main.energyflow.batteryCharge')" icon="battery" - :soc="batterySoC" + :soc="batterySoc" :power="batteryCharge" :valuesInKw="valuesInKw" /> @@ -143,7 +143,7 @@ export default { activeLoadpointsCount: { type: Number, default: 0 }, batteryConfigured: Boolean, batteryPower: { type: Number, default: 0 }, - batterySoC: { type: Number, default: 0 }, + batterySoc: { type: Number, default: 0 }, vehicleIcons: { type: Array }, }, data: () => { diff --git a/assets/js/components/Energyflow/EnergyflowEntry.vue b/assets/js/components/Energyflow/EnergyflowEntry.vue index e4762a2f68..3cc8fb17a4 100644 --- a/assets/js/components/Energyflow/EnergyflowEntry.vue +++ b/assets/js/components/Energyflow/EnergyflowEntry.vue @@ -7,7 +7,7 @@ {{ name }} {{ soc }}% / + >{{ soc }}% / @@ -44,7 +44,7 @@ export default { isVehicle: function () { return this.icon === "vehicle"; }, - hasSoC: function () { + hasSoc: function () { return this.isBattery && !isNaN(this.soc); }, }, diff --git a/assets/js/components/Energyflow/Visualization.vue b/assets/js/components/Energyflow/Visualization.vue index d6b98edd2d..b9a8120dd0 100644 --- a/assets/js/components/Energyflow/Visualization.vue +++ b/assets/js/components/Energyflow/Visualization.vue @@ -6,7 +6,7 @@ - + @@ -64,7 +64,7 @@ - + @@ -97,7 +97,7 @@ export default { batteryDischarge: { type: Number, default: 0 }, pvProduction: { type: Number, default: 0 }, homePower: { type: Number, default: 0 }, - batterySoC: { type: Number, default: 0 }, + batterySoc: { type: Number, default: 0 }, valuesInKw: { type: Boolean, default: false }, vehicleIcons: { type: Array }, }, diff --git a/assets/js/components/Loadpoint.story.vue b/assets/js/components/Loadpoint.story.vue index f7b447b909..321832288b 100644 --- a/assets/js/components/Loadpoint.story.vue +++ b/assets/js/components/Loadpoint.story.vue @@ -14,8 +14,8 @@ const state = reactive({ connected: true, mode: "pv", charging: true, - vehicleSoC: 66, - targetSoC: 90, + vehicleSoc: 66, + targetSoc: 90, chargeCurrent: 7, minCurrent: 6, maxCurrent: 16, diff --git a/assets/js/components/Loadpoint.vue b/assets/js/components/Loadpoint.vue index 5ce23670c1..a490dbabec 100644 --- a/assets/js/components/Loadpoint.vue +++ b/assets/js/components/Loadpoint.vue @@ -25,7 +25,7 @@ @maxcurrent-updated="setMaxCurrent" @mincurrent-updated="setMinCurrent" @phasesconfigured-updated="setPhasesConfigured" - @minsoc-updated="setMinSoC" + @minsoc-updated="setMinSoc" />

{{ $t("main.loadpointSettings.vehicle") }}

-
+