Fix bug with how SimpliSafe lock's respond to websocket events (#60152)

This commit is contained in:
Aaron Bach 2021-11-22 12:28:22 -07:00 committed by GitHub
parent 93ad486439
commit c87ab574a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,7 +99,7 @@ class SimpliSafeLock(SimpliSafeEntity, LockEntity):
"""Update the entity when new data comes from the websocket."""
if TYPE_CHECKING:
assert event.event_type
if state := STATE_MAP_FROM_WEBSOCKET_EVENT.get(event.event_type):
if state := STATE_MAP_FROM_WEBSOCKET_EVENT.get(event.event_type) is not None:
self._attr_is_locked = state
self.async_reset_error_count()
else: