From 5c03bba5a10130489bb33897a1952ca426bd725a Mon Sep 17 00:00:00 2001 From: Cosimo Meli Date: Fri, 2 Feb 2024 14:28:54 +0000 Subject: [PATCH] Add last_ sensors to other --- homeassistant/components/ring/coordinator.py | 2 +- homeassistant/components/ring/sensor.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/ring/coordinator.py b/homeassistant/components/ring/coordinator.py index 5b6412caffa..636d8eb069f 100644 --- a/homeassistant/components/ring/coordinator.py +++ b/homeassistant/components/ring/coordinator.py @@ -77,7 +77,7 @@ class RingDataCoordinator(DataUpdateCoordinator[dict[int, RingDeviceData]]): try: history_task = None async with TaskGroup() as tg: - if hasattr(device, "history"): + if device.has_capability("history"): history_task = tg.create_task( _call_api( self.hass, diff --git a/homeassistant/components/ring/sensor.py b/homeassistant/components/ring/sensor.py index 1e2fa5b7f08..17b61a61b68 100644 --- a/homeassistant/components/ring/sensor.py +++ b/homeassistant/components/ring/sensor.py @@ -183,7 +183,7 @@ SENSOR_TYPES: tuple[RingSensorEntityDescription, ...] = ( RingSensorEntityDescription( key="last_activity", translation_key="last_activity", - category=["doorbots", "authorized_doorbots", "stickup_cams"], + category=["doorbots", "authorized_doorbots", "stickup_cams", "other"], icon="mdi:history", device_class=SensorDeviceClass.TIMESTAMP, cls=HistoryRingSensor, @@ -191,7 +191,7 @@ SENSOR_TYPES: tuple[RingSensorEntityDescription, ...] = ( RingSensorEntityDescription( key="last_ding", translation_key="last_ding", - category=["doorbots", "authorized_doorbots"], + category=["doorbots", "authorized_doorbots", "other"], icon="mdi:history", kind="ding", device_class=SensorDeviceClass.TIMESTAMP,