Skip to content

Commit

Permalink
Fix lock creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Bre77 committed Feb 4, 2024
1 parent f5cae67 commit 417a9af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/teslemetry/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ async def async_setup_entry(
data = hass.data[DOMAIN][entry.entry_id]

async_add_entities(
klass(vehicle)
klass(vehicle, Scopes.VEHICLE_CMDS in data.scopes)
for klass in (
TeslemetryLockEntity,
TeslemetryCableLockEntity,
Scopes.VEHICLE_CMDS in data.scopes,
TeslemetrySpeedLimitEntity
)
for vehicle in data.vehicles
)
Expand Down

0 comments on commit 417a9af

Please sign in to comment.