diff --git a/custom_components/ha_strava/__init__.py b/custom_components/ha_strava/__init__.py index 281acc6..febf1d8 100644 --- a/custom_components/ha_strava/__init__.py +++ b/custom_components/ha_strava/__init__.py @@ -335,7 +335,10 @@ def _sensor_summary_stats(self, summary_stats: dict) -> dict: ) ), CONF_SENSOR_BIGGEST_RIDE_DISTANCE: float( - summary_stats.get(CONF_SENSOR_BIGGEST_RIDE_DISTANCE, 0) + summary_stats.get("biggest_ride_distance", 0) + ), + CONF_SENSOR_BIGGEST_ELEVATION_GAIN: float( + summary_stats.get("biggest_climb_elevation_gain", 0) ), }, }, @@ -390,9 +393,6 @@ def _sensor_summary_stats(self, summary_stats: dict) -> dict: "moving_time", 0 ) ), - CONF_SENSOR_BIGGEST_ELEVATION_GAIN: float( - summary_stats.get(CONF_SENSOR_BIGGEST_ELEVATION_GAIN, 0) - ), }, }, CONF_ACTIVITY_TYPE_SWIM: { diff --git a/custom_components/ha_strava/sensor.py b/custom_components/ha_strava/sensor.py index 8d5c6e6..9dd9fd0 100644 --- a/custom_components/ha_strava/sensor.py +++ b/custom_components/ha_strava/sensor.py @@ -260,7 +260,7 @@ def suggested_unit_of_measurement(self): @property def name(self): if self._metric == CONF_SENSOR_BIGGEST_ELEVATION_GAIN: - return "ALL Run Biggest Elevation Gain" + return "ALL Ride Biggest Elevation Gain" if self._metric == CONF_SENSOR_BIGGEST_ELEVATION_GAIN: return "ALL Ride Biggest Distance"