Repository navigation
Show no charging power where the car says no charge runs - #111
Conversation
A car may leave the charging power out while idle (an EX30 answers it PROPERTY_NOT_FOUND), in the same response that says no charge runs. The State page showed it as unknown; it now shows none, the times of the charging status beside it. A power missing during a charge stays unknown. Nothing is stored as zero: the readings and the charges' energies are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The ex30-like profile answers chargingPower PROPERTY_NOT_FOUND while idle, as a real EX30 does, and uploads it while charging (an assumption). The EX30 scenario runs that profile. The field errors take the codes and messages the real API gives: PROPERTY_NOT_SUPPORTED, "No valid value could be found for the requested resource". Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Availability rule and EX30-like profile internal/simulator/vehicle/vehicle.go, internal/simulator/vehicle/vehicle_test.go |
Adds NotFoundIdle and Availability.While(charging). The EX30-like profile uses NotFoundIdle for charging power. |
Charging API responses internal/simulator/polestarapi/handler.go, internal/simulator/volvoapi/handler.go, internal/simulator/volvoapi/handler_test.go, internal/volvo/normalize.go, scenarios/ex30.yaml |
Charging power is reported as supported while charging and not found while idle. Unsupported properties use PROPERTY_NOT_SUPPORTED. The EX30 scenario uses the ex30-like profile. |
No-charge reading and vehicle-state display web/src/entities/vehicle/*, web/src/widgets/vehicle-state/ui/VehicleState.vue, web/src/shared/i18n/locales/{en,fr,sv}.json, web/test/entities/vehicle/mode.test.ts, web/test/widgets/vehicle-state/VehicleState.test.ts |
Adds noChargeReading and uses it to display localized no-charge values when power is absent. Tests cover reading selection and the displayed values. |
Priority:
Severity of issue fixed: Low
Merge Risk: 
Minimal · up to 7dd09
-
The EX30 charging-power and State page changes are ready to merge after normal checks; no actionable merge risk was identified.
Pre-merge checks: 
4
-
Full details: Description check
-
Explanation
The description explains the change and rationale, includes screenshots for the interface change, identifies tests and their results, documents tests not run, and includes
Closes #98. It does not reproduce every template checkbox explicitly, but it provides the required information and is substantially complete.
Full details: Linked Issues check
-
Explanation
Issue
#98asks whether Power should show 0 kW or a dash when the car says no charge runs. It also asks that the ex30-like simulator profile reflect the unsupported fields. The PR shows "None" instead. The PR objectives state this outcome as the chosen display, and it answers the issue's question with a reason.Evidence at the reviewed head:
- web/src/entities/vehicle/model/mode.ts: noChargeReading returns the charging status when it is idle, done or scheduled. With no status, it returns the charge type when the type is none. Otherwise it returns null, including while charging, discharging or in error.
- web/src/widgets/vehicle-state/ui/VehicleState.vue: the power value uses power_w when present. Otherwise, a no-charge reading gives t('charging.power.none'). Otherwise the value is null, which the tile shows as Unknown.
- internal/simulator/vehicle/vehicle.go: NotFoundIdle maps to NotFound while idle and to Supported while charging. The ex30-like profile sets ChargingPower to NotFoundIdle and ChargingCurrentLimit to Unsupported.
Not implemented, with stated reasons:
- transferLimit is not simulated. The PR states that Runsten does not read it.
- chargerPowerStatus is not read. The issue says it "may" help, so it is not a stated requirement.
The test results come from the PR description. I did not run the tests. The whole-PR diff could not be read, so the simulator handler changes rest on the PR summary.
Full details: Out of Scope Changes check
-
Explanation
The changes address
#98. They cover the front-end power display, the simulator's ex30-like charging-power availability, the simulator's field error codes and messages, the ex30 scenario that uses that profile, and tests for these behaviors.Two changes need a note:
- internal/simulator/polestarapi/handler.go: renderBattery now checks ChargingPower.While(true). Only the NotFoundIdle availability, used by ex30-like, changes result. It keeps charging power reported while charging for that profile.
- web/src/shared/i18n/locales/fr.json: adds the missing charging.type.none label. The Type reading on the same Charging tile that
#98names uses this label. This is a small related fix.
No unrelated change was found. The whole-PR diff could not be read because changed blobs are missing from the checkout. The polestarapi and volvoapi handler changes rest on the PR summary. The head files read (mode.ts, vehicle.go, VehicleState.vue) match the summary.
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
An EX30 answers
chargingPowerwithPROPERTY_NOT_FOUNDwhile idle, in the same response that says no charge runs (statusIDLE, typeNONE). The State page showed Power as "Unknown". It now shows "None" when the car itself says no charge runs, and keeps "Unknown" for a power missing during a charge.Changes
en,fr,sv) with that reading's times. Charging, discharging or in error, a missing power stays unknown. Display only: nothing is stored as 0 W, so the charges' energies, the curves and the MQTTcharging_power_kwtopic (empty, as for any unknown value) are unchanged.ex30-likeprofile answerschargingPowerPROPERTY_NOT_FOUNDwhile idle and uploads it while charging (an assumption until confirmed on a real car); theex30scenario now runs this profile. The field errors take the real API's codes and messages (PROPERTY_NOT_SUPPORTED"Property is not supported for this vehicle",PROPERTY_NOT_FOUND"No valid value could be found for the requested resource").transferLimitis not simulated: Runsten does not read it.Screenshots
The Charging tile of the simulated EX30, parked and idle: Power reads "None" instead of "Unknown".
Tests
task unit: Go (fmt, lint 0 issues, unit tests, govulncheck, build) and web (vue-tsc, ESLint, Prettier, 1288 Vitest tests, audit, build), passed.noChargeReading(every status and type), the Power reading on the State page (idle, charging, French),Availability.While, and the simulator'schargingPowerwhile idle and while charging.task integrationandtask system(no store, Compose or Dockerfile change); the CI runs them.Closes #98
🤖 Generated with Claude Code
Summary by CodeRabbit