alandtse/tesla

Emission Test no longer available

Open

#751 opened on Oct 28, 2023

View on GitHub
 (3 comments) (0 reactions) (0 assignees)Python (122 forks)github user discovery
buggood first issuehelp wanted

Repository metrics

Stars
 (741 stars)
PR merge metrics
 (Avg merge 13d 8h) (14 merged PRs in 30d)

Description

Its Haloween and I wanted to do a hack to do a "Emission Test" when a sensor i triggered. But I cannot find the button in the integration anymore. I posted a FR last year on this and tested it out and it worked great. There must have been an update to teslajsonpy that for some reason does not allow my car to do "emission test" anymore. The Emission test works flawlessly via the normal Tesla app.

Version of the custom_component

Configuration

All works great, except Emission test

Describe the bug

All works great, except Emission test. Last time it worked was with teslajsonpy 3.7.1.

Debug log


Add your logs here.
JSON response via teslajsonpy:
{
  "response": {
    "id": 9296486755xx,
    "user_id": 16891628xxx,
    "vehicle_id": 16892056xxx,
    "vin": "LRWYGCEK5xxx",
    "color": null,
    "access_type": "OWNER",
    "granular_access": {
      "hide_private": false
    },
    "tokens": [
      "c13axxx",
      "6db81xxxx"
    ],
    "state": "online",
    "in_service": false,
    "id_s": "92964867xxxxx",
    "calendar_enabled": true,
    "api_version": 63,
    "backseat_token": null,
    "backseat_token_updated_at": null,
    "ble_autopair_enrolled": false,
    "charge_state": {
      "battery_heater_on": false,
      "battery_level": 66,
      "battery_range": 214.74,
      "charge_amps": 16,
      "charge_current_request": 16,
      "charge_current_request_max": 16,
      "charge_enable_request": true,
      "charge_energy_added": 0,
      "charge_limit_soc": 100,
      "charge_limit_soc_max": 100,
      "charge_limit_soc_min": 50,
      "charge_limit_soc_std": 80,
      "charge_miles_added_ideal": 0,
      "charge_miles_added_rated": 0,
      "charge_port_cold_weather_mode": false,
      "charge_port_color": "<invalid>",
      "charge_port_door_open": true,
      "charge_port_latch": "Engaged",
      "charge_rate": 0,
      "charger_actual_current": 0,
      "charger_phases": null,
      "charger_pilot_current": 16,
      "charger_power": 0,
      "charger_voltage": 2,
      "charging_state": "NoPower",
      "conn_charge_cable": "IEC",
      "est_battery_range": 184.89,
      "fast_charger_brand": "<invalid>",
      "fast_charger_present": false,
      "fast_charger_type": "<invalid>",
      "ideal_battery_range": 214.74,
      "max_range_charge_counter": 0,
      "minutes_to_full_charge": 0,
      "not_enough_power_to_heat": null,
      "off_peak_charging_enabled": false,
      "off_peak_charging_times": "all_week",
      "off_peak_hours_end_time": 360,
      "preconditioning_enabled": false,
      "preconditioning_times": "weekdays",
      "scheduled_charging_mode": "Off",
      "scheduled_charging_pending": false,
      "scheduled_charging_start_time": null,
      "scheduled_charging_start_time_app": 0,
      "scheduled_departure_time": 1698119100,
      "scheduled_departure_time_minutes": 345,
      "supercharger_session_trip_planner": false,
      "time_to_full_charge": 0,
      "timestamp": 1698511088731,
      "trip_charging": false,
      "usable_battery_level": 65,
      "user_charge_enable_request": null
    },
    "climate_state": {
      "allow_cabin_overheat_protection": true,
      "auto_seat_climate_left": true,
      "auto_seat_climate_right": false,
      "auto_steering_wheel_heat": true,
      "battery_heater": false,
      "battery_heater_no_power": null,
      "bioweapon_mode": false,
      "cabin_overheat_protection": "On",
      "cabin_overheat_protection_actively_cooling": false,
      "climate_keeper_mode": "off",
      "cop_activation_temperature": "Medium",
      "defrost_mode": 0,
      "driver_temp_setting": 20.5,
      "fan_status": 0,
      "hvac_auto_request": "On",
      "inside_temp": 4.9,
      "is_auto_conditioning_on": false,
      "is_climate_on": false,
      "is_front_defroster_on": false,
      "is_preconditioning": false,
      "is_rear_defroster_on": false,
      "left_temp_direction": 828,
      "max_avail_temp": 28,
      "min_avail_temp": 15,
      "outside_temp": 2,
      "passenger_temp_setting": 20.5,
      "remote_heater_control_enabled": false,
      "right_temp_direction": 828,
      "seat_heater_left": 0,
      "seat_heater_rear_center": 0,
      "seat_heater_rear_left": 0,
      "seat_heater_rear_right": 0,
      "seat_heater_right": 0,
      "side_mirror_heaters": false,
      "steering_wheel_heat_level": 0,
      "steering_wheel_heater": false,
      "supports_fan_only_cabin_overheat_protection": true,
      "timestamp": 1698511088731,
      "wiper_blade_heater": false
    },
    "drive_state": {
      "active_route_latitude": xxx,
      "active_route_longitude": xxxx,
      "active_route_traffic_minutes_delay": 0,
      "gps_as_of": 16985xxx,
      "heading": 224,
      "latitude": xxx,
      "longitude": 1xxx,
      "native_latitude": xxxx,
      "native_location_supported": 1,
      "native_longitude": xxxxx,
      "native_type": "wgs",
      "power": 0,
      "shift_state": null,
      "speed": null,
      "timestamp": 1698511088731
    },
    "gui_settings": {
      "gui_24_hour_time": true,
      "gui_charge_rate_units": "kW",
      "gui_distance_units": "km/hr",
      "gui_range_display": "Rated",
      "gui_temperature_units": "C",
      "gui_tirepressure_units": "Bar",
      "show_range_units": false,
      "timestamp": 1698511088731
    },
    "vehicle_config": {
      "aux_park_lamps": "Eu",
      "badge_version": 1,
      "can_accept_navigation_requests": true,
      "can_actuate_trunks": true,
      "car_special_type": "base",
      "car_type": "modely",
      "charge_port_type": "CCS",
      "cop_user_set_temp_supported": true,
      "dashcam_clip_save_supported": true,
      "default_charge_to_max": false,
      "driver_assist": "TeslaAP3",
      "ece_restrictions": true,
      "efficiency_package": "MY2021",
      "eu_vehicle": true,
      "exterior_color": "PearlWhite",
      "exterior_trim": "Black",
      "exterior_trim_override": "",
      "has_air_suspension": false,
      "has_ludicrous_mode": false,
      "has_seat_cooling": false,
      "headlamp_type": "Global",
      "interior_trim_type": "Black2",
      "key_version": 2,
      "motorized_charge_port": true,
      "paint_color_override": "11,129,12,0.9,0.3",
      "performance_package": "Base",
      "plg": true,
      "pws": true,
      "rear_drive_unit": "PM216MOSFET",
      "rear_seat_heaters": 1,
      "rear_seat_type": 0,
      "rhd": false,
      "roof_color": "RoofColorGlass",
      "seat_type": null,
      "spoiler_type": "None",
      "sun_roof_installed": null,
      "supports_qr_pairing": false,
      "third_row_seats": "None",
      "timestamp": 1698511088731,
      "trim_badging": "74d",
      "use_range_badging": true,
      "utc_offset": 7200,
      "webcam_selfie_supported": true,
      "webcam_supported": true,
      "wheel_type": "Apollo19"
    },
    "vehicle_state": {
      "api_version": 63,
      "autopark_state_v2": "standby",
      "autopark_style": "dead_man",
      "calendar_supported": true,
      "car_version": "2023.32.9 757be7f0a072",
      "center_display_state": 0,
      "dashcam_clip_save_available": true,
      "dashcam_state": "Recording",
      "df": 0,
      "dr": 0,
      "fd_window": 0,
      "feature_bitmask": "fbdffbff,f",
      "fp_window": 0,
      "ft": 0,
      "is_user_present": false,
      "last_autopark_error": "no_error",
      "locked": true,
      "media_info": {
        "audio_volume": 2.6667,
        "audio_volume_increment": 0.333333,
        "audio_volume_max": 10.333333,
        "media_playback_status": "Stopped",
        "now_playing_album": "",
        "now_playing_artist": "",
        "now_playing_duration": 0,
        "now_playing_elapsed": 0,
        "now_playing_source": "16",
        "now_playing_station": "Ingen enhet ansluten",
        "now_playing_title": ""
      },
      "media_state": {
        "remote_control_enabled": true
      },
      "notifications_supported": true,
      "odometer": 22439.462113,
      "parsed_calendar_supported": true,
      "pf": 0,
      "pr": 0,
      "rd_window": 0,
      "remote_start": false,
      "remote_start_enabled": false,
      "remote_start_supported": true,
      "rp_window": 0,
      "rt": 0,
      "santa_mode": 0,
      "sentry_mode": true,
      "sentry_mode_available": true,
      "service_mode": false,
      "service_mode_plus": false,
      "smart_summon_available": true,
      "software_update": {
        "download_perc": 0,
        "expected_duration_sec": 2700,
        "install_perc": 1,
        "status": "",
        "version": " "
      },
      "speed_limit_mode": {
        "active": false,
        "current_limit_mph": 85,
        "max_limit_mph": 120,
        "min_limit_mph": 50,
        "pin_code_set": false
      },
      "summon_standby_mode_enabled": false,
      "timestamp": 1698511088731,
      "tpms_hard_warning_fl": false,
      "tpms_hard_warning_fr": false,
      "tpms_hard_warning_rl": false,
      "tpms_hard_warning_rr": false,
      "tpms_last_seen_pressure_time_fl": 1698492860,
      "tpms_last_seen_pressure_time_fr": 1698492830,
      "tpms_last_seen_pressure_time_rl": 1698492860,
      "tpms_last_seen_pressure_time_rr": 1698492830,
      "tpms_pressure_fl": 2.85,
      "tpms_pressure_fr": 3.05,
      "tpms_pressure_rl": 2.875,
      "tpms_pressure_rr": 2.95,
      "tpms_rcp_front_value": 2.9,
      "tpms_rcp_rear_value": 2.9,
      "tpms_soft_warning_fl": false,
      "tpms_soft_warning_fr": false,
      "tpms_soft_warning_rl": false,
      "tpms_soft_warning_rr": false,
      "valet_mode": false,
      "valet_pin_needed": true,
      "vehicle_name": "Teslan",
      "vehicle_self_test_progress": 0,
      "vehicle_self_test_requested": false,
      "webcam_available": true
    }
  }
}

Contributor guide