Repository: bimmerconnected/bimmer_connected
Pull request #370 (2021-11-29 20:47:18)

Add is_vehicle_tracking_enabled on Vehicle
## Proposed change
<!--
  Describe the big picture of your changes here to communicate to the
  maintainers why we should accept this pull request. If it fixes a bug
  or resolves a feature request, be sure to link to that issue in the
  additional information section.
-->
Add `is_vehicle_tracking_enabled` property on `ConnectedDriveVehicle` (see https://github.com/bimmerconnected/bimmer_connected/issues/318#issuecomment-981981112).

## Type of change
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (which adds functionality to this library)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests

## Additional information
<!--
  Details are important, and help maintainers processing your PR.
  Please be sure to fill out additional details, if applicable.
-->

- This PR fixes or closes issue: fixes #
- This PR is related to issue: 

## Checklist
<!--
  Put an `x` in the boxes that apply. You can also fill these out after
  creating the PR. If you're unsure about any of them, don't hesitate to ask.
  We're here to help! This is simply a reminder of what we are going to look
  for before merging your code.
-->

- [x] The code change is tested and works locally.
- [x] Tests have been added to verify that the new code works.


codecov-commenter: # [Codecov](https://codecov.io/gh/bimmerconnected/bimmer_connected/pull/370?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected) Report
> Merging [#370](https://codecov.io/gh/bimmerconnected/bimmer_connected/pull/370?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected) (6c113ee) into [master](https://codecov.io/gh/bimmerconnected/bimmer_connected/commit/28fe9695b93f1596503cf005d31a8827c3d2a6aa?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected) (28fe969) will **increase** coverage by `0.01%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/bimmerconnected/bimmer_connected/pull/370/graphs/tree.svg?width=650&height=150&src=pr&token=qNT50j82f6&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected)](https://codecov.io/gh/bimmerconnected/bimmer_connected/pull/370?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected)

```diff
@@            Coverage Diff             @@
##           master     #370      +/-   ##
==========================================
+ Coverage   96.42%   96.43%   +0.01%     
==========================================
  Files           8        8              
  Lines         894      897       +3     
==========================================
+ Hits          862      865       +3     
  Misses         32       32              
```

| Flag | Coverage Δ | |
|---|---|---|
| 3.10.x | `96.32% <100.00%> (+0.01%)` | :arrow_up: |
| 3.6 | `96.41% <100.00%> (+0.01%)` | :arrow_up: |
| 3.7 | `96.30% <100.00%> (+0.01%)` | :arrow_up: |
| 3.8 | `96.31% <100.00%> (+0.01%)` | :arrow_up: |
| 3.9 | `96.31% <100.00%> (+0.01%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/bimmerconnected/bimmer_connected/pull/370?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected) | Coverage Δ | |
|---|---|---|
| [bimmer\_connected/vehicle.py](https://codecov.io/gh/bimmerconnected/bimmer_connected/pull/370/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected#diff-YmltbWVyX2Nvbm5lY3RlZC92ZWhpY2xlLnB5) | `98.29% <100.00%> (+0.04%)` | :arrow_up: |
| [bimmer\_connected/vehicle\_status.py](https://codecov.io/gh/bimmerconnected/bimmer_connected/pull/370/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected#diff-YmltbWVyX2Nvbm5lY3RlZC92ZWhpY2xlX3N0YXR1cy5weQ==) | `97.93% <100.00%> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/bimmerconnected/bimmer_connected/pull/370?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/bimmerconnected/bimmer_connected/pull/370?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected). Last update [28fe969...6c113ee](https://codecov.io/gh/bimmerconnected/bimmer_connected/pull/370?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected).


Patch:
diff --git a/bimmer_connected/vehicle.py b/bimmer_connected/vehicle.py
index 0f007ee..e742be6 100644
--- a/bimmer_connected/vehicle.py
+++ b/bimmer_connected/vehicle.py
@@ -137,6 +137,11 @@ class ConnectedDriveVehicle(SerializableBaseClass):
         """Return True if charging control (weekly planner) is available."""
         return self.attributes["capabilities"]["isChargingPlanSupported"]
 
+    @property
+    def is_vehicle_tracking_enabled(self) -> bool:
+        """Return True if vehicle finder is enabled in vehicle."""
+        return self.attributes["capabilities"]["vehicleFinder"]["isEnabled"]
+
     @property
     def drive_train_attributes(self) -> List[str]:
         """Get list of attributes available for the drive train of the vehicle.
diff --git a/bimmer_connected/vehicle_status.py b/bimmer_connected/vehicle_status.py
index 4a7fc42..5c3174f 100644
--- a/bimmer_connected/vehicle_status.py
+++ b/bimmer_connected/vehicle_status.py
@@ -199,7 +199,7 @@ class VehicleStatus(SerializableBaseClass):  # pylint: disable=too-many-public-m
         This only provides data, if the vehicle tracking is enabled!
         """
         if self.is_vehicle_active:
-            _LOGGER.warning('Vehicle was moving at last update, no position available')
+            _LOGGER.info('Vehicle was moving at last update, no position available')
             return None
         if not self._remote_service_position and "vehicleLocation" not in self.properties:
             _LOGGER.info("No vehicle location data available.")
@@ -224,7 +224,7 @@ class VehicleStatus(SerializableBaseClass):  # pylint: disable=too-many-public-m
         This only provides data, if the vehicle tracking is enabled!
         """
         if self.is_vehicle_active:
-            _LOGGER.warning('Vehicle was moving at last update, no position available')
+            _LOGGER.info('Vehicle was moving at last update, no position available')
             return None
 
         if not self._remote_service_position and "vehicleLocation" not in self.properties:


Test patch:
diff --git a/test/responses/F11/vehicles_v2_bmw_0.json b/test/responses/F11/vehicles_v2_bmw_0.json
index 3df7b97..b0a48f1 100644
--- a/test/responses/F11/vehicles_v2_bmw_0.json
+++ b/test/responses/F11/vehicles_v2_bmw_0.json
@@ -86,7 +86,7 @@
       },
       "vehicleFinder": {
         "executionMessage": "Find your vehicle now? Remote functions may take a few seconds.",
-        "isEnabled": true,
+        "isEnabled": false,
         "isPinAuthenticationRequired": false
       }
     },
diff --git a/test/responses/G21/json_export.json b/test/responses/G21/json_export.json
index b4d6763..f2f878f 100644
--- a/test/responses/G21/json_export.json
+++ b/test/responses/G21/json_export.json
@@ -1,1 +1,1 @@
-{"attributes": {"a4aType": "NOT_SUPPORTED", "bodyType": "G21", "brand": "BMW", "capabilities": {"canRemoteHistoryBeDeleted": false, "climateNow": {"executionMessage": "Do you want to ventilate now? Remote functions may take a few seconds.", "executionPopup": {"executionMessage": "Turn pre-conditioning on now? Remote functions may take a few seconds.", "iconId": 59733, "popupType": "DIALOG", "primaryButtonText": "Start", "secondaryButtonText": "Cancel", "title": "Start Climatization"}, "executionStopPopup": {"executionMessage": "Stop climate control in your vehicle now? Remote functions may take a few seconds.", "title": "Climate control is running"}, "isEnabled": true, "isPinAuthenticationRequired": false}, "horn": {"executionMessage": "Using your horn is only allowed in certain situations in many countries. Responsibility for the use and adherence to the respective regulations lies solely with you as the user. \n\nDo you want to use the horn now? Remote functions may take a few seconds.", "isEnabled": true, "isPinAuthenticationRequired": false}, "isBmwChargingSupported": true, "isCarSharingSupported": false, "isChargeNowForBusinessSupported": true, "isChargingHistorySupported": true, "isChargingHospitalityEnabled": false, "isChargingLoudnessEnable": false, "isChargingPlanSupported": true, "isChargingPowerLimitEnable": false, "isChargingSettingsEnabled": false, "isChargingTargetSocEnable": false, "isCustomerEsimSupported": false, "isDCSContractManagementSupported": true, "isDataPrivacyEnabled": false, "isEasyChargeSupported": false, "isEvGoChargingSupported": false, "isFindChargingEnabled": true, "isMiniChargingSupported": false, "isRemoteHistorySupported": true, "isRemoteServicesActivationRequired": false, "isRemoteServicesBookingRequired": false, "isScanAndChargeSupported": true, "lastStateCall": {"isNonLscFeatureEnabled": false, "lscState": "ACTIVATED"}, "lights": {"executionMessage": "Flash headlights now? Remote functions may take a few seconds.", "isEnabled": true, "isPinAuthenticationRequired": false}, "lock": {"executionMessage": "Lock your vehicle now? Remote functions may take a few seconds.", "isEnabled": true, "isPinAuthenticationRequired": false}, "remote360": {"isComingSoonEnabled": false, "isDataPrivacyEnabled": false, "isEnabled": true, "isPinAuthenticationRequired": false, "isToggleEnabled": true}, "remoteSoftwareUpgrade": {"isEnabled": true, "isPinAuthenticationRequired": false}, "sendPoi": {"executionMessage": "Send POI now? Remote functions may take a few seconds.", "isEnabled": true, "isPinAuthenticationRequired": false}, "speechThirdPartyAlexa": {"executionMessage": "Activate Alexa now? Remote functions may take a few seconds.", "isEnabled": true, "isPinAuthenticationRequired": false}, "unlock": {"executionMessage": "Unlock your vehicle now? Remote functions may take a few seconds.", "isEnabled": true, "isPinAuthenticationRequired": true}, "vehicleFinder": {"executionMessage": "Find your vehicle now? Remote functions may take a few seconds.", "isEnabled": true, "isPinAuthenticationRequired": false}}, "connectedDriveServices": ["WIFI_HOTSPOT_SERVICE"], "driveTrain": "PLUGIN_HYBRID", "driverGuideInfo": {"androidAppScheme": "com.bmwgroup.driversguide.row", "androidStoreUrl": "https://play.google.com/store/apps/details?id=com.bmwgroup.driversguide.row", "iosAppScheme": "bmwdriversguide:///open", "iosStoreUrl": "https://apps.apple.com/de/app/id714042749?mt=8", "title": "BMW\nDriver's Guide"}, "exFactoryILevel": "S18A-20-07-548", "exFactoryPUStep": "0720", "headUnit": "MGU", "hmiVersion": "id7", "iStep": "S18A-21-07-550", "isLscSupported": true, "isMappingPending": false, "isMappingUnconfirmed": false, "model": "330e xDrive", "puStep": "0721", "telematicsUnit": "ATM02", "themeSpecs": {"vehicleStatusBackgroundColor": {"blue": 201, "green": 94, "red": 40}}, "vin": "some_vin_G21", "year": 2020}, "status": {"status": {"chargingProfile": {"chargingControlType": "weeklyPlanner", "chargingMode": "immediateCharging", "chargingPreference": "noPreSelection", "chargingSettings": {"hospitality": "NO_ACTION", "idcc": "NO_ACTION", "isAcCurrentLimitActive": false, "targetSoc": 100}, "climatisationOn": false, "departureTimes": [{"action": "deactivate", "id": 1, "timeStamp": {"hour": 0, "minute": 0}, "timerWeekDays": []}, {"action": "deactivate", "id": 2, "timeStamp": {"hour": 0, "minute": 0}, "timerWeekDays": []}, {"action": "deactivate", "id": 3, "timeStamp": {"hour": 0, "minute": 0}, "timerWeekDays": []}, {"action": "deactivate", "id": 4, "timerWeekDays": []}], "reductionOfChargeCurrent": {"end": {"hour": 0, "minute": 0}, "start": {"hour": 0, "minute": 0}}}, "checkControlMessages": [{"criticalness": "nonCritical", "iconId": 60117, "state": "OK", "title": "Tires"}, {"criticalness": "nonCritical", "iconId": 60197, "state": "OK", "title": "Engine Oil"}], "checkControlMessagesGeneralState": "No Issues", "currentMileage": {"formattedMileage": "27138", "mileage": 27138, "units": "km"}, "doorsAndWindows": [{"criticalness": "nonCritical", "iconId": 59757, "state": "Locked", "title": "Lock status"}, {"criticalness": "nonCritical", "iconId": 59722, "state": "Closed", "title": "All doors"}, {"criticalness": "nonCritical", "iconId": 59725, "state": "Closed", "title": "All windows"}, {"criticalness": "nonCritical", "iconId": 59706, "state": "Closed", "title": "Hood"}, {"criticalness": "nonCritical", "iconId": 59704, "state": "Closed", "title": "Trunk"}, {"criticalness": "nonCritical", "iconId": 59705, "state": "Closed", "title": "Sunroof"}], "doorsGeneralState": "Locked", "fuelIndicators": [{"chargingType": null, "iconOpacity": "high", "infoIconId": 59691, "infoLabel": "Combined Range", "isCircleIcon": false, "isInaccurate": false, "levelIconId": null, "levelUnits": null, "levelValue": null, "mainBarValue": 0, "rangeIconId": 59691, "rangeUnits": "km", "rangeValue": "368", "secondaryBarValue": 0, "showsBar": false}, {"barType": null, "chargingStatusIndicatorType": "CHARGING", "chargingStatusType": "CHARGING", "chargingType": "charging", "iconOpacity": "high", "infoIconId": 59689, "infoLabel": "100% at ~12:43 AM", "isCircleIcon": true, "isInaccurate": true, "levelIconId": 59689, "levelUnits": "%", "levelValue": "83", "mainBarValue": 83, "rangeIconId": 59683, "rangeUnits": "km", "rangeValue": "23", "secondaryBarValue": 0, "showBarGoal": false, "showsBar": true}, {"chargingType": null, "iconOpacity": "high", "infoIconId": 59930, "infoLabel": "Fuel Level", "isCircleIcon": false, "isInaccurate": false, "levelIconId": 59682, "levelUnits": "%", "levelValue": "83", "mainBarValue": 83, "rangeIconId": 59681, "rangeUnits": "km", "rangeValue": "345", "secondaryBarValue": 0, "showsBar": true}], "issues": {}, "lastUpdatedAt": "2021-11-14T20:20:21Z", "recallExternalUrl": null, "recallMessages": [], "requiredServices": [{"criticalness": "nonCritical", "iconId": 60197, "id": "Oil", "longDescription": "Next service due after the specified distance or date.", "subtitle": "some_road \u2022 duration \u2022 -- EUR", "title": "Engine oil"}, {"criticalness": "nonCritical", "iconId": 60215, "id": "VehicleCheck", "longDescription": "Next vehicle check due after the specified distance or date.", "subtitle": "some_road \u2022 duration \u2022 -- EUR", "title": "Vehicle check"}, {"criticalness": "nonCritical", "iconId": 60447, "id": "TireWearFront", "subtitle": "some_road \u2022 duration \u2022 -- EUR", "title": "Tire service, front tires"}, {"criticalness": "nonCritical", "iconId": 60447, "id": "TireWearRear", "subtitle": "some_road \u2022 duration \u2022 -- EUR", "title": "Tire service, rear tires"}, {"criticalness": "nonCritical", "iconId": 60223, "id": "BrakeFluid", "longDescription": "Next service due by the specified date.", "subtitle": "some_road \u2022 duration \u2022 -- EUR", "title": "Brake fluid"}], "timestampMessage": "Updated from vehicle 11/14/2021 09:20 PM"}, "properties": {"areDoorsClosed": true, "areDoorsLocked": true, "areDoorsOpen": false, "areWindowsClosed": true, "chargingState": {"chargePercentage": 83, "isChargerConnected": true, "state": "CHARGING", "type": "NOT_AVAILABLE"}, "checkControlMessages": [], "climateControl": {"activity": "INACTIVE"}, "combinedRange": {"distance": {"units": "KILOMETERS", "value": 368}}, "combustionRange": {"distance": {"units": "KILOMETERS", "value": 368}}, "doorsAndWindows": {"doors": {"driverFront": "CLOSED", "driverRear": "CLOSED", "passengerFront": "CLOSED", "passengerRear": "CLOSED"}, "hood": "CLOSED", "moonroof": "CLOSED", "trunk": "CLOSED", "windows": {"driverFront": "CLOSED", "driverRear": "CLOSED", "passengerFront": "CLOSED", "passengerRear": "CLOSED"}}, "electricRange": {"distance": {"units": "KILOMETERS", "value": 23}}, "electricRangeAndStatus": {"chargePercentage": 83, "distance": {"units": "KILOMETERS", "value": 23}}, "fuelLevel": {"units": "LITERS", "value": 29}, "fuelPercentage": {"value": 83}, "inMotion": false, "isServiceRequired": false, "lastUpdatedAt": "2021-11-14T20:20:21Z", "originCountryISO": "DE", "serviceRequired": [{"dateTime": "2022-10-01T00:00:00.000Z", "distance": {"units": "KILOMETERS", "value": 6000}, "status": "OK", "type": "OIL"}, {"dateTime": "2024-10-01T00:00:00.000Z", "distance": {"units": "KILOMETERS", "value": 39000}, "status": "OK", "type": "VEHICLE_CHECK"}, {"status": "OK", "type": "TIRE_WEAR_FRONT"}, {"status": "OK", "type": "TIRE_WEAR_REAR"}, {"dateTime": "2023-10-01T00:00:00.000Z", "status": "OK", "type": "BRAKE_FLUID"}], "tires": {"frontLeft": {"details": {"dimension": "225/45 R18 95V XL", "manufacturer": "Pirelli", "manufacturingWeek": "35 / 19", "maxSpeed": "240 km/h", "mountingDate": "11/12/2021", "optimizedForOemBmw": "Yes", "partNumber": "2461777", "season": "Winter tires", "treadDesign": "SOTTOZERO 3"}, "status": {"currentPressure": 260, "localizedCurrentPressure": "2.6 bar", "localizedTargetPressure": "2.7 bar", "targetPressure": 270, "wear": 0}}, "frontRight": {"details": {"dimension": "225/45 R18 95V XL", "manufacturer": "Pirelli", "manufacturingWeek": "27 / 19", "maxSpeed": "240 km/h", "mountingDate": "11/12/2021", "optimizedForOemBmw": "Yes", "partNumber": "2461777", "season": "Winter tires", "treadDesign": "SOTTOZERO 3"}, "status": {"currentPressure": 250, "localizedCurrentPressure": "2.5 bar", "localizedTargetPressure": "2.7 bar", "targetPressure": 270, "wear": 0}}, "rearLeft": {"details": {"dimension": "255/40 R18 99V XL", "manufacturer": "Pirelli", "manufacturingWeek": "17 / 19", "maxSpeed": "240 km/h", "mountingDate": "11/12/2021", "optimizedForOemBmw": "Yes", "partNumber": "2461778", "season": "Winter tires", "treadDesign": "SOTTOZERO 3"}, "status": {"currentPressure": 300, "localizedCurrentPressure": "3.0 bar", "localizedTargetPressure": "2.9 bar", "targetPressure": 290, "wear": 0}}, "rearRight": {"details": {"dimension": "255/40 R18 99V XL", "manufacturer": "Pirelli", "manufacturingWeek": "26 / 19", "maxSpeed": "240 km/h", "mountingDate": "11/12/2021", "optimizedForOemBmw": "Yes", "partNumber": "2461778", "season": "Winter tires", "treadDesign": "SOTTOZERO 3"}, "status": {"currentPressure": 250, "localizedCurrentPressure": "2.5 bar", "localizedTargetPressure": "2.9 bar", "targetPressure": 290, "wear": 0}}}, "vehicleLocation": {"address": {"formatted": "some_formatted_address"}, "coordinates": {"latitude": 12.3456, "longitude": 34.5678}, "heading": 123}}, "all_lids_closed": true, "all_windows_closed": true, "are_all_cbs_ok": true, "are_parking_lights_on": null, "charging_end_time": "2011-11-29 00:43:00", "charging_level_hv": 83, "charging_status": "CHARGING", "charging_time_remaining": 3.23, "check_control_messages": [], "condition_based_services": [{"due_date": "2022-10-01 00:00:00+00:00", "state": "OK", "service_type": "OIL", "due_distance": [6000, "KILOMETERS"], "description": null}, {"due_date": "2024-10-01 00:00:00+00:00", "state": "OK", "service_type": "VEHICLE_CHECK", "due_distance": [39000, "KILOMETERS"], "description": null}, {"due_date": null, "state": "OK", "service_type": "TIRE_WEAR_FRONT", "due_distance": null, "description": null}, {"due_date": null, "state": "OK", "service_type": "TIRE_WEAR_REAR", "due_distance": null, "description": null}, {"due_date": "2023-10-01 00:00:00+00:00", "state": "OK", "service_type": "BRAKE_FLUID", "due_distance": null, "description": null}], "connection_status": "CONNECTED", "door_lock_state": "LOCKED", "fuel_indicator_count": 3, "fuel_percent": 83, "gps_heading": 123, "gps_position": [12.3456, 34.5678], "has_check_control_messages": false, "has_parking_light_state": false, "is_vehicle_active": false, "last_charging_end_result": null, "last_update_reason": "Updated from vehicle 11/14/2021 09:20 PM", "lids": [{"name": "hood", "state": "CLOSED"}, {"name": "trunk", "state": "CLOSED"}, {"name": "driverFront", "state": "CLOSED"}, {"name": "driverRear", "state": "CLOSED"}, {"name": "passengerFront", "state": "CLOSED"}, {"name": "passengerRear", "state": "CLOSED"}], "max_range_electric": null, "mileage": [27138, "km"], "open_lids": [], "open_windows": [], "parking_lights": null, "remaining_fuel": [29, "LITERS"], "remaining_range_electric": [23, "km"], "remaining_range_fuel": [345, "km"], "remaining_range_total": [368, "km"], "timestamp": "2021-11-14 20:20:21+00:00", "windows": [{"name": "driverFront", "state": "CLOSED"}, {"name": "driverRear", "state": "CLOSED"}, {"name": "passengerFront", "state": "CLOSED"}, {"name": "passengerRear", "state": "CLOSED"}, {"name": "moonroof", "state": "CLOSED"}]}, "observer_latitude": null, "observer_longitude": null, "available_attributes": ["gps_position", "vin", "remaining_range_total", "mileage", "charging_time_remaining", "charging_status", "charging_level_hv", "connection_status", "remaining_range_electric", "last_charging_end_result", "remaining_fuel", "remaining_range_fuel", "fuel_percent", "condition_based_services", "check_control_messages", "door_lock_state", "timestamp", "last_update_reason", "lids", "windows"], "available_state_services": ["status"], "brand": "bmw", "charging_profile": {"charging_profile": {"chargingControlType": "weeklyPlanner", "chargingMode": "immediateCharging", "chargingPreference": "noPreSelection", "chargingSettings": {"hospitality": "NO_ACTION", "idcc": "NO_ACTION", "isAcCurrentLimitActive": false, "targetSoc": 100}, "climatisationOn": false, "departureTimes": [{"action": "deactivate", "id": 1, "timeStamp": {"hour": 0, "minute": 0}, "timerWeekDays": []}, {"action": "deactivate", "id": 2, "timeStamp": {"hour": 0, "minute": 0}, "timerWeekDays": []}, {"action": "deactivate", "id": 3, "timeStamp": {"hour": 0, "minute": 0}, "timerWeekDays": []}, {"action": "deactivate", "id": 4, "timerWeekDays": []}], "reductionOfChargeCurrent": {"end": {"hour": 0, "minute": 0}, "start": {"hour": 0, "minute": 0}}}, "charging_mode": "immediateCharging", "charging_preferences": "noPreSelection", "is_pre_entry_climatization_enabled": false, "preferred_charging_window": {"end_time": "00:00", "start_time": "00:00"}, "timer": {"1": {"action": "deactivate", "start_time": "00:00", "timer_id": 1, "weekdays": []}, "2": {"action": "deactivate", "start_time": "00:00", "timer_id": 2, "weekdays": []}, "3": {"action": "deactivate", "start_time": "00:00", "timer_id": 3, "weekdays": []}, "4": {"action": "deactivate", "start_time": null, "timer_id": 4, "weekdays": []}}}, "drive_train": "PLUGIN_HYBRID", "drive_train_attributes": ["remaining_range_total", "mileage", "charging_time_remaining", "charging_status", "charging_level_hv", "connection_status", "remaining_range_electric", "last_charging_end_result", "remaining_fuel", "remaining_range_fuel", "fuel_percent"], "has_hv_battery": true, "has_internal_combustion_engine": true, "has_range_extender": false, "has_weekly_planner_service": true, "lsc_type": "ACTIVATED", "name": "330e xDrive"}
\ No newline at end of file
+{"attributes": {"a4aType": "NOT_SUPPORTED", "bodyType": "G21", "brand": "BMW", "capabilities": {"canRemoteHistoryBeDeleted": false, "climateNow": {"executionMessage": "Do you want to ventilate now? Remote functions may take a few seconds.", "executionPopup": {"executionMessage": "Turn pre-conditioning on now? Remote functions may take a few seconds.", "iconId": 59733, "popupType": "DIALOG", "primaryButtonText": "Start", "secondaryButtonText": "Cancel", "title": "Start Climatization"}, "executionStopPopup": {"executionMessage": "Stop climate control in your vehicle now? Remote functions may take a few seconds.", "title": "Climate control is running"}, "isEnabled": true, "isPinAuthenticationRequired": false}, "horn": {"executionMessage": "Using your horn is only allowed in certain situations in many countries. Responsibility for the use and adherence to the respective regulations lies solely with you as the user. \n\nDo you want to use the horn now? Remote functions may take a few seconds.", "isEnabled": true, "isPinAuthenticationRequired": false}, "isBmwChargingSupported": true, "isCarSharingSupported": false, "isChargeNowForBusinessSupported": true, "isChargingHistorySupported": true, "isChargingHospitalityEnabled": false, "isChargingLoudnessEnable": false, "isChargingPlanSupported": true, "isChargingPowerLimitEnable": false, "isChargingSettingsEnabled": false, "isChargingTargetSocEnable": false, "isCustomerEsimSupported": false, "isDCSContractManagementSupported": true, "isDataPrivacyEnabled": false, "isEasyChargeSupported": false, "isEvGoChargingSupported": false, "isFindChargingEnabled": true, "isMiniChargingSupported": false, "isRemoteHistorySupported": true, "isRemoteServicesActivationRequired": false, "isRemoteServicesBookingRequired": false, "isScanAndChargeSupported": true, "lastStateCall": {"isNonLscFeatureEnabled": false, "lscState": "ACTIVATED"}, "lights": {"executionMessage": "Flash headlights now? Remote functions may take a few seconds.", "isEnabled": true, "isPinAuthenticationRequired": false}, "lock": {"executionMessage": "Lock your vehicle now? Remote functions may take a few seconds.", "isEnabled": true, "isPinAuthenticationRequired": false}, "remote360": {"isComingSoonEnabled": false, "isDataPrivacyEnabled": false, "isEnabled": true, "isPinAuthenticationRequired": false, "isToggleEnabled": true}, "remoteSoftwareUpgrade": {"isEnabled": true, "isPinAuthenticationRequired": false}, "sendPoi": {"executionMessage": "Send POI now? Remote functions may take a few seconds.", "isEnabled": true, "isPinAuthenticationRequired": false}, "speechThirdPartyAlexa": {"executionMessage": "Activate Alexa now? Remote functions may take a few seconds.", "isEnabled": true, "isPinAuthenticationRequired": false}, "unlock": {"executionMessage": "Unlock your vehicle now? Remote functions may take a few seconds.", "isEnabled": true, "isPinAuthenticationRequired": true}, "vehicleFinder": {"executionMessage": "Find your vehicle now? Remote functions may take a few seconds.", "isEnabled": true, "isPinAuthenticationRequired": false}}, "connectedDriveServices": ["WIFI_HOTSPOT_SERVICE"], "driveTrain": "PLUGIN_HYBRID", "driverGuideInfo": {"androidAppScheme": "com.bmwgroup.driversguide.row", "androidStoreUrl": "https://play.google.com/store/apps/details?id=com.bmwgroup.driversguide.row", "iosAppScheme": "bmwdriversguide:///open", "iosStoreUrl": "https://apps.apple.com/de/app/id714042749?mt=8", "title": "BMW\nDriver's Guide"}, "exFactoryILevel": "S18A-20-07-548", "exFactoryPUStep": "0720", "headUnit": "MGU", "hmiVersion": "id7", "iStep": "S18A-21-07-550", "isLscSupported": true, "isMappingPending": false, "isMappingUnconfirmed": false, "model": "330e xDrive", "puStep": "0721", "telematicsUnit": "ATM02", "themeSpecs": {"vehicleStatusBackgroundColor": {"blue": 201, "green": 94, "red": 40}}, "vin": "some_vin_G21", "year": 2020}, "status": {"status": {"chargingProfile": {"chargingControlType": "weeklyPlanner", "chargingMode": "immediateCharging", "chargingPreference": "noPreSelection", "chargingSettings": {"hospitality": "NO_ACTION", "idcc": "NO_ACTION", "isAcCurrentLimitActive": false, "targetSoc": 100}, "climatisationOn": false, "departureTimes": [{"action": "deactivate", "id": 1, "timeStamp": {"hour": 0, "minute": 0}, "timerWeekDays": []}, {"action": "deactivate", "id": 2, "timeStamp": {"hour": 0, "minute": 0}, "timerWeekDays": []}, {"action": "deactivate", "id": 3, "timeStamp": {"hour": 0, "minute": 0}, "timerWeekDays": []}, {"action": "deactivate", "id": 4, "timerWeekDays": []}], "reductionOfChargeCurrent": {"end": {"hour": 0, "minute": 0}, "start": {"hour": 0, "minute": 0}}}, "checkControlMessages": [{"criticalness": "nonCritical", "iconId": 60117, "state": "OK", "title": "Tires"}, {"criticalness": "nonCritical", "iconId": 60197, "state": "OK", "title": "Engine Oil"}], "checkControlMessagesGeneralState": "No Issues", "currentMileage": {"formattedMileage": "27138", "mileage": 27138, "units": "km"}, "doorsAndWindows": [{"criticalness": "nonCritical", "iconId": 59757, "state": "Locked", "title": "Lock status"}, {"criticalness": "nonCritical", "iconId": 59722, "state": "Closed", "title": "All doors"}, {"criticalness": "nonCritical", "iconId": 59725, "state": "Closed", "title": "All windows"}, {"criticalness": "nonCritical", "iconId": 59706, "state": "Closed", "title": "Hood"}, {"criticalness": "nonCritical", "iconId": 59704, "state": "Closed", "title": "Trunk"}, {"criticalness": "nonCritical", "iconId": 59705, "state": "Closed", "title": "Sunroof"}], "doorsGeneralState": "Locked", "fuelIndicators": [{"chargingType": null, "iconOpacity": "high", "infoIconId": 59691, "infoLabel": "Combined Range", "isCircleIcon": false, "isInaccurate": false, "levelIconId": null, "levelUnits": null, "levelValue": null, "mainBarValue": 0, "rangeIconId": 59691, "rangeUnits": "km", "rangeValue": "368", "secondaryBarValue": 0, "showsBar": false}, {"barType": null, "chargingStatusIndicatorType": "CHARGING", "chargingStatusType": "CHARGING", "chargingType": "charging", "iconOpacity": "high", "infoIconId": 59689, "infoLabel": "100% at ~12:43 AM", "isCircleIcon": true, "isInaccurate": true, "levelIconId": 59689, "levelUnits": "%", "levelValue": "83", "mainBarValue": 83, "rangeIconId": 59683, "rangeUnits": "km", "rangeValue": "23", "secondaryBarValue": 0, "showBarGoal": false, "showsBar": true}, {"chargingType": null, "iconOpacity": "high", "infoIconId": 59930, "infoLabel": "Fuel Level", "isCircleIcon": false, "isInaccurate": false, "levelIconId": 59682, "levelUnits": "%", "levelValue": "83", "mainBarValue": 83, "rangeIconId": 59681, "rangeUnits": "km", "rangeValue": "345", "secondaryBarValue": 0, "showsBar": true}], "issues": {}, "lastUpdatedAt": "2021-11-14T20:20:21Z", "recallExternalUrl": null, "recallMessages": [], "requiredServices": [{"criticalness": "nonCritical", "iconId": 60197, "id": "Oil", "longDescription": "Next service due after the specified distance or date.", "subtitle": "some_road \u2022 duration \u2022 -- EUR", "title": "Engine oil"}, {"criticalness": "nonCritical", "iconId": 60215, "id": "VehicleCheck", "longDescription": "Next vehicle check due after the specified distance or date.", "subtitle": "some_road \u2022 duration \u2022 -- EUR", "title": "Vehicle check"}, {"criticalness": "nonCritical", "iconId": 60447, "id": "TireWearFront", "subtitle": "some_road \u2022 duration \u2022 -- EUR", "title": "Tire service, front tires"}, {"criticalness": "nonCritical", "iconId": 60447, "id": "TireWearRear", "subtitle": "some_road \u2022 duration \u2022 -- EUR", "title": "Tire service, rear tires"}, {"criticalness": "nonCritical", "iconId": 60223, "id": "BrakeFluid", "longDescription": "Next service due by the specified date.", "subtitle": "some_road \u2022 duration \u2022 -- EUR", "title": "Brake fluid"}], "timestampMessage": "Updated from vehicle 11/14/2021 09:20 PM"}, "properties": {"areDoorsClosed": true, "areDoorsLocked": true, "areDoorsOpen": false, "areWindowsClosed": true, "chargingState": {"chargePercentage": 83, "isChargerConnected": true, "state": "CHARGING", "type": "NOT_AVAILABLE"}, "checkControlMessages": [], "climateControl": {"activity": "INACTIVE"}, "combinedRange": {"distance": {"units": "KILOMETERS", "value": 368}}, "combustionRange": {"distance": {"units": "KILOMETERS", "value": 368}}, "doorsAndWindows": {"doors": {"driverFront": "CLOSED", "driverRear": "CLOSED", "passengerFront": "CLOSED", "passengerRear": "CLOSED"}, "hood": "CLOSED", "moonroof": "CLOSED", "trunk": "CLOSED", "windows": {"driverFront": "CLOSED", "driverRear": "CLOSED", "passengerFront": "CLOSED", "passengerRear": "CLOSED"}}, "electricRange": {"distance": {"units": "KILOMETERS", "value": 23}}, "electricRangeAndStatus": {"chargePercentage": 83, "distance": {"units": "KILOMETERS", "value": 23}}, "fuelLevel": {"units": "LITERS", "value": 29}, "fuelPercentage": {"value": 83}, "inMotion": false, "isServiceRequired": false, "lastUpdatedAt": "2021-11-14T20:20:21Z", "originCountryISO": "DE", "serviceRequired": [{"dateTime": "2022-10-01T00:00:00.000Z", "distance": {"units": "KILOMETERS", "value": 6000}, "status": "OK", "type": "OIL"}, {"dateTime": "2024-10-01T00:00:00.000Z", "distance": {"units": "KILOMETERS", "value": 39000}, "status": "OK", "type": "VEHICLE_CHECK"}, {"status": "OK", "type": "TIRE_WEAR_FRONT"}, {"status": "OK", "type": "TIRE_WEAR_REAR"}, {"dateTime": "2023-10-01T00:00:00.000Z", "status": "OK", "type": "BRAKE_FLUID"}], "tires": {"frontLeft": {"details": {"dimension": "225/45 R18 95V XL", "manufacturer": "Pirelli", "manufacturingWeek": "35 / 19", "maxSpeed": "240 km/h", "mountingDate": "11/12/2021", "optimizedForOemBmw": "Yes", "partNumber": "2461777", "season": "Winter tires", "treadDesign": "SOTTOZERO 3"}, "status": {"currentPressure": 260, "localizedCurrentPressure": "2.6 bar", "localizedTargetPressure": "2.7 bar", "targetPressure": 270, "wear": 0}}, "frontRight": {"details": {"dimension": "225/45 R18 95V XL", "manufacturer": "Pirelli", "manufacturingWeek": "27 / 19", "maxSpeed": "240 km/h", "mountingDate": "11/12/2021", "optimizedForOemBmw": "Yes", "partNumber": "2461777", "season": "Winter tires", "treadDesign": "SOTTOZERO 3"}, "status": {"currentPressure": 250, "localizedCurrentPressure": "2.5 bar", "localizedTargetPressure": "2.7 bar", "targetPressure": 270, "wear": 0}}, "rearLeft": {"details": {"dimension": "255/40 R18 99V XL", "manufacturer": "Pirelli", "manufacturingWeek": "17 / 19", "maxSpeed": "240 km/h", "mountingDate": "11/12/2021", "optimizedForOemBmw": "Yes", "partNumber": "2461778", "season": "Winter tires", "treadDesign": "SOTTOZERO 3"}, "status": {"currentPressure": 300, "localizedCurrentPressure": "3.0 bar", "localizedTargetPressure": "2.9 bar", "targetPressure": 290, "wear": 0}}, "rearRight": {"details": {"dimension": "255/40 R18 99V XL", "manufacturer": "Pirelli", "manufacturingWeek": "26 / 19", "maxSpeed": "240 km/h", "mountingDate": "11/12/2021", "optimizedForOemBmw": "Yes", "partNumber": "2461778", "season": "Winter tires", "treadDesign": "SOTTOZERO 3"}, "status": {"currentPressure": 250, "localizedCurrentPressure": "2.5 bar", "localizedTargetPressure": "2.9 bar", "targetPressure": 290, "wear": 0}}}, "vehicleLocation": {"address": {"formatted": "some_formatted_address"}, "coordinates": {"latitude": 12.3456, "longitude": 34.5678}, "heading": 123}}, "all_lids_closed": true, "all_windows_closed": true, "are_all_cbs_ok": true, "are_parking_lights_on": null, "charging_end_time": "2011-11-29 00:43:00", "charging_level_hv": 83, "charging_status": "CHARGING", "charging_time_remaining": 3.23, "check_control_messages": [], "condition_based_services": [{"due_date": "2022-10-01 00:00:00+00:00", "state": "OK", "service_type": "OIL", "due_distance": [6000, "KILOMETERS"], "description": null}, {"due_date": "2024-10-01 00:00:00+00:00", "state": "OK", "service_type": "VEHICLE_CHECK", "due_distance": [39000, "KILOMETERS"], "description": null}, {"due_date": null, "state": "OK", "service_type": "TIRE_WEAR_FRONT", "due_distance": null, "description": null}, {"due_date": null, "state": "OK", "service_type": "TIRE_WEAR_REAR", "due_distance": null, "description": null}, {"due_date": "2023-10-01 00:00:00+00:00", "state": "OK", "service_type": "BRAKE_FLUID", "due_distance": null, "description": null}], "connection_status": "CONNECTED", "door_lock_state": "LOCKED", "fuel_indicator_count": 3, "fuel_percent": 83, "gps_heading": 123, "gps_position": [12.3456, 34.5678], "has_check_control_messages": false, "has_parking_light_state": false, "is_vehicle_active": false, "last_charging_end_result": null, "last_update_reason": "Updated from vehicle 11/14/2021 09:20 PM", "lids": [{"name": "hood", "state": "CLOSED"}, {"name": "trunk", "state": "CLOSED"}, {"name": "driverFront", "state": "CLOSED"}, {"name": "driverRear", "state": "CLOSED"}, {"name": "passengerFront", "state": "CLOSED"}, {"name": "passengerRear", "state": "CLOSED"}], "max_range_electric": null, "mileage": [27138, "km"], "open_lids": [], "open_windows": [], "parking_lights": null, "remaining_fuel": [29, "LITERS"], "remaining_range_electric": [23, "km"], "remaining_range_fuel": [345, "km"], "remaining_range_total": [368, "km"], "timestamp": "2021-11-14 20:20:21+00:00", "windows": [{"name": "driverFront", "state": "CLOSED"}, {"name": "driverRear", "state": "CLOSED"}, {"name": "passengerFront", "state": "CLOSED"}, {"name": "passengerRear", "state": "CLOSED"}, {"name": "moonroof", "state": "CLOSED"}]}, "observer_latitude": null, "observer_longitude": null, "available_attributes": ["gps_position", "vin", "remaining_range_total", "mileage", "charging_time_remaining", "charging_status", "charging_level_hv", "connection_status", "remaining_range_electric", "last_charging_end_result", "remaining_fuel", "remaining_range_fuel", "fuel_percent", "condition_based_services", "check_control_messages", "door_lock_state", "timestamp", "last_update_reason", "lids", "windows"], "available_state_services": ["status"], "brand": "bmw", "charging_profile": {"charging_profile": {"chargingControlType": "weeklyPlanner", "chargingMode": "immediateCharging", "chargingPreference": "noPreSelection", "chargingSettings": {"hospitality": "NO_ACTION", "idcc": "NO_ACTION", "isAcCurrentLimitActive": false, "targetSoc": 100}, "climatisationOn": false, "departureTimes": [{"action": "deactivate", "id": 1, "timeStamp": {"hour": 0, "minute": 0}, "timerWeekDays": []}, {"action": "deactivate", "id": 2, "timeStamp": {"hour": 0, "minute": 0}, "timerWeekDays": []}, {"action": "deactivate", "id": 3, "timeStamp": {"hour": 0, "minute": 0}, "timerWeekDays": []}, {"action": "deactivate", "id": 4, "timerWeekDays": []}], "reductionOfChargeCurrent": {"end": {"hour": 0, "minute": 0}, "start": {"hour": 0, "minute": 0}}}, "charging_mode": "immediateCharging", "charging_preferences": "noPreSelection", "is_pre_entry_climatization_enabled": false, "preferred_charging_window": {"end_time": "00:00", "start_time": "00:00"}, "timer": {"1": {"action": "deactivate", "start_time": "00:00", "timer_id": 1, "weekdays": []}, "2": {"action": "deactivate", "start_time": "00:00", "timer_id": 2, "weekdays": []}, "3": {"action": "deactivate", "start_time": "00:00", "timer_id": 3, "weekdays": []}, "4": {"action": "deactivate", "start_time": null, "timer_id": 4, "weekdays": []}}}, "drive_train": "PLUGIN_HYBRID", "drive_train_attributes": ["remaining_range_total", "mileage", "charging_time_remaining", "charging_status", "charging_level_hv", "connection_status", "remaining_range_electric", "last_charging_end_result", "remaining_fuel", "remaining_range_fuel", "fuel_percent"], "has_hv_battery": true, "has_internal_combustion_engine": true, "has_range_extender": false, "has_weekly_planner_service": true, "is_vehicle_tracking_enabled": true, "lsc_type": "ACTIVATED", "name": "330e xDrive"}
\ No newline at end of file
diff --git a/test/test_utils.py b/test/test_utils.py
index 239791a..71a6077 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -34,6 +34,7 @@ class TestVehicle(unittest.TestCase):
                 "has_internal_combustion_engine",
                 "has_range_extender",
                 "has_weekly_planner_service",
+                "is_vehicle_tracking_enabled",
                 "lsc_type",
                 "name",
                 "to_json",
diff --git a/test/test_vehicle.py b/test/test_vehicle.py
index b70afec..85c8455 100644
--- a/test/test_vehicle.py
+++ b/test/test_vehicle.py
@@ -117,6 +117,14 @@ class TestVehicle(unittest.TestCase):
         with self.assertRaises(ValueError):
             vehicle.set_observer_position(12.1, None)
 
+    def test_get_is_tracking_enabled(self):
+        """Test setting observer position"""
+        vehicle = get_mocked_account().get_vehicle(VIN_F11)
+        self.assertEqual(False, vehicle.is_vehicle_tracking_enabled)
+
+        vehicle = get_mocked_account().get_vehicle(VIN_F31)
+        self.assertEqual(True, vehicle.is_vehicle_tracking_enabled)
+
     def test_available_attributes(self):
         """Check that available_attributes returns exactly the arguments we have in our test data."""
         account = get_mocked_account()
diff --git a/test/test_vehicle_status.py b/test/test_vehicle_status.py
index 18b00b0..e173725 100644
--- a/test/test_vehicle_status.py
+++ b/test/test_vehicle_status.py
@@ -166,11 +166,12 @@ class TestState(unittest.TestCase):
 
     def test_parse_f11_no_position_vehicle_active(self):
         """Test parsing of F11 data with vehicle beeing active."""
-        status = get_mocked_account().get_vehicle(VIN_F48).status
+        vehicle = get_mocked_account().get_vehicle(VIN_F48)
+        status = vehicle.status
 
-        # self.assertTrue(status.is_vehicle_tracking_enabled)
-        with self.assertLogs(level=logging.WARNING):
-            self.assertTrue(status.is_vehicle_active)
+        self.assertTrue(vehicle.is_vehicle_tracking_enabled)
+        self.assertTrue(status.is_vehicle_active)
+        with self.assertLogs(level=logging.INFO):
             self.assertIsNone(status.gps_position)
             self.assertIsNone(status.gps_heading)