Skip to content

Commit

Permalink
Fix LockEntityFeature for button lock (#688)
Browse files Browse the repository at this point in the history
  • Loading branch information
SukramJ authored Jul 26, 2024
1 parent 76e6ce4 commit 1536dd5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion custom_components/homematicip_local/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,15 @@ def async_add_lock(hm_entities: tuple[BaseLock, ...]) -> None:
class HaHomematicLock(HaHomematicGenericRestoreEntity[BaseLock], LockEntity):
"""Representation of the HomematicIP lock entity."""

_attr_supported_features = LockEntityFeature.OPEN
def __init__(
self,
control_unit: ControlUnit,
hm_entity: BaseLock,
) -> None:
"""Initialize the lock entity."""
super().__init__(control_unit=control_unit, hm_entity=hm_entity)
if hm_entity.supports_open:
self._attr_supported_features = LockEntityFeature.OPEN

@property
def is_locked(self) -> bool | None:
Expand Down

0 comments on commit 1536dd5

Please sign in to comment.