From 417a9af653a2260a92f334c4d3ae4472acb53867 Mon Sep 17 00:00:00 2001 From: Brett Date: Sun, 4 Feb 2024 01:24:27 +0000 Subject: [PATCH] Fix lock creation --- custom_components/teslemetry/lock.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/teslemetry/lock.py b/custom_components/teslemetry/lock.py index cf8e7e5..62fbf69 100644 --- a/custom_components/teslemetry/lock.py +++ b/custom_components/teslemetry/lock.py @@ -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 )