Add last_ sensors to other

This commit is contained in:
Cosimo Meli
2024-02-02 14:28:54 +00:00
parent 03bd9e4c96
commit 5c03bba5a1
2 changed files with 3 additions and 3 deletions

View File

@@ -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,

View File

@@ -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,