Context
Follow-up to #5519. The TeslaFi import quarantines a row when its VIN differs from the
import car while the vehicle ID still matches (classify_vehicle/5 in
lib/teslamate/import.ex). This handles TeslaFi variants that omit VINs and rely on the
configured vehicle-ID fallback.
Problem
The quarantined row is currently recorded as :invalid_fields, ["vin"], so the import
page shows "invalid values for vin". That is misleading: the VIN is a perfectly valid
value — it just belongs to a different vehicle than the one the import run identified.
Suggested change
- Add a dedicated reason such as
:vehicle_conflict to the Ecto.Enum values in
lib/teslamate/import/rejection.ex and use it in classify_vehicle/5.
- Add a matching
rejection_reason/1 clause in
lib/teslamate_web/live/import_live/index.ex with a gettext string along the lines of
"row belongs to a different vehicle", and run the gettext extract/merge.
No migration is needed — the reason column is a plain :string.
🤖Issue drafted with Claude Code (Fable 5 high) — sponsored by Claude for Open Source
Context
Follow-up to #5519. The TeslaFi import quarantines a row when its VIN differs from the
import car while the vehicle ID still matches (
classify_vehicle/5inlib/teslamate/import.ex). This handles TeslaFi variants that omit VINs and rely on theconfigured vehicle-ID fallback.
Problem
The quarantined row is currently recorded as
:invalid_fields, ["vin"], so the importpage shows "invalid values for vin". That is misleading: the VIN is a perfectly valid
value — it just belongs to a different vehicle than the one the import run identified.
Suggested change
:vehicle_conflictto theEcto.Enumvalues inlib/teslamate/import/rejection.exand use it inclassify_vehicle/5.rejection_reason/1clause inlib/teslamate_web/live/import_live/index.exwith a gettext string along the lines of"row belongs to a different vehicle", and run the gettext extract/merge.
No migration is needed — the
reasoncolumn is a plain:string.🤖Issue drafted with Claude Code (Fable 5 high) — sponsored by Claude for Open Source