-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow touchscreen binary_sensor to use raw touch values #4698
Conversation
WalkthroughThe touchscreen component documentation has been updated with an optional configuration variable named Changes
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
components/touchscreen/index.rst (1)
63-63
: Clarify the new optionaldimensions
configuration variable.The added line clearly states that the touchscreen’s dimensions can differ from the display. However, consider adding a brief note on the expected format (i.e. a string in the form
COLUMNSxROWS
or the alternative of specifyingwidth
andheight
separately) to ensure users can configure it without ambiguity.For example, you might update the wording as follows:
-**dimensions** (*Optional*): Some touch screens cover more area than just the display, to (for instance) provide touch buttons below the screen. Either provide ``COLUMNSxROWS`` or set ``width`` and ``height`` individually if your touch screen doesn't have the same dimensions as your display. An example of this is the M5Stack Core2, which has a display of 320x240 and a touchscreen of 320x280. The additional 40px are used for 3 touch buttons under the display. +**dimensions** (*Optional*): In some cases, the touchscreen’s active area may extend beyond the display. Specify this by either providing a string in the format ``COLUMNSxROWS`` or by setting the keys ``width`` and ``height`` separately if the touchscreen dimensions differ from the display dimensions. For example, the M5Stack Core2 has a display of 320x240 and a touchscreen of 320x280, where the extra 40 pixels accommodate three additional touch buttons.This added clarification can help guide users better when configuring their device.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
components/touchscreen/index.rst
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**`: - Do not generate or add any sequence diagrams
**
: - Do not generate or add any sequence diagrams
components/touchscreen/index.rst
✅ Deploy Preview for esphome ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Please rebase your branch onto next |
25125ee
to
037155d
Compare
037155d
to
47814e6
Compare
changed branch to merge into, and updated the PR with the latest changes from the Esphome side |
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Description:
Some touch screens cover more area than just the display, to (fi) provide touch buttons under the screen. The M5Stack Core2 is such a unit: it has a 320x240 display, but a 320x280 touch screen and it uses the bottom 40px of the touch screen for three "buttons". Currently the touchscreen implementation scales all touch coordinates to the underlying display dimensions. This PR allows someone to optionally specify the touchscreen binary_sensor to use raw x/y touch values, so touches outside of the display area can be used.
Related issue (if applicable): fixes esphome/issues#5314
Pull request in esphome with YAML changes (if applicable): esphome/esphome#8296
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
/index.rst
when creating new documents for new components or cookbook.