Use device class naming for SimpliSafe (#96093)

This commit is contained in:
Joost Lekkerkerker 2023-07-08 01:42:19 +02:00 committed by GitHub
parent 7f184e05e3
commit a0d54e8f4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 2 deletions

View File

@ -127,6 +127,7 @@ class SimpliSafeAlarm(SimpliSafeEntity, AlarmControlPanelEntity):
AlarmControlPanelEntityFeature.ARM_HOME AlarmControlPanelEntityFeature.ARM_HOME
| AlarmControlPanelEntityFeature.ARM_AWAY | AlarmControlPanelEntityFeature.ARM_AWAY
) )
_attr_name = None
def __init__(self, simplisafe: SimpliSafe, system: SystemType) -> None: def __init__(self, simplisafe: SimpliSafe, system: SystemType) -> None:
"""Initialize the SimpliSafe alarm.""" """Initialize the SimpliSafe alarm."""

View File

@ -111,7 +111,6 @@ class BatteryBinarySensor(SimpliSafeEntity, BinarySensorEntity):
"""Initialize.""" """Initialize."""
super().__init__(simplisafe, system, device=device) super().__init__(simplisafe, system, device=device)
self._attr_name = "Battery"
self._attr_unique_id = f"{super().unique_id}-battery" self._attr_unique_id = f"{super().unique_id}-battery"
self._device: DeviceV3 self._device: DeviceV3

View File

@ -44,7 +44,7 @@ async def _async_clear_notifications(system: System) -> None:
BUTTON_DESCRIPTIONS = ( BUTTON_DESCRIPTIONS = (
SimpliSafeButtonDescription( SimpliSafeButtonDescription(
key=BUTTON_KIND_CLEAR_NOTIFICATIONS, key=BUTTON_KIND_CLEAR_NOTIFICATIONS,
name="Clear notifications", translation_key=BUTTON_KIND_CLEAR_NOTIFICATIONS,
push_action=_async_clear_notifications, push_action=_async_clear_notifications,
), ),
) )

View File

@ -29,5 +29,12 @@
} }
} }
} }
},
"entity": {
"button": {
"clear_notifications": {
"name": "Clear notifications"
}
}
} }
} }