Garmin Attributes

Hi I hope someone can help, I have been trying to create a template sensor from a attribute, with no joy.
this is what I have got

Last synced
21 September 2024 at 5:57:45 pm
Last Activities

  • activityId: 17090216453
    activityName: Maldon Running
    startTimeLocal: ‘2024-09-21 09:03:29’
    startTimeGMT: ‘2024-09-21 08:03:29’
    activityType:
    typeId: 1
    typeKey: running
    parentTypeId: 17
    isHidden: false
    trimmable: true
    restricted: false
    eventType:
    typeId: 9
    typeKey: uncategorized
    sortOrder: 10
    distance: 5090.27978515625
    duration: 2128.201904296875
    elapsedDuration: 2128.201904296875
    movingDuration: 2116.5880126953125
    elevationGain: 17.010212242603302
    elevationLoss: 18.47727233171463
    averageSpeed: 2.3919999599456787
    maxSpeed: 3.186000108718872
    startLatitude: 51.72643278725445
    startLongitude: 0.6901445332914591```

The main sensor is sensor.last_activities

i’m sorry i’m not understanding your question.

can you clarify what you want the sensor to be?

is the thing you posted a different entity’s attributes that you want to use? if so, what’s it called?

you said you’ve tried to do this but it didn’t work. can you post what you tried?

I would like sensor activity name, distance, duration and pace.

the entity is the same for all sensor.last_activities

I tried GPT and all I got back was no data.

Thanks

i’m still not sure i’m getting it. you’ll have to be more verbose. gpt might also be able to answer you (i’m not a gpt hater…) but you’d need to be a lot more verbose and specific for it to work well for you.

in any case, here’s my guess as to what you mean, you can create a helper like this and set the template here like so:

the other interpretation i might have is that you want to create a sensor with the attributes being name, distance, duration and pace, but that would baffle me because your sensor.last_activites is already that plus a few other attributes which you could ignore…