Update iobroker.yaml - #33146
Conversation
remove /rest-api
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="templates/definition/vehicle/iobroker.yaml" line_range="144" />
<code_context>
source: http
headers:
- accept: text/plain;charset=UTF-8
- uri: {{ .uri }}/rest-api/v1/state/{{ .soc }}/plain?extraPlain=true
+ uri: {{ .uri }}/v1/state/{{ .soc }}/plain?extraPlain=true
cache: {{ .cache }}
</code_context>
<issue_to_address>
**issue (bug_risk):** With the documented `rest-api` adapter setup and the documented host-only `.uri`, every vehicle request is sent to `/v1/state/...` instead of the adapter's `/rest-api/v1/state/...` mount, so reads and writes fail with an unavailable endpoint rather than accessing the configured datapoints.
**Triggers:** When `.uri` is a host URI as shown in the template example and the ioBroker `rest-api` adapter is mounted under `/rest-api`.
**Suggested fix:** Retain the `/rest-api` prefix, or update the adapter/URI contract consistently and migrate the charger and meter ioBroker templates as well.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: templates/definition/vehicle/iobroker.yaml:144
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| source: http | ||
| headers: | ||
| - accept: text/plain;charset=UTF-8 | ||
| uri: {{ .uri }}/rest-api/v1/state/{{ .soc }}/plain?extraPlain=true |
There was a problem hiding this comment.
issue (bug_risk): With the documented rest-api adapter setup and the documented host-only .uri, every vehicle request is sent to /v1/state/... instead of the adapter's /rest-api/v1/state/... mount, so reads and writes fail with an unavailable endpoint rather than accessing the configured datapoints.
Triggers: When .uri is a host URI as shown in the template example and the ioBroker rest-api adapter is mounted under /rest-api.
Suggested fix: Retain the /rest-api prefix, or update the adapter/URI contract consistently and migrate the charger and meter ioBroker templates as well.
Code reviewBug risk: removing evcc/templates/definition/vehicle/iobroker.yaml Lines 143 to 145 in 0695aaf The ioBroker
Both explicitly document: "The Suggest reverting the prefix removal, or if the adapter's mount path genuinely changed, confirming that and updating the charger/meter templates to match for consistency. |
Change Port to 8093: https://github.com/ioBroker/ioBroker.rest-api#usage
remove /rest-api