Skip to content

Conversation

@tuct
Copy link
Contributor

@tuct tuct commented Feb 1, 2026

Description:

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 /components/_index.md when creating new documents for new components or cookbook.

Added set_buffer to tm1637

dhoeben and others added 12 commits January 29, 2026 22:42
* Add ir/rf proxy to ready made projects

* copy

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update themes/esphome-theme/layouts/_default/projects.html

Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>

---------

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
esphome[bot]
esphome bot previously requested changes Feb 1, 2026
Copy link

@esphome esphome bot left a comment

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
Copy link

esphome bot commented Feb 1, 2026

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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds documentation for writing raw segment bytes to TM1637 displays via the new set_buffer API.

Changes:

  • Documented a new “Raw segment buffer” section describing set_buffer usage.
  • Added a YAML/lambda example showing raw segment values and decimal point (bit 7 / 0x80).

Comment on lines +125 to +126


Copy link

Copilot AI Feb 1, 2026

Choose a reason for hiding this comment

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

There are two consecutive empty lines here before the “Creating a digital clock” heading. Please remove the extra blank lines to keep spacing consistent with the rest of the document.

Suggested change

Copilot uses AI. Check for mistakes.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 1, 2026

Walkthrough

Added documentation for the TM1637 display's raw segment buffer feature, describing the set_buffer method that allows writing raw bytes directly to the display buffer to create custom glyphs and animations.

Changes

Cohort / File(s) Summary
TM1637 Display Documentation
content/components/display/tm1637.md
New "Raw segment buffer" section documenting direct buffer writing via set_buffer, including byte-per-digit format, decimal point bit positioning (0x80), and YAML usage example.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add set_buffer to tm1637' directly and accurately summarizes the main change: adding documentation for the set_buffer feature to the TM1637 display component.
Description check ✅ Passed The description is related to the changeset, explaining that it adds documentation for a new TM1637 feature (set_buffer) with a corresponding code PR reference, which aligns with the documented changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@content/components/display/tm1637.md`:
- Around line 125-126: Remove the multiple consecutive blank lines in the TM1637
display markdown section and collapse them to a single blank line so the file no
longer has consecutive empty lines; edit the tm1637.md content around the
documented display section to leave only one blank line between
paragraphs/headings.
- Around line 191-198: Clarify that the TM1637::set_buffer call always expects
six bytes corresponding to the hardware's full 6-digit buffer (even if your
config uses length: 4), and update the example/description around the lambda and
set_buffer usage to state that unused digit positions must be padded (e.g., with
0x00) so callers know to always supply six values to set_buffer.

Comment on lines +125 to +126


Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Remove extra blank lines to satisfy lint.

Lint reports multiple consecutive blank lines here. Collapse to a single blank line.

🔧 Proposed fix
-
-
📝 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
🧰 Tools
🪛 GitHub Check: Lint

[failure] 126-126:
Multiple consecutive blank lines [Expected: 1; Actual: 3]


[failure] 125-125:
Multiple consecutive blank lines [Expected: 1; Actual: 2]

🤖 Prompt for AI Agents
In `@content/components/display/tm1637.md` around lines 125 - 126, Remove the
multiple consecutive blank lines in the TM1637 display markdown section and
collapse them to a single blank line so the file no longer has consecutive empty
lines; edit the tm1637.md content around the documented display section to leave
only one blank line between paragraphs/headings.

Comment on lines +191 to +198
```yaml
display:
- platform: tm1637
# ...
lambda: |-
// Raw segment values for "0123" with the dot on the last digit
it.set_buffer(0x3f, 0x06, 0x5b, 0x4f | 0x80, 0x00, 0x00);
```
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# Find tm1637-related source files
find . -type f \( -name "*tm1637*" -o -name "*TM1637*" \) | head -20

Repository: esphome/esphome-docs

Length of output: 361


🏁 Script executed:

# Search for set_buffer method definition in cpp/h files
rg -l 'set_buffer' --type=cpp

Repository: esphome/esphome-docs

Length of output: 212


🏁 Script executed:

# Look for TM1637 class/component definition
rg 'class.*TM1637' --type=cpp -A 10

Repository: esphome/esphome-docs

Length of output: 212


🏁 Script executed:

# Read the tm1637.md file to see the full context
wc -l ./content/components/display/tm1637.md

Repository: esphome/esphome-docs

Length of output: 106


🏁 Script executed:

# Read the section around lines 191-198 to get more context
sed -n '170,220p' ./content/components/display/tm1637.md

Repository: esphome/esphome-docs

Length of output: 1227


🏁 Script executed:

# Search for "set_buffer" in the documentation
rg -n 'set_buffer' ./content/components/display/tm1637.md -B5 -A5

Repository: esphome/esphome-docs

Length of output: 825


🏁 Script executed:

# Search for "buffer" references to understand sizing
rg -n -i 'buffer' ./content/components/display/tm1637.md

Repository: esphome/esphome-docs

Length of output: 280


🏁 Script executed:

# Check what's in the See Also section and look for API references
sed -n '200,204p' ./content/components/display/tm1637.md

Repository: esphome/esphome-docs

Length of output: 252


🏁 Script executed:

# Search for any other mentions of buffer or configuration examples
rg -n 'lambda' ./content/components/display/tm1637.md

Repository: esphome/esphome-docs

Length of output: 504


🏁 Script executed:

# Look for configuration documentation that might mention display dimensions
rg -n -i 'digit\|config\|buffer' ./content/components/display/tm1637.md | head -20

Repository: esphome/esphome-docs

Length of output: 46


🏁 Script executed:

# Read the first part of the file to understand configuration structure
sed -n '1,100p' ./content/components/display/tm1637.md

Repository: esphome/esphome-docs

Length of output: 4765


🏁 Script executed:

# Look for all lambda examples to see if there's a pattern
rg -n 'it\.' ./content/components/display/tm1637.md

Repository: esphome/esphome-docs

Length of output: 596


Clarify set_buffer byte count to match TM1637 buffer capacity.

The example passes 6 bytes (the TM1637 hardware buffer size supporting up to 6 digits), but this isn't explained. Readers seeing a 4-digit length: 4 config may expect only 4 bytes. Add a note that set_buffer always requires 6 bytes representing the full buffer capacity, with unused positions padded as needed (e.g., 0x00).

🤖 Prompt for AI Agents
In `@content/components/display/tm1637.md` around lines 191 - 198, Clarify that
the TM1637::set_buffer call always expects six bytes corresponding to the
hardware's full 6-digit buffer (even if your config uses length: 4), and update
the example/description around the lambda and set_buffer usage to state that
unused digit positions must be padded (e.g., with 0x00) so callers know to
always supply six values to set_buffer.

@netlify
Copy link

netlify bot commented Feb 1, 2026

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit 3de0e43
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/6980f651deb95a0008eabc8e
😎 Deploy Preview https://deploy-preview-6021--esphome.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@tuct tuct changed the base branch from current to next February 2, 2026 18:45
@esphome esphome bot added the next label Feb 2, 2026
@esphome esphome bot dismissed their stale review February 2, 2026 18:45

Base branch has been corrected - dismissing previous review.

@esphome esphome bot removed the current label Feb 2, 2026
dhoeben and others added 15 commits February 2, 2026 19:50
* Add ir/rf proxy to ready made projects

* copy

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update themes/esphome-theme/layouts/_default/projects.html

Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>

---------

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
@tuct tuct closed this Feb 2, 2026
@tuct
Copy link
Contributor Author

tuct commented Feb 2, 2026

re-create clean

@github-actions github-actions bot locked and limited conversation to collaborators Feb 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants