diff --git a/homeassistant/components/garmin_connect/const.py b/homeassistant/components/garmin_connect/const.py index e38bd72c1ee..b5faeab77b4 100644 --- a/homeassistant/components/garmin_connect/const.py +++ b/homeassistant/components/garmin_connect/const.py @@ -256,21 +256,21 @@ GARMIN_ENTITY_LIST = { "brpm", "mdi:progress-clock", None, - True, + False, ], "lowestRespirationValue": [ "Lowest Respiration", "brpm", "mdi:progress-clock", None, - True, + False, ], "latestRespirationValue": [ "Latest Respiration", "brpm", "mdi:progress-clock", None, - True, + False, ], "latestRespirationTimeGMT": [ "Latest Respiration Update", diff --git a/homeassistant/components/garmin_connect/sensor.py b/homeassistant/components/garmin_connect/sensor.py index 737d53b2109..d3f95b162bf 100644 --- a/homeassistant/components/garmin_connect/sensor.py +++ b/homeassistant/components/garmin_connect/sensor.py @@ -165,12 +165,16 @@ class GarminConnectSensor(Entity): return data = self._data.data - if "Duration" in self._type and data[self._type]: - self._state = data[self._type] // 60 - elif "Seconds" in self._type and data[self._type]: - self._state = data[self._type] // 60 - else: - self._state = data[self._type] + try: + if "Duration" in self._type and data[self._type]: + self._state = data[self._type] // 60 + elif "Seconds" in self._type and data[self._type]: + self._state = data[self._type] // 60 + else: + self._state = data[self._type] + except KeyError: + _LOGGER.debug("Entity type %s not found in fetched data", self._type) + return _LOGGER.debug( "Entity %s set to state %s %s", self._type, self._state, self._unit