diff --git a/README.md b/README.md index 0dbca5a..0542423 100644 --- a/README.md +++ b/README.md @@ -12,4 +12,4 @@ Place the folder `bmw_connected_drive` and all it's files in the folder `custom_ See [Github Releases](https://github.com/bimmerconnected/ha_custom_component/releases/). # Version -Version `20201022.1` +Version `20201023.2` diff --git a/custom_components/bmw_connected_drive/__init__.py b/custom_components/bmw_connected_drive/__init__.py index f36bc83..1491803 100644 --- a/custom_components/bmw_connected_drive/__init__.py +++ b/custom_components/bmw_connected_drive/__init__.py @@ -197,8 +197,10 @@ def execute_service(call): vin = call.data[ATTR_VIN] vehicle = None # Double check for read_only accounts as another account could create the services - for account in filter(lambda account: not account.read_only, hass.data[DOMAIN]): - vehicle = account.get_vehicle(vin) + for entity in filter( + lambda entity: not entity.read_only, hass.data[DOMAIN].values() + ): + vehicle = entity.account.get_vehicle(vin) if not vehicle: _LOGGER.error("Could not find a vehicle for VIN %s", vin) return