Skip to content

[Inkplate] Update for new refactor#6853

Open
franFodor wants to merge 2 commits into
esphome:currentfrom
franFodor:inkplate-refactor
Open

[Inkplate] Update for new refactor#6853
franFodor wants to merge 2 commits into
esphome:currentfrom
franFodor:inkplate-refactor

Conversation

@franFodor

Copy link
Copy Markdown

Description

Update docs for Inkplate refactor

Pull request in esphome with YAML changes (if applicable):

Checklist

  • I am merging into next because this is new documentation that has a matching pull-request in esphome as linked above.
    or

  • I am merging into current because this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.

  • Link added in /src/content/docs/components/index.mdx when creating new documents for new components or cookbook.

New Component Images

If you are adding a new component to ESPHome, you can automatically generate a standardized black and white component name image for the documentation.

To generate a component image:

  1. Comment on this pull request with the following command, replacing component_name with your component name in lower_case format with underscores (e.g., bme280, sht3x, dallas_temp):

    @esphomebot generate image component_name
    
  2. The ESPHome bot will respond with a downloadable ZIP file containing the SVG image.

  3. Extract the SVG file and place it in the /public/images/ folder of this repository.

  4. Use the image in your component's index table entry in /src/content/docs/components/index.mdx.

Example: For a component called "DHT22 Temperature Sensor", use:

@esphomebot generate image dht22

Note: All images used in ImgTable components must be placed in /public/images/ as the component resolves them to absolute paths.

esphome[bot]
esphome Bot previously requested changes Jun 25, 2026

@esphome esphome Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is a feature matched with a PR in https://github.com/esphome/esphome, please target your PR to the next branch and rebase.

@esphome esphome Bot marked this pull request as draft June 25, 2026 09:02
@esphome

esphome Bot commented Jun 25, 2026

Copy link
Copy Markdown

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@netlify

netlify Bot commented Jun 25, 2026

Copy link
Copy Markdown

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit d44f732
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/6a3cef5e8930730008d7b9e5
😎 Deploy Preview https://deploy-preview-6853--esphome.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

esphome[bot]
esphome Bot previously requested changes Jun 25, 2026

@esphome esphome Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is a feature matched with a PR in https://github.com/esphome/esphome, please target your PR to the next branch and rebase.

@franFodor franFodor marked this pull request as ready for review June 26, 2026 07:37
@esphome esphome Bot dismissed stale reviews from themself June 26, 2026 07:37

Stale

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Reorganized the Inkplate display docs around supported models, minimal configuration, board-specific wiring examples, rendering usage, grayscale mode, partial updates, and updated related links.

Changes

Inkplate documentation rewrite

Layer / File(s) Summary
Overview and config
src/content/docs/components/display/inkplate.mdx
Updated the frontmatter, introduction, supported models table, minimal configuration example, configuration variables, and I²C subsection.
Board examples
src/content/docs/components/display/inkplate.mdx
Added YAML examples for Inkplate 4, 5 v1, 5 v2, 6 v1, 6 v2, 6 PLUS, and 6 FLICK.
Inkplate 10 wiring
src/content/docs/components/display/inkplate.mdx
Added the Inkplate 10 example and text describing the dual PCA6416A expander setup.
Rendering and update notes
src/content/docs/components/display/inkplate.mdx
Replaced the usage section with basic rendering, grayscale rendering, partial update notes, and updated related links.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly points to the Inkplate refactor-related update, which matches the main change.
Description check ✅ Passed The description directly states that the Inkplate docs are being updated for the refactor.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/content/docs/components/display/inkplate.mdx`:
- Around line 287-297: The Inkplate partial-update example in the display block
references IDs that are not defined in the same snippet, so it is not
self-contained. Update the example to either define the required entities in
this page’s snippet or replace the references in the lambda so it only uses
symbols introduced here, specifically the lambda, id(esptime), and
id(roboto_48). Make sure the displayed configuration can be validated on its own
without relying on earlier examples.
- Around line 39-53: The minimal Inkplate config snippet is not self-contained
because the lambda in the display example references id(my_font) without
defining that font anywhere. Update the example in inkplate.mdx so it either
includes a matching font block in the minimal configuration or changes the
lambda to use only primitives that require no extra setup, keeping the snippet
copy/paste-valid.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 78e52534-1dce-44de-9d7b-40d3470b1d28

📥 Commits

Reviewing files that changed from the base of the PR and between 88dfe51 and d44f732.

📒 Files selected for processing (1)
  • src/content/docs/components/display/inkplate.mdx

Comment on lines 39 to 53
```yaml
# Example minimal configuration entry
i2c:

mcp23017:
- id: mcp23017_hub
pca6416a:
- id: pca6416a_hub
address: 0x20

display:
- platform: inkplate
id: inkplate_display
greyscale: false
partial_updating: false
update_interval: 60s
model: inkplate_6

ckv_pin: 32
sph_pin: 33
gmod_pin:
mcp23xxx: mcp23017_hub
number: 1
gpio0_enable_pin:
mcp23xxx: mcp23017_hub
number: 8
oe_pin:
mcp23xxx: mcp23017_hub
number: 0
spv_pin:
mcp23xxx: mcp23017_hub
number: 2
powerup_pin:
mcp23xxx: mcp23017_hub
number: 4
wakeup_pin:
mcp23xxx: mcp23017_hub
number: 3
vcom_pin:
mcp23xxx: mcp23017_hub
number: 5
- platform: inkplate
model: inkplate6v2
pca6416a_id: pca6416a_hub
update_interval: 60s
lambda: |-
it.print(0, 0, id(my_font), "Hello World!");
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Make the minimal config snippet self-contained.

Line 52 uses id(my_font), but this example never defines that font. Because this block is labeled "Minimal Configuration", copy/paste users will hit an unresolved-ID validation error. Either add a matching font: block or switch the lambda to primitives that need no extra setup.

Suggested doc fix
 display:
   - platform: inkplate
     model: inkplate6v2
     pca6416a_id: pca6416a_hub
     update_interval: 60s
     lambda: |-
-      it.print(0, 0, id(my_font), "Hello World!");
+      it.fill(COLOR_OFF);
+      it.rectangle(10, 10, 120, 60);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
```yaml
# Example minimal configuration entry
i2c:
mcp23017:
- id: mcp23017_hub
pca6416a:
- id: pca6416a_hub
address: 0x20
display:
- platform: inkplate
id: inkplate_display
greyscale: false
partial_updating: false
update_interval: 60s
model: inkplate_6
ckv_pin: 32
sph_pin: 33
gmod_pin:
mcp23xxx: mcp23017_hub
number: 1
gpio0_enable_pin:
mcp23xxx: mcp23017_hub
number: 8
oe_pin:
mcp23xxx: mcp23017_hub
number: 0
spv_pin:
mcp23xxx: mcp23017_hub
number: 2
powerup_pin:
mcp23xxx: mcp23017_hub
number: 4
wakeup_pin:
mcp23xxx: mcp23017_hub
number: 3
vcom_pin:
mcp23xxx: mcp23017_hub
number: 5
- platform: inkplate
model: inkplate6v2
pca6416a_id: pca6416a_hub
update_interval: 60s
lambda: |-
it.print(0, 0, id(my_font), "Hello World!");
```
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/content/docs/components/display/inkplate.mdx` around lines 39 - 53, The
minimal Inkplate config snippet is not self-contained because the lambda in the
display example references id(my_font) without defining that font anywhere.
Update the example in inkplate.mdx so it either includes a matching font block
in the minimal configuration or changes the lambda to use only primitives that
require no extra setup, keeping the snippet copy/paste-valid.

Comment on lines +287 to 297
```yaml
display:
- platform: inkplate
id: inkplate_display
greyscale: true
partial_updating: false
update_interval: never
model: inkplate_10

ckv_pin: 32
sph_pin: 33
gmod_pin:
pca6416a: pca6416a_hub
number: 1
gpio0_enable_pin:
pca6416a: pca6416a_hub
number: 8
oe_pin:
pca6416a: pca6416a_hub
number: 0
spv_pin:
pca6416a: pca6416a_hub
number: 2
powerup_pin:
pca6416a: pca6416a_hub
number: 4
wakeup_pin:
pca6416a: pca6416a_hub
number: 3
vcom_pin:
pca6416a: pca6416a_hub
number: 5
model: inkplate6v2
pca6416a_id: pca6416a_hub
full_update_every: 10
update_interval: 5s
lambda: |-
it.fill(COLOR_OFF);
it.strftime(400, 300, id(roboto_48), COLOR_ON, TextAlign::CENTER, "%H:%M:%S", id(esptime).now());
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

The partial-update example references undeclared IDs.

Line 296 uses id(esptime), which is never defined anywhere on this page, and id(roboto_48) only exists in a different snippet. As written, this block cannot be used independently and will fail validation unless readers infer missing setup.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/content/docs/components/display/inkplate.mdx` around lines 287 - 297, The
Inkplate partial-update example in the display block references IDs that are not
defined in the same snippet, so it is not self-contained. Update the example to
either define the required entities in this page’s snippet or replace the
references in the lambda so it only uses symbols introduced here, specifically
the lambda, id(esptime), and id(roboto_48). Make sure the displayed
configuration can be validated on its own without relying on earlier examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant