Add has entity name to Blink (#96322)
This commit is contained in:
parent
b106ca7983
commit
7d2559e6a5
3 changed files with 4 additions and 1 deletions
|
@ -58,13 +58,14 @@ async def async_setup_entry(
|
|||
class BlinkBinarySensor(BinarySensorEntity):
|
||||
"""Representation of a Blink binary sensor."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
|
||||
def __init__(
|
||||
self, data, camera, description: BinarySensorEntityDescription
|
||||
) -> None:
|
||||
"""Initialize the sensor."""
|
||||
self.data = data
|
||||
self.entity_description = description
|
||||
self._attr_name = f"{DOMAIN} {camera} {description.name}"
|
||||
self._camera = data.cameras[camera]
|
||||
self._attr_unique_id = f"{self._camera.serial}-{description.key}"
|
||||
self._attr_device_info = DeviceInfo(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue