Skip to content

Commit 4ce2eea

Browse files
committed
Adding max_configs error handling
1 parent ff23b98 commit 4ce2eea

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

app/src/components/schedule-item.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ export default class ScheduleItem extends Vue {
143143
@Prop({ type: Object, required: true }) declare readonly vehicle: GQLVehicle;
144144
@Prop({ type: Boolean, default: false }) declare readonly newSchedule: boolean;
145145
146+
localSchedule!: GQLSchedule;
146147
refreshKey!: number; // workaround to reset date picker step
147148
timeMenu!: boolean;
148149
levelMenu!: boolean;

providers/tesla/tesla-agent.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,19 @@ export class TeslaAgent extends AbstractAgent {
546546
}
547547
}
548548
}
549+
if (telemetry.skipped_vehicles.max_configs) {
550+
for (const vin of telemetry.skipped_vehicles.max_configs) {
551+
const v = this.vehicles[vin];
552+
if (v.vehicleUUID) {
553+
log(LogLevel.Warning, `Max configs for ${vin} (${v.vehicleUUID})`);
554+
v.dbData = await this.scClient.updateVehicle({
555+
id: v.vehicleUUID,
556+
status: "No more telemetry configs allowed",
557+
providerData: { error: "Max configs", disabled: true },
558+
});
559+
}
560+
}
561+
}
549562
}
550563
} else {
551564
job.interval = 5 * 60; // Poll every 5 minutes

0 commit comments

Comments
 (0)