homeassistant-peloton-sensor icon indicating copy to clipboard operation
homeassistant-peloton-sensor copied to clipboard

Add Workout Counter Sensor

Open edwork opened this issue 1 year ago • 5 comments

Add a sensor, set of sensors, or sensor with sub-attributes that counts how many workouts a user has taken. This could be useful to watch for upcoming milestones.

edwork avatar Jul 17 '22 20:07 edwork

@Miablo can you take a look at this one?

edwork avatar Jan 16 '23 04:01 edwork

@edwork i think there is a bool value that can be read for is_milestone that can be used instead of a counter but let me look into it a bit more and see what I come up with

Miablo avatar Jan 16 '23 20:01 Miablo

Just to add to the discussion: The total number of workouts can be grabbed from the total_workouts key from the response returned by the GetMe function, which I see this integration is already calling.

Edit: There is also a breakdown based on the type of work out and the total count for each of those. It may make sense to create sensors for these, but set them as disabled by default and allow users to enable whichever one's they'd like to enable/track.

RobertD502 avatar Jan 28 '23 02:01 RobertD502

yeah that would then require a manual milestone counter for each milestone we would want to alert the user about since my interpretation of the issue wasnt to just count workouts but to be able to trigger a "this is a milestone" for whatever fitness type

Miablo avatar Jan 28 '23 02:01 Miablo

I may be recalling incorrectly, but doesn't that alert already show up for users within the peloton app (mobile, bike, tread) when in a session that is a milestone ride, run, etc.?

RobertD502 avatar Jan 28 '23 03:01 RobertD502