Use device class naming in keenteic ndms2 (#96701)

This commit is contained in:
Joost Lekkerkerker 2023-07-17 09:14:02 +02:00 committed by GitHub
parent f0fb09c2be
commit bd22cfc1d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,16 +28,12 @@ class RouterOnlineBinarySensor(BinarySensorEntity):
_attr_device_class = BinarySensorDeviceClass.CONNECTIVITY
_attr_should_poll = False
_attr_has_entity_name = True
def __init__(self, router: KeeneticRouter) -> None:
"""Initialize the APCUPSd binary device."""
self._router = router
@property
def name(self):
"""Return the name of the online status sensor."""
return f"{self._router.name} Online"
@property
def unique_id(self) -> str:
"""Return a unique identifier for this device."""