Skip to content

Commit

Permalink
removing unused id and log
Browse files Browse the repository at this point in the history
  • Loading branch information
imhotep committed Mar 1, 2024
1 parent 84a5b55 commit 10f87dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion custom_components/unifi_access/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ class AccessEventEntity(EventEntity):
def __init__(self, hass: HomeAssistant, door) -> None:
"""Initialize Unifi Access Door Lock."""
self.hass = hass
self.id = door.id
self.door: UnifiAccessDoor = door
self._attr_unique_id = f"{self.door.id}_access"
self._attr_name = f"{self.door.name} Access"
Expand Down
4 changes: 2 additions & 2 deletions custom_components/unifi_access/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ def on_message(self, ws: websocket.WebSocketApp, message):
"""
event = None
event_attributes = None
# _LOGGER.info(f"Got update {message}")
if "Hello" not in message:
update = json.loads(message)
existing_door = None
Expand All @@ -207,9 +206,10 @@ def on_message(self, ws: websocket.WebSocketApp, message):
existing_door = self.doors[door_id]
existing_door.door_position_status = update["data"]["status"]
_LOGGER.info(
"DPS Change of door %s with ID %s Updated",
"DPS Change for existing door %s with ID %s status: %s",
existing_door.name,
door_id,
update["data"]["status"],
)
case "access.data.device.remote_unlock":
door_id = update["data"]["unique_id"]
Expand Down

0 comments on commit 10f87dc

Please sign in to comment.