Skip to content

Add external queries for records and statistics - #501

Merged
Razeeman merged 3 commits into
Razeeman:devfrom
Daksh777:dev
Sep 30, 2026
Merged

Razeeman merged 3 commits into
Razeeman:devfrom
Daksh777:dev

Conversation

@Daksh777

Copy link
Copy Markdown
Contributor

Adds two broadcast queries, mirroring the Wear API as per our discussion in #452:

  • ACTION_QUERY_RECORDS: the full record list for one day
  • ACTION_QUERY_STATISTICS: the statistics for one day

Both take an optional shift extra (days from today, 0 = today) and answer with a JSON broadcast. Statistics also take a filter type (activity, category or tag). They respect the "receive queries" setting.

The records and statistics logic from the Wear API is now in a shared WearQueryInteractor in core, so the watch and these queries return the same data.

I also listed both queries in the automation help screen.

@Razeeman
Razeeman merged commit e229fcd into Razeeman:dev Sep 30, 2026
1 check passed
@Razeeman

Copy link
Copy Markdown
Owner

Looks good! Thank you very much.

@Daksh777

Copy link
Copy Markdown
Contributor Author

Happy to help! 🫶🏻

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants