Skip to content
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

Add option to update camera & template tile when 'in view' #4185

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

jpelgrom
Copy link
Member

@jpelgrom jpelgrom commented Feb 2, 2024

Summary

Implements #4007: use the onTileEnterEvent callback to request an update to the tile once it enters the view. Considering that this callback exists it's probably safe to assume an update that is requested in this callback won't be throttled (at least it appears to work during testing).

Includes a minor edit to the refresh interval picker to ensure strings that are more than one line look a bit nicer - originally the string I used was 2 lines but I made it shorter to fit in one instead.

Screenshots

Setting:
Refresh interval picker with the option 'On view' centered

Demo video:

PXL_20240202_203035614.TS.-.Trim.mp4

('On view' was changed to 'In view' after taking the screenshot and video)

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#1029

Any other notes

 - Use the tile enter callback to request an update to the tile once it enters the view. Considering that this callback exists it's probably safe to assume an update that is requested in this callback won't be throttled (at least it appears to work during testing).
 - Minor edit to the refresh interval picker to ensure strings that are more than one line look a bit nicer.
@JBassett JBassett merged commit 98f3d7a into home-assistant:master Feb 2, 2024
4 checks passed
@jpelgrom jpelgrom deleted the tile-refresh-on-enter branch February 2, 2024 21:45
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.

WearOS: Add option to refresh template tile when in view
2 participants