strautomator / core

Strautomator Core
MIT License
41 stars 5 forks source link

Ride/Run Type #7

Closed IOneRu closed 3 years ago

IOneRu commented 3 years ago

could You add an automatic Ride/Run Type and Bike/Shoes changing action

igoramadas commented 3 years ago

Could you please describe your use case? I checked the API and it's possible to change the activity type, but it would be great to have a concrete example before I start working on it.

IOneRu commented 3 years ago

I use the service to automate the description of the workout. For example if I add "Long" in the title, servise change:

And I want to have options to change the Run Type to Long Run and shoes to my pair for long runs. thanks.

igoramadas commented 3 years ago

There's no "Long Run" on the list of activity types. Only "Run".

Strautomator does not act on updated activities, only newly created ones. So if you manually change the title or description of an activity, your automations will not be triggered.

I suppose that if it's a long run, it's taking more than X hours to complete, right? So you can create the automation based on moving time. For instance, if it takes longer than 2 hours and 15 minutes:

-- If Activity type - is - Run If Moving time - is more than - 02:15

Set Activity name: Long Run

Set Activity description: Training target: Long run, Running. Warmup: 10 minutes in zones 1-2. Work: * minutes in zone 2. Cooldown: 5 minutes in zones 1-2. #timemap

Please let me know if that works for you.

IOneRu commented 3 years ago

work's good, thanks.