diff --git a/teslemetry_stream/const.py b/teslemetry_stream/const.py index 00728ec..df05b95 100644 --- a/teslemetry_stream/const.py +++ b/teslemetry_stream/const.py @@ -698,7 +698,17 @@ def upper_options(self) -> list[str]: CarType = TeslemetryEnum( "CarType", - ["Unknown", "ModelS", "ModelX", "Model3", "ModelY", "SemiTruck", "Cybertruck"], + [ + "Unknown", + "ModelS", + "ModelX", + "Model3", + "ModelY", + "SemiTruck", + "Cybertruck", + "SemiTruckV2", + "Cybercab", + ], ) ChargePort = TeslemetryEnum("ChargePort", ["Unknown", "US", "EU", "GB", "CCS"]) diff --git a/tests/test_enum_tables.py b/tests/test_enum_tables.py index 6ddad0e..10d13f3 100644 --- a/tests/test_enum_tables.py +++ b/tests/test_enum_tables.py @@ -1,4 +1,4 @@ -"""Pin TeslemetryEnum value tables in const.py against tesla-protocol 1.4.0. +"""Pin TeslemetryEnum value tables in const.py against tesla-protocol 3.0.1. These tables are hand-maintained, not derived at runtime (see AGENTS.md for why), so this test is the thing that would catch drift against the proto @@ -9,7 +9,7 @@ from teslemetry_stream import const # name -> expected TeslemetryEnum.values, verified byte-for-byte against -# tesla_protocol.telemetry.vehicle_data_pb2's enum descriptors (1.4.0). +# tesla_protocol.telemetry.vehicle_data_pb2's enum descriptors (3.0.1). EXPECTED: dict[str, list[str]] = { "DetailedChargeState": [ "DetailedChargeStateUnknown", @@ -51,6 +51,8 @@ "CarTypeModelY", "CarTypeSemiTruck", "CarTypeCybertruck", + "CarTypeSemiTruckV2", + "CarTypeCybercab", ], } @@ -66,7 +68,7 @@ def main() -> None: table = getattr(const, name) results.append( check( - f"{name}.values matches tesla-protocol 1.4.0", + f"{name}.values matches tesla-protocol 3.0.1", table.values == expected, f"got {table.values}", )