Meter (SlimmeLezer V2): use ESPHome entity-name sensor URLs#30466
Conversation
ESPHome 2026.1.0 (web_server) deprecates the legacy /sensor/<object_id> URLs and removes them in 2026.7.0, telling callers to use the entity name instead. Switch all 13 polled sensors to the entity-name form (e.g. /sensor/Power Consumed); the http plugin url-encodes the spaces on the request side. The returned JSON is identical, so the jq extractors are unchanged. fixes #30442
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/meter/slimmelezer-v2.yaml" line_range="31" />
<code_context>
add:
- source: http
- uri: http://{{ .host }}/sensor/power_consumed
+ uri: http://{{ .host }}/sensor/Power Consumed
headers:
- content-type: application/json
</code_context>
<issue_to_address>
**issue (review_instructions):** The updated sensor URIs introduce capitalization and spaces in the path, which appears inconsistent with the existing snake_case, lowercase sensor naming used elsewhere in templates and likely violates the naming conventions in templates/README.md.
Previously these URIs used snake_case and lowercase segments (e.g. `power_consumed`, `power_produced_phase_1`, etc.). The new versions such as `/sensor/Power Consumed`, `/sensor/Energy Produced Tariff 1`, `/sensor/Current Phase 1`, etc. change that to capitalized words with spaces in the path.
This is inconsistent with the original naming and, based on the rest of the templates directory, with the general convention of lowercase, underscore-separated identifiers. It is also likely to break any client expecting the old paths.
Please align these URIs with the conventions in `templates/README.md` and with other meter templates (probably reverting to lowercase snake_case without spaces), or update the README and other templates accordingly if this naming change is intentional and broadly adopted.
<details>
<summary>Review instructions:</summary>
**Path patterns:** `templates/**/*.yaml`
**Instructions:**
Verify that the changes comply to the rules defined in templates/README.md. Also check consistence (wording) with other files inside templates directory.
</details>
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| add: | ||
| - source: http | ||
| uri: http://{{ .host }}/sensor/power_consumed | ||
| uri: http://{{ .host }}/sensor/Power Consumed |
There was a problem hiding this comment.
issue (review_instructions): The updated sensor URIs introduce capitalization and spaces in the path, which appears inconsistent with the existing snake_case, lowercase sensor naming used elsewhere in templates and likely violates the naming conventions in templates/README.md.
Previously these URIs used snake_case and lowercase segments (e.g. power_consumed, power_produced_phase_1, etc.). The new versions such as /sensor/Power Consumed, /sensor/Energy Produced Tariff 1, /sensor/Current Phase 1, etc. change that to capitalized words with spaces in the path.
This is inconsistent with the original naming and, based on the rest of the templates directory, with the general convention of lowercase, underscore-separated identifiers. It is also likely to break any client expecting the old paths.
Please align these URIs with the conventions in templates/README.md and with other meter templates (probably reverting to lowercase snake_case without spaces), or update the README and other templates accordingly if this naming change is intentional and broadly adopted.
Review instructions:
Path patterns: templates/**/*.yaml
Instructions:
Verify that the changes comply to the rules defined in templates/README.md. Also check consistence (wording) with other files inside templates directory.
fixes #30442
ESPHome 2026.1.0 reworked the web_server component to address entities by name (esphome/esphome#12627). The legacy /sensor/<object_id> URLs the slimmelezer-V2 template polls are now deprecated and emit warnings, and they will be removed in ESPHome 2026.7.0.
This switches all 13 polled sensors to the entity-name form, e.g. /sensor/Power Consumed instead of /sensor/power_consumed. The names match Zuidwijk's upstream slimmelezer.yaml, which has used these friendly names for many releases, so any device this template targets already serves them. The web_server returns identical JSON for both URL forms, so the jq extractors are unchanged.
The spaces in the entity names are left literal in the template; the http plugin url-encodes them on the request side.