Average Four Most Recent

Will most likely do this with a dictionary; one key for each day of the week.

Macro should prompt user to enter an integer each day. Entry will be 1 to 100.

I'll most likely use two or three triggers. Time of day and/or a webhook will tell when there's probably an entry ready. This to enable floating button. Tapping button prompts user to enter number.

Part of what macro should do with the entry is average today's with most recent three days. If one of those entries is skipped, as in a value of 0 on Thursday to mean user entered nothing valid yesterday, would like option also to add in the late entry as needed.

The particular purpose I have in mind is Fitbit sleep scores. There was no way to send them to 3rd party services last I checked, so doing it with manual entry. I'll also have other uses for similar action sets.

I know more than one way to do all this. I doubt I know the most efficient way, though.
 

MacroDroidDev

Administrator
Staff member
Just something to explore but perhaps you could use something like this to auto extract the score from the screen in the fitbit app.

T: Shake Device
A: Read Screen Contents -> Read a particular id into a variable.
C: Application Foreground (Fitbit)

The data structure really depends on how you want to process the data in the future but you could use something like this:

Years (Dictionary)
| - 2022 (Dictionary)
| - Day 1 (Integer)
| - Day 2 (Integer)

You can obviously tweak this as need and nest under months or week numbers if preferred.
 
Top