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
552 stars 99 forks source link

Teslamate integration initial setup should allow for MQTT integration #983

Open tehinfidel opened 1 month ago

tehinfidel commented 1 month ago

Is there an existing issue for this?

I have read about the Fleet API and understand I may need to use it

Version of the Tesla component

3.22.0

Version of the Tesla car software

2024.14.9

Model

Model 3

Current Behavior

For someone with a running and working Teslamate installation publishing to MQTT, this (excellent) integration does not appear to (easily) allow the Teslamate MQTT integration to be configured at install time. The integration installer has a checkbox to use the Fleet API, then opens a dialog box requesting email, refresh API, etc., appearing to expect to set up a second API connection directly to the Tesla cloud.

Based on Teslamate already running and from my IP, I have concerns (especially from the text at the top of the MQTT integration wiki) that they may conflict.

Expected Behavior

An option to begin configuration of the integration as an alternative to setting up a separate connection to the API for this integration -- if that is possible.

Debug logs

n/a -- installation not completed as halted before configuring.

Anything else?

  1. Does this integration, when used with its Teslamate MQTT feature, require its own separate access to the Tesla API?
  2. If so, should I reconfigure teslamate with a new API key and then go ahead use the same API/refresh tokens to configure both so that it appears to the tesla cloud servers that I am only using one? a. My concerns with configuring both are per your MQTT wiki: "It has limitations such as only allowing one client at a time and improper management could lead to the vehicle not going to sleep."
  3. I see the option/envvar DEFAULT_ENABLE_TESLAMATE at custom_components/tesla_custom/init.py:43; is there a way I can preconfigure the integration to use the Teslamate MQTT option before setup, and bypass the initial integration questions?

All of the above said, thank you for your effort in making and maintaining this integration.