Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions homeassistant/components/nuki/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,10 @@ async def async_setup_entry(
class NukiDoorsensorEntity(NukiEntity, BinarySensorEntity):
"""Representation of a Nuki Lock Doorsensor."""

_attr_has_entity_name = True
_attr_name = "Door sensor"
_attr_device_class = BinarySensorDeviceClass.DOOR

@property
def name(self):
"""Return the name of the lock."""
return self._nuki_device.name
Comment thread
Nardol marked this conversation as resolved.
Outdated

@property
def unique_id(self) -> str:
"""Return a unique ID."""
Expand Down
6 changes: 1 addition & 5 deletions homeassistant/components/nuki/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,9 @@ async def async_setup_entry(
class NukiDeviceEntity(NukiEntity, LockEntity, ABC):
"""Representation of a Nuki device."""

_attr_has_entity_name = True
Comment thread
Nardol marked this conversation as resolved.
_attr_supported_features = LockEntityFeature.OPEN

@property
def name(self) -> str | None:
"""Return the name of the lock."""
return self._nuki_device.name

@property
def unique_id(self) -> str | None:
"""Return a unique ID."""
Expand Down