alandtse / tesla

Tesla custom integration for Home Assistant. This requires a refresh token be generated by third-party apps to login.
Apache License 2.0
596 stars 99 forks source link

device_tracker.location_tracker location not working anymore #783

Closed Thlerry closed 11 months ago

Thlerry commented 11 months ago

Version of the custom_component

VERSION = "3.18.0"

Configuration

#  SPDX-License-Identifier: Apache-2.0
api:
  name: Run API Command
  # Description of the service
  description: Run an API command using controller.api. https://teslajsonpy.readthedocs.io/en/latest/teslajsonpy/teslajsonpy.html#teslajsonpy.Controller.api
  # Different fields that your service accepts
  fields:
    # Key of the field
    email:
      # Description of the field
      description: Email address (optional if only one account)
      # Example value that can be passed for this field
      example: "elon@tesla.com"
      required: false
      selector:
        text:
    command:
      # Description of the field
      description: Command to run. See https://github.com/zabuldon/teslajsonpy/blob/master/teslajsonpy/endpoints.json
      # Example value that can be passed for this field
      example: "WAKE_UP"
      required: true
      selector:
        text:
    parameters:
      # Description of the field
      description: Parameters in a dictionary. `path_vars` replace variables in endpoints.json path. All others are passed directly to controller.api. For command parameters see https://tesla-api.timdorr.com/vehicle/commands.
      # Example value that can be passed for this field
      example: '{"path_vars": {"vehicle_id":"1"}, "wake_if_asleep":True}'
      required: true
      selector:
        object:

polling_interval:
  name: Set Polling Interval
  description: Set polling interval for updating fresh data from an awake car
  fields:
    email:
      # Description of the field
      description: Email address (optional if only one account)
      # Example value that can be passed for this field
      example: "elon@tesla.com"
      required: false
      selector:
        text:
    vin:
      # Description of the field
      description: Vehicle VIN (if not provided then default polling interval will be updated)
      # Example value that can be passed for this field
      example: "5YJSA11111111111"
      required: false
      selector:
        text:
    scan_interval:
      description: Number of seconds between each poll.  See https://github.com/alandtse/tesla/wiki/Polling-policy more information.
      example: 660
      required: true
      default: 660
      selector:
        number:
          min: -1
          max: 3600
          step: 30
          unit_of_measurement: "s"

Describe the bug

Since the last update from Tesla, I think it started with 2023.38.6, the device_tracker.location_tracker doesn't report the location of the car anymore. It is still working with the Destination entity.

Logbook Start date November 18, 2023 at 12:00 AM End date November 19, 2023 at 12:00 PM Entity Tesla November 19, 2023 Tesla was detected at unknown 10:42:44 AM - 9 minutes ago Tesla was detected at unavailable 10:42:43 AM - 9 minutes ago

Debug log


Home Assistant Core
2023-11-19 10:57:45.294 WARNING (SyncWorker_4) [homeassistant.loader] We found a custom integration tesla_custom which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-11-19 10:57:52.026 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {'hacs', 'persistent_notification', 'ipp', 'counter', 'influxdb', 'hardware', 'stt', 'script', 'my', 'media_source', 'auth', 'repairs', 'upnp', 'input_button', 'image_upload', 'energy', 'solaredge_modbus', 'onboarding', 'sensor', 'solaredgeoptimizers', 'blueprint', 'wake_word', 'radio_browser', 'logbook', 'sun', 'trace', 'assist_pipeline', 'default_config', 'alert', 'homeassistant_alerts', 'system_health', 'automation', 'input_number', 'lovelace', 'cast', 'config', 'map', 'device_automation', 'google_translate', 'tesla_custom', 'search', 'stream', 'tesla_wall_connector', 'met', 'mobile_app', 'input_boolean', 'conversation', 'plex', 'file_upload', 'schedule', 'input_select', 'denonavr', 'application_credentials', 'utility_meter', 'analytics', 'scene', 'history', 'input_text', 'input_datetime', 'person', 'timer', 'tts', 'shopping_list', 'diagnostics', 'zone', 'tag'}
2023-11-19 10:57:56.652 INFO (MainThread) [homeassistant.setup] Setting up tesla_custom
2023-11-19 10:57:56.653 INFO (MainThread) [homeassistant.setup] Setup of domain tesla_custom took 0.0 seconds
2023-11-19 10:57:57.946 INFO (MainThread) [custom_components.tesla_custom.teslamate] Cannot unsub from TeslaMate as MQTT has not been configured.
2023-11-19 10:57:57.946 DEBUG (MainThread) [custom_components.tesla_custom] Connected to the Tesla API
2023-11-19 10:57:57.951 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.tesla_custom
2023-11-19 10:57:57.954 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.tesla_custom
2023-11-19 10:57:57.955 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.tesla_custom
2023-11-19 10:57:57.957 INFO (MainThread) [homeassistant.components.button] Setting up button.tesla_custom
2023-11-19 10:57:57.959 INFO (MainThread) [homeassistant.components.select] Setting up select.tesla_custom
2023-11-19 10:57:57.960 INFO (MainThread) [homeassistant.components.update] Setting up update.tesla_custom
2023-11-19 10:57:57.962 INFO (MainThread) [homeassistant.components.number] Setting up number.tesla_custom
2023-11-19 10:57:57.988 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 10:57:58.067 INFO (MainThread) [homeassistant.components.cover] Setting up cover.tesla_custom
2023-11-19 10:57:58.067 INFO (MainThread) [homeassistant.components.text] Setting up text.tesla_custom
2023-11-19 10:57:58.068 INFO (MainThread) [homeassistant.components.climate] Setting up climate.tesla_custom
2023-11-19 10:57:58.069 INFO (MainThread) [homeassistant.components.lock] Setting up lock.tesla_custom
2023-11-19 10:57:58.071 INFO (MainThread) [homeassistant.components.switch] Setting up switch.tesla_custom
2023-11-19 10:57:58.078 DEBUG (MainThread) [custom_components.tesla_custom.teslamate] Got car ID. VIN:LRW3F7FS4NC723138 TeslamateID: None
2023-11-19 10:57:58.489 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.501 seconds (success: True)
2023-11-19 10:58:07.889 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 10:58:07.889 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2023-11-19 10:58:07.978 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 10:58:09.149 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 1.171 seconds (success: True)
2023-11-19 10:58:17.888 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 10:58:17.889 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2023-11-19 10:58:18.978 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 10:58:20.041 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 1.063 seconds (success: True)
2023-11-19 10:58:27.888 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 10:58:27.889 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2023-11-19 10:58:29.978 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 10:58:30.832 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.853 seconds (success: True)
2023-11-19 10:58:37.888 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 10:58:37.889 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2023-11-19 10:58:40.978 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 10:58:42.105 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 1.127 seconds (success: True)
2023-11-19 10:58:47.888 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 10:58:47.889 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2023-11-19 10:58:51.978 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 10:58:52.866 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.888 seconds (success: True)
2023-11-19 10:58:57.889 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 10:58:58.610 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.721 seconds (success: True)
2023-11-19 10:59:02.977 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 10:59:03.432 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.455 seconds (success: True)
2023-11-19 10:59:08.889 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 10:59:08.890 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2023-11-19 10:59:12.978 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 10:59:14.117 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 1.140 seconds (success: True)
2023-11-19 10:59:18.890 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 10:59:18.890 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2023-11-19 10:59:23.977 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 10:59:24.993 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 1.016 seconds (success: True)
2023-11-19 10:59:28.890 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 10:59:28.890 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2023-11-19 10:59:34.977 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 10:59:35.875 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.897 seconds (success: True)
2023-11-19 10:59:38.149 INFO (MainThread) [custom_components.tesla_custom.teslamate] Cannot unsub from TeslaMate as MQTT has not been configured.
2023-11-19 10:59:38.149 DEBUG (MainThread) [custom_components.tesla_custom] Unloaded entry for thierry.bensoussan@gmail.com
2023-11-19 10:59:39.396 INFO (MainThread) [custom_components.tesla_custom.teslamate] Cannot unsub from TeslaMate as MQTT has not been configured.
2023-11-19 10:59:39.396 DEBUG (MainThread) [custom_components.tesla_custom] Connected to the Tesla API
2023-11-19 10:59:39.397 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.tesla_custom
2023-11-19 10:59:39.397 INFO (MainThread) [homeassistant.components.lock] Setting up lock.tesla_custom
2023-11-19 10:59:39.398 INFO (MainThread) [homeassistant.components.climate] Setting up climate.tesla_custom
2023-11-19 10:59:39.398 INFO (MainThread) [homeassistant.components.cover] Setting up cover.tesla_custom
2023-11-19 10:59:39.398 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.tesla_custom
2023-11-19 10:59:39.398 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.tesla_custom
2023-11-19 10:59:39.399 INFO (MainThread) [homeassistant.components.switch] Setting up switch.tesla_custom
2023-11-19 10:59:39.399 INFO (MainThread) [homeassistant.components.button] Setting up button.tesla_custom
2023-11-19 10:59:39.399 INFO (MainThread) [homeassistant.components.select] Setting up select.tesla_custom
2023-11-19 10:59:39.399 INFO (MainThread) [homeassistant.components.update] Setting up update.tesla_custom
2023-11-19 10:59:39.399 INFO (MainThread) [homeassistant.components.number] Setting up number.tesla_custom
2023-11-19 10:59:39.399 INFO (MainThread) [homeassistant.components.text] Setting up text.tesla_custom
2023-11-19 10:59:39.426 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 10:59:39.437 DEBUG (MainThread) [custom_components.tesla_custom.teslamate] Got car ID. VIN:LRW3F7FS4NC723138 TeslamateID: None
2023-11-19 10:59:40.130 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.704 seconds (success: True)
2023-11-19 10:59:48.806 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 10:59:48.807 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2023-11-19 10:59:49.872 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 10:59:50.918 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 1.047 seconds (success: True)
2023-11-19 10:59:58.806 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 10:59:58.807 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2023-11-19 11:00:00.873 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:00:02.111 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 1.238 seconds (success: True)
2023-11-19 11:00:08.806 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:00:08.807 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2023-11-19 11:00:11.873 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:00:12.761 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.888 seconds (success: True)
2023-11-19 11:00:18.806 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:00:18.806 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2023-11-19 11:00:22.872 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:00:23.899 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 1.027 seconds (success: True)
2023-11-19 11:00:28.806 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:00:28.806 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2023-11-19 11:00:33.872 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:00:35.070 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 1.198 seconds (success: True)
2023-11-19 11:00:38.806 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:00:39.049 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.243 seconds (success: True)
2023-11-19 11:00:44.873 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:00:45.945 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 1.073 seconds (success: True)
2023-11-19 11:00:48.806 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:00:48.806 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2023-11-19 11:00:55.872 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:00:56.832 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.960 seconds (success: True)
2023-11-19 11:00:58.806 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:00:58.807 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2023-11-19 11:01:06.872 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:01:08.037 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 1.165 seconds (success: True)
2023-11-19 11:01:08.806 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:01:08.807 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2023-11-19 11:01:17.873 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:01:18.784 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.911 seconds (success: True)
2023-11-19 11:01:18.806 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:01:18.806 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2023-11-19 11:01:28.807 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:01:28.807 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2023-11-19 11:01:28.872 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:01:29.933 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 1.062 seconds (success: True)
2023-11-19 11:01:38.807 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:01:39.493 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.686 seconds (success: True)
2023-11-19 11:01:40.401 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:01:40.914 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.513 seconds (success: True)
2023-11-19 11:01:48.805 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:01:48.806 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2023-11-19 11:01:50.872 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:01:51.875 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 1.003 seconds (success: True)
2023-11-19 11:01:58.807 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:01:58.807 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2023-11-19 11:02:01.872 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:02:02.740 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.868 seconds (success: True)
2023-11-19 11:02:08.806 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:02:08.806 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2023-11-19 11:02:12.872 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:02:13.947 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 1.075 seconds (success: True)
2023-11-19 11:02:18.806 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:02:18.806 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2023-11-19 11:02:23.872 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:02:24.846 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.974 seconds (success: True)
2023-11-19 11:02:28.806 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:02:28.806 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2023-11-19 11:02:34.900 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:02:36.045 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 1.145 seconds (success: True)
2023-11-19 11:02:38.807 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-11-19 11:02:39.047 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.241 seconds (success: True)
skipishere commented 11 months ago

This was fixed in 3.19.3. Can you try using latest and letting us know if that works

Thlerry commented 11 months ago

I didn't notice the new version. Is there a way to have a prompt ? I updated and it looks good now. Thanks!

alandtse commented 11 months ago

That would be a HACS feature. It's supposed to update regularly and it'll appear in your HA update list. If that's not working, that's a HACS bug.