From a8866a8a86ba9a3eb26d2314561acad6904ede7d Mon Sep 17 00:00:00 2001 From: doofyus Date: Mon, 9 Mar 2026 13:29:29 +0200 Subject: [PATCH 1/8] update `auto-api` specs to L13.6 --- specs/capabilities/charging.json | 57 +++++- specs/capabilities/maintenance.json | 90 +++++++++ specs/capabilities/trips.json | 19 ++ specs/capabilities/usage.json | 279 ++++++++++++++++++++++++++++ specs/misc/custom_types.json | 159 ++++++++++++++++ specs/misc/unit_types.json | 20 ++ 6 files changed, 623 insertions(+), 1 deletion(-) diff --git a/specs/capabilities/charging.json b/specs/capabilities/charging.json index 2dbb1b9..7ea73c8 100644 --- a/specs/capabilities/charging.json +++ b/specs/capabilities/charging.json @@ -10,7 +10,7 @@ }, "api": { "intro": 2, - "update": 12 + "update": 13 }, "getters": {}, "setters": [ @@ -680,6 +680,11 @@ "id": 1, "name": "direct_current", "name_pretty": "DC" + }, + { + "id": 2, + "name": "wireless", + "name_pretty": "Wireless" } ], "examples": [ @@ -1855,6 +1860,18 @@ { "id": 5, "name": "active" + }, + { + "id": 6, + "name": "initialising" + }, + { + "id": 7, + "name": "fault" + }, + { + "id": 8, + "name": "inactive" } ], "examples": [ @@ -2209,6 +2226,44 @@ "description": "State of health of the high-voltage battery is 90%." } ] + }, + { + "id": 81, + "name": "distance_since_charging", + "name_cased": "distanceSinceCharging", + "name_pretty": "Distance since charging", + "added": 13, + "type": "unit.length", + "size": 10, + "description": "The distance driven since the last charging session", + "examples": [ + { + "data_component": "12044028cccccccccccd", + "value": { + "kilometers": 12.4 + }, + "description": "12.4km driven since the last charging session" + } + ] + }, + { + "id": 82, + "name": "charging_voltage", + "name_cased": "chargingVoltage", + "name_pretty": "Charging voltage", + "added": 13, + "type": "unit.electric_potential_difference", + "size": 10, + "description": "Charging electric voltage.", + "examples": [ + { + "data_component": "0a004079000000000000", + "value": { + "volts": 400.0 + }, + "description": "Charging voltage is 400.0V." + } + ] } ] } \ No newline at end of file diff --git a/specs/capabilities/maintenance.json b/specs/capabilities/maintenance.json index fd0451b..e3e96e3 100644 --- a/specs/capabilities/maintenance.json +++ b/specs/capabilities/maintenance.json @@ -694,6 +694,96 @@ "description": "The distance to next vehicle check is 1350.4km." } ] + }, + { + "id": 37, + "name": "service_warning", + "name_cased": "serviceWarning", + "name_pretty": "Service warning", + "added": 13, + "type": "types.service_warning", + "description": "Represents the type of service required and how soon it must be performed.", + "examples": [ + { + "data_component": "0000", + "values": { + "due": "no_service_required", + "reason": "unknown" + }, + "description": "No service is required at this time." + }, + { + "data_component": "0200", + "values": { + "due": "due", + "reason": "unknown" + }, + "description": "Unknown service is due." + }, + { + "data_component": "0103", + "values": { + "due": "almost", + "reason": "distance_driven" + }, + "description": "Service is almost due because of distance driven." + } + ] + }, + { + "id": 38, + "name": "last_service_date", + "name_cased": "lastServiceDate", + "name_pretty": "Last service date", + "added": 13, + "type": "timestamp", + "size": 8, + "description": "Date of the last service performed on the vehicle.", + "examples": [ + { + "data_component": "0000017fe45286dd", + "value": "2022-04-01T08:51:28.093Z", + "description": "Last service was on 1. April 2022 at 11:51:28 EEST." + } + ] + }, + { + "id": 39, + "name": "last_service_distance", + "name_cased": "lastServiceDistance", + "name_pretty": "Last service distance", + "added": 13, + "type": "unit.length", + "size": 10, + "description": "Distance reading at the time of the last service.", + "examples": [ + { + "data_component": "120440f7590000000000", + "value": { + "kilometers": 95632.0 + }, + "description": "Distance reading at last service was 95'632km." + } + ] + }, + { + "id": 40, + "name": "next_inspection_distance", + "name_cased": "nextInspectionDistance", + "name_pretty": "Next inspection distance", + "added": 13, + "type": "unit.length", + "size": 10, + "description": "Distance reading at which the next inspection is due.", + "examples": [ + { + "data_component": "120440e86a0000000000", + "value": { + "kilometers": 50000.0 + }, + "description": "Next inspection is due at 50'000km." + } + ] } ] } \ No newline at end of file diff --git a/specs/capabilities/trips.json b/specs/capabilities/trips.json index a8238e1..db24d06 100644 --- a/specs/capabilities/trips.json +++ b/specs/capabilities/trips.json @@ -672,6 +672,25 @@ "description": "Duration of trip was 123.0 minutes." } ] + }, + { + "id": 26, + "name": "average_electric_consumption", + "name_cased": "averageElectricConsumption", + "name_pretty": "Average electric consumption", + "added": 13, + "type": "unit.energy_efficiency", + "size": 10, + "description": "Average electric consumption during the trip", + "examples": [ + { + "data_component": "0d00401d5c28f5c28f5c", + "value": { + "kilometers_per_kwh": 7.34 + }, + "description": "Average electric consumption during the trip was 7.34 km/kWh." + } + ] } ] } \ No newline at end of file diff --git a/specs/capabilities/usage.json b/specs/capabilities/usage.json index 654e907..7cb62dc 100644 --- a/specs/capabilities/usage.json +++ b/specs/capabilities/usage.json @@ -598,6 +598,10 @@ "name": "fuel_consumption_rate_last_trip", "name_cased": "fuelConsumptionRateLastTrip", "name_pretty": "Fuel consumption rate last trip", + "deprecated": { + "new_name": "fuel_consumption_rate_since_start", + "reason": "changed the name to harmonize with electric consumption rate property" + }, "added": 12, "type": "unit.fuel_efficiency", "size": 10, @@ -965,6 +969,281 @@ "description": "Battery recovered 14% of charge through regeneration." } ] + }, + { + "id": 47, + "name": "energy_consumption_last_trip", + "name_cased": "energyConsumptionLastTrip", + "name_pretty": "Energy consumption last trip", + "added": 13, + "type": "types.energy_consumption", + "multiple": true, + "description": "Energy consumption spread across different categories for the last trip automatically detected.", + "examples": [ + { + "data_component": "010c0340c5eb8000000000", + "values": { + "category": "driving", + "consumption": { + "watt_hours": 11223.0 + } + }, + "description": "Driving consumed 11223.0Wh of energy during the last trip." + }, + { + "data_component": "020c03407c800000000000", + "values": { + "category": "climate", + "consumption": { + "watt_hours": 456.0 + } + }, + "description": "Climate control consumed 456.0Wh of energy during the last trip." + } + ] + }, + { + "id": 48, + "name": "energy_consumption_since_reset", + "name_cased": "energyConsumptionSinceReset", + "name_pretty": "Energy consumption since reset", + "added": 13, + "type": "types.energy_consumption", + "multiple": true, + "description": "Energy consumption spread across different categories since the last reset.", + "examples": [ + { + "data_component": "010c0340c5eb8000000000", + "values": { + "category": "driving", + "consumption": { + "watt_hours": 11223.0 + } + }, + "description": "Driving consumed 11223.0Wh of energy since the last reset." + }, + { + "data_component": "020c03407c800000000000", + "values": { + "category": "climate", + "consumption": { + "watt_hours": 456.0 + } + }, + "description": "Climate control consumed 456.0Wh of energy since the last reset." + } + ] + }, + { + "id": 49, + "name": "energy_consumption_since_charging", + "name_cased": "energyConsumptionSinceCharging", + "name_pretty": "Energy consumption since charging", + "added": 13, + "type": "types.energy_consumption", + "multiple": true, + "description": "Energy consumption spread across different categories since the last charging session.", + "examples": [ + { + "data_component": "010c0340c5eb8000000000", + "values": { + "category": "driving", + "consumption": { + "watt_hours": 11223.0 + } + }, + "description": "Driving consumed 11223.0Wh of energy since the last charging session." + }, + { + "data_component": "020c03407c800000000000", + "values": { + "category": "climate", + "consumption": { + "watt_hours": 456.0 + } + }, + "description": "Climate control consumed 456.0Wh of energy since the last charging session." + } + ] + }, + { + "id": 50, + "name": "energy_consumption_percentages_last_trip", + "name_cased": "energyConsumptionPercentagesLastTrip", + "name_pretty": "Energy consumption percentages last trip", + "added": 13, + "type": "types.energy_consumption_percentage", + "multiple": true, + "description": "Energy consumption percentages spread across different categories for the last trip automatically detected.", + "examples": [ + { + "data_component": "013fea8f5c28f5c28f", + "values": { + "category": "driving", + "percentage": 0.83 + }, + "description": "Driving accounted for 83% of energy consumption during the last trip." + }, + { + "data_component": "023fbc28f5c28f5c29", + "values": { + "category": "climate", + "percentage": 0.11 + }, + "description": "Climate control accounted for 11% of energy consumption during the last trip." + } + ] + }, + { + "id": 51, + "name": "energy_consumption_percentages_since_reset", + "name_cased": "energyConsumptionPercentagesSinceReset", + "name_pretty": "Energy consumption percentages since reset", + "added": 13, + "type": "types.energy_consumption_percentage", + "multiple": true, + "description": "Energy consumption percentages spread across different categories since the last reset.", + "examples": [ + { + "data_component": "013fea8f5c28f5c28f", + "values": { + "category": "driving", + "percentage": 0.83 + }, + "description": "Driving accounted for 83% of energy consumption since the last reset." + }, + { + "data_component": "023fbc28f5c28f5c29", + "values": { + "category": "climate", + "percentage": 0.11 + }, + "description": "Climate control accounted for 11% of energy consumption since the last reset." + } + ] + }, + { + "id": 52, + "name": "energy_consumption_percentages_since_charging", + "name_cased": "energyConsumptionPercentagesSinceCharging", + "name_pretty": "Energy consumption percentages since charging", + "added": 13, + "type": "types.energy_consumption_percentage", + "multiple": true, + "description": "Energy consumption percentages spread across different categories since the last charging session.", + "examples": [ + { + "data_component": "013fea8f5c28f5c28f", + "values": { + "category": "driving", + "percentage": 0.83 + }, + "description": "Driving accounted for 83% of energy consumption since the last charging session." + }, + { + "data_component": "023fbc28f5c28f5c29", + "values": { + "category": "climate", + "percentage": 0.11 + }, + "description": "Climate control accounted for 11% of energy consumption since the last charging session." + } + ] + }, + { + "id": 53, + "name": "average_speed_since_charging", + "name_cased": "averageSpeedSinceCharging", + "name_pretty": "Average speed since charging", + "added": 12, + "type": "unit.speed", + "size": 10, + "description": "Average speed since the last charging session.", + "examples": [ + { + "data_component": "1601404619999999999a", + "value": { + "kilometers_per_hour": 44.2 + }, + "description": "Average speed was 44.2km/h since the last charging session." + } + ] + }, + { + "id": 54, + "name": "fuel_consumption_rate_since_start", + "name_cased": "fuelConsumptionRateSinceStart", + "name_pretty": "Fuel consumption rate since start", + "added": 12, + "type": "unit.fuel_efficiency", + "size": 10, + "description": "Liquid fuel consumption rate since start", + "examples": [ + { + "data_component": "0f00401599999999999a", + "value": { + "liters_per_100_kilometers": 5.4 + }, + "description": "Consumed 5.4 L/100km since start" + } + ] + }, + { + "id": 55, + "name": "fuel_consumption_rate_since_refuel", + "name_cased": "fuelConsumptionRateSinceRefuel", + "name_pretty": "Fuel consumption rate since refuel", + "added": 13, + "type": "unit.fuel_efficiency", + "size": 10, + "description": "Liquid fuel consumption rate since last refuel", + "examples": [ + { + "data_component": "0f00401599999999999a", + "value": { + "liters_per_100_kilometers": 5.4 + }, + "description": "Consumed 5.4 L/100km since last refuel" + } + ] + }, + { + "id": 56, + "name": "energy_consumption_rate_since_charging", + "name_cased": "energyConsumptionRateSinceCharging", + "name_pretty": "Energy consumption rate since charging", + "added": 13, + "type": "unit.energy_efficiency", + "size": 10, + "description": "Electric energy consumption rate since the last charging session", + "examples": [ + { + "data_component": "0d00402670a3d70a3d71", + "value": { + "kwh_per_100_kilometers": 11.22 + }, + "description": "Consumed 11.22kWh/100km since the last charging session" + } + ] + }, + { + "id": 57, + "name": "fuel_consumption_volume", + "name_cased": "fuelConsumptionVolume", + "name_pretty": "Fuel consumption volume", + "added": 13, + "type": "unit.volume", + "size": 10, + "description": "Current fuel consumption of internal combustion engine", + "examples": [ + { + "data_component": "190a4059000000000000", + "value": { + "cubic_millimeters": 100.0 + }, + "description": "Current fuel consumption is 100.0 mm3" + } + ] } ] } \ No newline at end of file diff --git a/specs/misc/custom_types.json b/specs/misc/custom_types.json index 00b6ea4..ff2fad6 100644 --- a/specs/misc/custom_types.json +++ b/specs/misc/custom_types.json @@ -2363,6 +2363,30 @@ { "id": 197, "name": "engine_drag_torque_control_failure" + }, + { + "id": 198, + "name": "high_beam_left_failure" + }, + { + "id": 199, + "name": "high_beam_right_failure" + }, + { + "id": 200, + "name": "daytime_running_light_left_failure" + }, + { + "id": 201, + "name": "daytime_running_light_right_failure" + }, + { + "id": 202, + "name": "side_mark_lights_failure" + }, + { + "id": 203, + "name": "licence_plate_light_failure" } ] }, @@ -2784,6 +2808,84 @@ } ] }, + { + "name": "energy_consumption", + "name_cased": "energyConsumption", + "name_pretty": "Energy consumption", + "type": "custom", + "size": 11, + "items": [ + { + "name": "category", + "name_cased": "category", + "type": "enum", + "size": 1, + "enum_values": [ + { + "id": 0, + "name": "other" + }, + { + "id": 1, + "name": "driving" + }, + { + "id": 2, + "name": "climate" + }, + { + "id": 3, + "name": "battery" + } + ] + }, + { + "name": "consumption", + "name_cased": "consumption", + "type": "unit.energy", + "size": 10, + "description": "Energy consumption in the given category" + } + ] + }, + { + "name": "energy_consumption_percentage", + "name_cased": "energyConsumptionPercentage", + "name_pretty": "Energy consumption percentage", + "type": "custom", + "size": 9, + "items": [ + { + "name": "category", + "name_cased": "category", + "type": "enum", + "size": 1, + "enum_values": [ + { + "id": 0, + "name": "other" + }, + { + "id": 1, + "name": "driving" + }, + { + "id": 2, + "name": "climate" + }, + { + "id": 3, + "name": "battery" + } + ] + }, + { + "name": "percentage", + "name_cased": "percentage", + "type": "types.percentage" + } + ] + }, { "name": "failure", "name_cased": "failure", @@ -3146,6 +3248,63 @@ } ] }, + { + "name": "service_warning", + "name_cased": "serviceWarning", + "name_pretty": "Service warning", + "type": "custom", + "size": 2, + "items": [ + { + "name": "due", + "name_cased": "due", + "type": "enum", + "size": 1, + "enum_values": [ + { + "id": 0, + "name": "no_service_required" + }, + { + "id": 1, + "name": "almost" + }, + { + "id": 2, + "name": "due" + }, + { + "id": 3, + "name": "overdue" + } + ] + }, + { + "name": "reason", + "name_cased": "reason", + "type": "enum", + "size": 1, + "enum_values": [ + { + "id": 0, + "name": "unknown" + }, + { + "id": 1, + "name": "regular_maintenance" + }, + { + "id": 2, + "name": "engine_hours" + }, + { + "id": 3, + "name": "distance_driven" + } + ] + } + ] + }, { "name": "spring_rate", "name_cased": "springRate", diff --git a/specs/misc/unit_types.json b/specs/misc/unit_types.json index 0ab7379..7652337 100644 --- a/specs/misc/unit_types.json +++ b/specs/misc/unit_types.json @@ -185,6 +185,21 @@ "name": "miles_per_kwh", "id": 1, "conversion_inverse": 62.1371192237334 + }, + { + "name": "kilometers_per_kwh", + "id": 2, + "conversion_inverse": 100.0 + }, + { + "name": "miles_per_gallon_equivalent", + "id": 3, + "conversion_inverse": 2094.331603 + }, + { + "name": "miles_per_imperial_gallon_equivalent", + "id": 4, + "conversion_inverse": 2515.187 } ] }, @@ -252,6 +267,11 @@ "name": "miles_per_gallon", "id": 2, "conversion_inverse": 235.2145833 + }, + { + "name": "kilometers_per_liter", + "id": 3, + "conversion_inverse": 100.0 } ] }, From 312ce471d5ecc5cf23ff62d485fa53fbc4498990 Mon Sep 17 00:00:00 2001 From: doofyus Date: Mon, 9 Mar 2026 13:29:36 +0200 Subject: [PATCH 2/8] add `.tool-versions` --- .tool-versions | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .tool-versions diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..4f13f4f --- /dev/null +++ b/.tool-versions @@ -0,0 +1,2 @@ +elixir 1.11.2 +erlang 23.1 \ No newline at end of file From 576409a7278c5be12bdd9262b0ede86019d5ce50 Mon Sep 17 00:00:00 2001 From: doofyus Date: Mon, 9 Mar 2026 14:38:45 +0200 Subject: [PATCH 3/8] use ubuntu-24.04 for tests and remove old elixir versions from test --- .github/workflows/test.yml | 82 ++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 43 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 105e90b..c145c67 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,46 +1,42 @@ name: CI on: [push] jobs: - mix_test: - name: mix test (Elixir ${{ matrix.elixir }} OTP ${{ matrix.otp }}) - strategy: - matrix: - elixir: ['1.9.4', '1.10.4', '1.11.2'] - include: - - elixir: '1.9.4' - otp: '22.x' - - elixir: '1.10.4' - otp: '22.3' - - elixir: '1.11.2' - otp: '23.1' - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/cache@v3 - with: - path: deps - key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - restore-keys: | - ${{ runner.os }}-mix- - - uses: actions/cache@v3 - with: - path: _build - key: build-elixir-${{ matrix.elixir }}-otp-${{ matrix.otp }}-mix-${{ hashFiles('mix.lock') }} - restore-keys: | - build-elixir-${{ matrix.elixir }}-otp-${{ matrix.otp }}-mix- - - uses: erlef/setup-beam@v1 - with: - otp-version: ${{ matrix.otp }} - elixir-version: ${{ matrix.elixir }} - - name: Install Dependencies - run: mix deps.get - - name: Run Tests - run: mix test - - name: Run formatter - run: mix format --check-formatted - - name: Run credo - run: mix credo - - name: Run dialyzer - env: - MIX_ENV: test - run: mix dialyzer --halt-exit-status + mix_test: + name: mix test (Elixir ${{ matrix.elixir }} OTP ${{ matrix.otp }}) + strategy: + matrix: + elixir: ['1.11.2'] + include: + - elixir: '1.11.2' + otp: '23.1' + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - uses: actions/cache@v3 + with: + path: deps + key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} + restore-keys: | + ${{ runner.os }}-mix- + - uses: actions/cache@v3 + with: + path: _build + key: build-elixir-${{ matrix.elixir }}-otp-${{ matrix.otp }}-mix-${{ hashFiles('mix.lock') }} + restore-keys: | + build-elixir-${{ matrix.elixir }}-otp-${{ matrix.otp }}-mix- + - uses: erlef/setup-beam@v1 + with: + otp-version: ${{ matrix.otp }} + elixir-version: ${{ matrix.elixir }} + - name: Install Dependencies + run: mix deps.get + - name: Run Tests + run: mix test + - name: Run formatter + run: mix format --check-formatted + - name: Run credo + run: mix credo + - name: Run dialyzer + env: + MIX_ENV: test + run: mix dialyzer --halt-exit-status From 8f16889bd34e29ef5714cb1eaa6df475bb446982 Mon Sep 17 00:00:00 2001 From: doofyus Date: Mon, 9 Mar 2026 14:52:41 +0200 Subject: [PATCH 4/8] update `.tool-versions` --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index 4f13f4f..9bc01c9 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -elixir 1.11.2 +elixir 1.11.2-otp-23 erlang 23.1 \ No newline at end of file From 4e3133c8a47968234ee7085fba2e9730658ede0b Mon Sep 17 00:00:00 2001 From: doofyus Date: Mon, 9 Mar 2026 14:55:14 +0200 Subject: [PATCH 5/8] update elixir and erlang versions to 1.18.2-otp-27 --- .github/workflows/test.yml | 6 +++--- .tool-versions | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c145c67..3d24d26 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,10 +5,10 @@ jobs: name: mix test (Elixir ${{ matrix.elixir }} OTP ${{ matrix.otp }}) strategy: matrix: - elixir: ['1.11.2'] + elixir: ['1.18.2'] include: - - elixir: '1.11.2' - otp: '23.1' + - elixir: '1.18.2' + otp: '27.2.4' runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 diff --git a/.tool-versions b/.tool-versions index 9bc01c9..491a968 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -elixir 1.11.2-otp-23 -erlang 23.1 \ No newline at end of file +elixir 1.18.2-otp-27 +erlang 27.2.4 \ No newline at end of file From 547fbdada7bd2267aa50be58e9af64a201df8de8 Mon Sep 17 00:00:00 2001 From: doofyus Date: Wed, 11 Mar 2026 08:54:45 +0200 Subject: [PATCH 6/8] update property-count checks for capabilities with new properties --- lib/auto_api/capabilities/charging_capability.ex | 2 +- lib/auto_api/capabilities/maintenance_capability.ex | 2 +- lib/auto_api/capabilities/trips_capability.ex | 2 +- lib/auto_api/capabilities/usage_capability.ex | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/auto_api/capabilities/charging_capability.ex b/lib/auto_api/capabilities/charging_capability.ex index c4cb879..538a0ab 100644 --- a/lib/auto_api/capabilities/charging_capability.ex +++ b/lib/auto_api/capabilities/charging_capability.ex @@ -32,7 +32,7 @@ defmodule AutoApi.ChargingCapability do iex> C.description "Charging" iex> length(C.properties) - 81 + 84 iex> List.first(C.properties) {0x02, :estimated_range} """ diff --git a/lib/auto_api/capabilities/maintenance_capability.ex b/lib/auto_api/capabilities/maintenance_capability.ex index bd1635f..6946089 100644 --- a/lib/auto_api/capabilities/maintenance_capability.ex +++ b/lib/auto_api/capabilities/maintenance_capability.ex @@ -32,7 +32,7 @@ defmodule AutoApi.MaintenanceCapability do iex> M.description "Maintenance" iex> length(M.properties) - 40 + 44 iex> List.first(M.properties) {0x01, :days_to_next_service} """ diff --git a/lib/auto_api/capabilities/trips_capability.ex b/lib/auto_api/capabilities/trips_capability.ex index 259699c..0084174 100644 --- a/lib/auto_api/capabilities/trips_capability.ex +++ b/lib/auto_api/capabilities/trips_capability.ex @@ -32,7 +32,7 @@ defmodule AutoApi.TripsCapability do iex> T.description "Trips" iex> length(T.properties) - 30 + 31 iex> List.first(T.properties) {1, :type} """ diff --git a/lib/auto_api/capabilities/usage_capability.ex b/lib/auto_api/capabilities/usage_capability.ex index b2681b4..598b672 100644 --- a/lib/auto_api/capabilities/usage_capability.ex +++ b/lib/auto_api/capabilities/usage_capability.ex @@ -32,7 +32,7 @@ defmodule AutoApi.UsageCapability do iex> U.description "Usage" iex> length(U.properties) - 51 + 62 iex> List.first(U.properties) {0x01, :average_weekly_distance} """ From 6570e57003796cd1ba78996352d1f8c30e2996f1 Mon Sep 17 00:00:00 2001 From: doofyus Date: Wed, 11 Mar 2026 08:55:25 +0200 Subject: [PATCH 7/8] update unit-count checks for measurements with new units --- test/auto_api/unit_type_test.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/auto_api/unit_type_test.exs b/test/auto_api/unit_type_test.exs index 9943c49..994f12c 100644 --- a/test/auto_api/unit_type_test.exs +++ b/test/auto_api/unit_type_test.exs @@ -127,7 +127,7 @@ defmodule AutoApi.UnitTypeStateTest do assert List.first(units) == :joules assert units = UnitType.units(:energy_efficiency) - assert length(units) == 2 + assert length(units) == 5 assert List.first(units) == :kwh_per_100_kilometers assert units = UnitType.units(:frequency) @@ -135,7 +135,7 @@ defmodule AutoApi.UnitTypeStateTest do assert List.first(units) == :hertz assert units = UnitType.units(:fuel_efficiency) - assert length(units) == 3 + assert length(units) == 4 assert List.first(units) == :liters_per_100_kilometers assert units = UnitType.units(:illuminance) From c9cb211ff0b3d43d29f111badfd9d6e905b3814b Mon Sep 17 00:00:00 2001 From: doofyus Date: Wed, 11 Mar 2026 09:09:51 +0200 Subject: [PATCH 8/8] update `credo` to work with elixir 1.18 --- mix.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mix.lock b/mix.lock index 582ee7a..f3e0237 100644 --- a/mix.lock +++ b/mix.lock @@ -1,7 +1,7 @@ %{ "assertions": {:hex, :assertions, "0.19.0", "f177fcc22b55df6a41a58b151e430d189d0a1083dae3240522503dedaf8e1174", [:mix], [], "hexpm", "759bdbf977fe3e2d2b79f8a65d8674f29ac757781136a6cb4adf88f1574af1d8"}, - "bunt": {:hex, :bunt, "0.2.1", "e2d4792f7bc0ced7583ab54922808919518d0e57ee162901a16a1b6664ef3b14", [:mix], [], "hexpm", "a330bfb4245239787b15005e66ae6845c9cd524a288f0d141c148b02603777a5"}, - "credo": {:hex, :credo, "1.7.1", "6e26bbcc9e22eefbff7e43188e69924e78818e2fe6282487d0703652bc20fd62", [:mix], [{:bunt, "~> 0.2.1", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "e9871c6095a4c0381c89b6aa98bc6260a8ba6addccf7f6a53da8849c748a58a2"}, + "bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"}, + "credo": {:hex, :credo, "1.7.17", "f92b6aa5b26301eaa5a35e4d48ebf5aa1e7094ac00ae38f87086c562caf8a22f", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "1eb5645c835f0b6c9b5410f94b5a185057bcf6d62a9c2b476da971cde8749645"}, "dialyxir": {:hex, :dialyxir, "1.3.0", "fd1672f0922b7648ff9ce7b1b26fcf0ef56dda964a459892ad15f6b4410b5284", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "00b2a4bcd6aa8db9dcb0b38c1225b7277dca9bc370b6438715667071a304696f"}, "earmark": {:hex, :earmark, "1.4.15", "2c7f924bf495ec1f65bd144b355d0949a05a254d0ec561740308a54946a67888", [:mix], [{:earmark_parser, ">= 1.4.13", [hex: :earmark_parser, repo: "hexpm", optional: false]}], "hexpm", "3b1209b85bc9f3586f370f7c363f6533788fb4e51db23aa79565875e7f9999ee"}, "earmark_parser": {:hex, :earmark_parser, "1.4.37", "2ad73550e27c8946648b06905a57e4d454e4d7229c2dafa72a0348c99d8be5f7", [:mix], [], "hexpm", "6b19783f2802f039806f375610faa22da130b8edc21209d0bff47918bb48360e"}, @@ -9,9 +9,9 @@ "ex_doc": {:hex, :ex_doc, "0.30.9", "d691453495c47434c0f2052b08dd91cc32bc4e1a218f86884563448ee2502dd2", [:mix], [{:earmark_parser, "~> 1.4.31", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "d7aaaf21e95dc5cddabf89063327e96867d00013963eadf2c6ad135506a8bc10"}, "ex_guard": {:hex, :ex_guard, "1.6.1", "adcb30f379c8048b2cb1474052753adecfe9635b9db3bac1a4a4458c5826f735", [:mix], [{:fs, "~> 8.6.1", [hex: :fs, repo: "hexpm", optional: false]}], "hexpm", "14a4d261c9ce951f9ec2487730afc1a008c0f70c95b7fcc2f446b9d7a5346718"}, "ex_unit_notifier": {:hex, :ex_unit_notifier, "1.1.0", "a4d1a027d975a2ba84cec60200e3cb095fe1de6c6b63091ca0880e83830b09bb", [:mix], [], "hexpm", "12d78f3a62c521ee4c9f18bd01ea3b960a3200d5ca21a383b0707f4228486c4e"}, - "file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"}, + "file_system": {:hex, :file_system, "1.1.1", "31864f4685b0148f25bd3fbef2b1228457c0c89024ad67f7a81a3ffbc0bbad3a", [:mix], [], "hexpm", "7a15ff97dfe526aeefb090a7a9d3d03aa907e100e262a0f8f7746b78f8f87a5d"}, "fs": {:hex, :fs, "8.6.1", "7c9c0d0211e8c520e4e9eda63b960605c2711839f47285e6166c332d973be8ea", [:rebar3], [], "hexpm", "61ea2bdaedae4e2024d0d25c63e44dccf65622d4402db4a2df12868d1546503f"}, - "jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"}, + "jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"}, "libgraph": {:hex, :libgraph, "0.16.0", "3936f3eca6ef826e08880230f806bfea13193e49bf153f93edcf0239d4fd1d07", [:mix], [], "hexpm", "41ca92240e8a4138c30a7e06466acc709b0cbb795c643e9e17174a178982d6bf"}, "makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"}, "makeup_elixir": {:hex, :makeup_elixir, "0.16.1", "cc9e3ca312f1cfeccc572b37a09980287e243648108384b97ff2b76e505c3555", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "e127a341ad1b209bd80f7bd1620a15693a9908ed780c3b763bccf7d200c767c6"},