alandtse / tesla Goto Github PK
View Code? Open in Web Editor NEWTesla custom integration for Home Assistant. This requires a refresh token be generated by third-party apps to login.
License: Apache License 2.0
Tesla custom integration for Home Assistant. This requires a refresh token be generated by third-party apps to login.
License: Apache License 2.0
I'd love ability to trigger Homelink via a button or a service. The API should be available as per: https://tesla-api.timdorr.com/vehicle/commands/homelink
I see this switch but unsure what it does?
Also, what is the guidance of polling interval? Is this a basic polling interval or is there any special heuristics to reduce polling/vampire drain?
I updated to the latest version of the custom integration, generated the SSO keys using the "Tesla Tokens" app. When I type in my email address and paste the SSO key I get the following error:
Logger: custom_components.tesla_custom.config_flow
Source: custom_components/tesla_custom/config_flow.py:167
Integration: Tesla Custom Integration (documentation, issues)
First occurred: 6:13:13 PM (9 occurrences)
Last logged: 7:42:54 PM
I also tried using the API token as the email address just in case (but it didn't work either).
## This configuration.yaml file is provided by the Home Assistant Core iocage-jail for TrueNAS Core
# Learn more at https://www.home-assistant.io/docs/configuration
homeassistant:
# https://www.home-assistant.io/docs/configuration/customizing-devices/
customize: !include customize.yaml
# https://www.home-assistant.io/docs/configuration/packages/#create-a-packages-folder
packages: !include_dir_named packages
http:
# https://www.home-assistant.io/integrations/http/#ip_ban_enabled
ip_ban_enabled: False
login_attempts_threshold: 5
## Configure a default setup of Home Assistant Core (frontend, api, etc)
# Learn more at https://www.home-assistant.io/integrations/default_config
default_config:
# Text to speech
tts:
- platform: google_translate
# Frontend
frontend:
themes: !include_dir_merge_named themes
# Custom Work
media_player:
- platform: yamaha
host: 192.168.86.167
source_names:
HDMI1: "Apple TV"
HDMI2: "Shield"
HDMI3: "PS5"
HDMI4: "Switch"
HDMI5: "Blu-ray"
zone_names:
Main_Zone: "Living Room"
Zone_2: "Patio"
sleepiq:
username: !secret
password: !secret
wake_on_lan:
samsungtv:
- host: 192.168.86.62
turn_on_action:
- service: wake_on_lan.send_magic_packet
data:
mac: BC:8C:CD:D8:FE:CB
spotify:
client_id: !secret
client_secret: !secret
sensor:
- platform: bitcoin
display_options:
- exchangerate
- trade_volume_btc
#aarlo:
# username: !secret
# password: !secret arlo_password
# refresh_devices_every: 2
# stream_timeout: 120
# tfa_source: push
# tfa_type: PUSH
#alarm_control_panel:
# - platform: aarlo
# away_mode_name: armed
# home_mode_name: Geofencing
# night_mode_name: night
# trigger_time: 30
# alarm_volume: 8
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
light: !include lights.yaml
#tesla_cc: !include tesla.yaml
logger:
default: info
logs:
hacs: debug
custom_components.hacs: debug
queueman: debug
aiogithubapi: debug
Unable to set up "Tesla Custom Integration" via the Integrations, when adding email and refresh token error "Unknown Error Occurred" there is MFA on the account, but it worked fine prior to upgrading.
Add your logs here.
This error originated from a custom integration.
Logger: aiohttp.server
Source: custom_components/tesla_custom/config_flow.py:160
Integration: tesla_custom (documentation, issues)
First occurred: 12:42:20 (3 occurrences)
Last logged: 12:43:18
Error handling request
Traceback (most recent call last):
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/forwarded.py", line 98, in forwarded_middleware
return await handler(request)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
return await handler(request)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/auth.py", line 144, in auth_middleware
return await handler(request)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/view.py", line 136, in handle
result = await result
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/config/config_entries.py", line 157, in post
return await super().post(request, flow_id)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/data_validator.py", line 62, in wrapper
result = await method(view, request, *args, **kwargs)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/data_entry_flow.py", line 111, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/data_entry_flow.py", line 198, in async_configure
result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/data_entry_flow.py", line 256, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/home/homeassistant/homeassistant/custom_components/tesla_custom/config_flow.py", line 56, in async_step_user
info = await validate_input(self.hass, user_input)
File "/home/homeassistant/homeassistant/custom_components/tesla_custom/config_flow.py", line 160, in validate_input
result = await controller.connect(test_login=True)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/teslajsonpy/controller.py", line 349, in connect
self.__energysite_name[energysite_id] = energysite["site_name"]
KeyError: 'site_name'
v1.1.0
Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/tesla_custom/climate.py:96
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 13:48:49 (3 occurrences)
Last logged: 13:49:33
[281472551118208] command() missing 1 required positional argument: 'name'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 185, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1491, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1526, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 658, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 830, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 695, in _handle_entity_call
await result
File "/config/custom_components/tesla_custom/tesla_device.py", line 35, in wrapped
result = await func(*args, **kwargs)
File "/config/custom_components/tesla_custom/climate.py", line 96, in async_set_hvac_mode
await self.tesla_device.set_status(False)
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/homeassistant/climate.py", line 139, in set_status
data = await self._controller.command(
File "/usr/local/lib/python3.9/site-packages/backoff/_async.py", line 133, in retry
ret = await target(*args, **kwargs)
TypeError: command() missing 1 required positional argument: 'name'
When attempting to change the HVAC mode (using either climate.turn_on or climate.set_hvac_mode), the service call fails and some variation of the above error is seen in the logs.
how to install teslajsonpy in HA?
i googled it but still have no idea.
Source: loader.py:490
First occurred: 11:59:40 (5 occurrences)
Last logged: 11:59:40
Unexpected error importing tesla_custom/media_source.py
Unexpected error importing tesla_custom/group.py
Unexpected error importing tesla_custom/system_health.py
Unexpected error importing tesla_custom/logbook.py
Unexpected error importing tesla_custom/significant_change.py
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 30, in _process
platform = integration.get_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 485, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 490, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'custom_components.tesla.media_source'
Trying to configure the Tesla custom integration using the exact steps as described here: https://community.home-assistant.io/t/tesla-integration-not-working/274817/172
Please look at the exact reply referenced above.
2021-09-28 14:25:44 ERROR (MainThread) [custom_components.tesla_custom.config_flow] Authentication error: Need oauth credentials
All
Add your logs here.
After an update of HA, tesla_custom will not load.
Logger: homeassistant.config_entries
Source: config_entries.py:671
First occurred: 9:29:15 PM (1 occurrences)
Last logged: 9:29:15 PM
Error occurred loading configuration flow for integration tesla_custom: cannot import name 'get_content_type' from 'authcaptureproxy.helper' (/usr/local/lib/python3.8/site-packages/authcaptureproxy/helper.py)
It takes up to 40 seconds after command is sent to the car before it reacts. From the Tesla-app it takes max 5 seconds. And the car is not asleep.
Latest
Logger: homeassistant
Source: custom_components/tesla_custom/sensor.py:108
Integration: Tesla Custom Integration (documentation, issues)
First occurred: 11:08:57 (22 occurrences)
Last logged: 11:30:09
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 134, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 265, in _async_refresh
update_callback()
File "/config/custom_components/tesla_custom/tesla_device.py", line 112, in refresh
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 464, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 501, in _async_write_ha_state
extra_state_attributes = self.extra_state_attributes
File "/config/custom_components/tesla_custom/sensor.py", line 108, in extra_state_attributes
"charger_power": self.tesla_device.charger_power,
AttributeError: 'ChargingSensor' object has no attribute 'charger_power'
It might be not a bug, but I can't see or do the following :
Add your logs here.
I am glad that this integration works, I was wondering if the tracker entity would be something that could be put into this version?
Is your feature request related to a problem? Please describe.
No.
Describe the solution you'd like
I'd like to see how much power I've generated today, not just the current output of the array.
Describe alternatives you've considered
I tried using the sum integration but it doesn't seem to work properly.
Additional context
Here's a screenshot showing how the estimated solar production integration looks and the Tesla solar report directly above it:
Latest, i'm unable to get it running even initially
I'm on HA OS on an RPi4, running HA 2021.8.6
I've added the repo to HACS, rebooted HA (twice), the integration shows up in HACS, but when i go to Configuration/Integrations and try to add it, the Tesla custom component does not show up. I wondered whether i would need to remove the Tesla integration that DOES show up, but have no idea if that is possible for my current config and if so, how.
Happy to supply logs, but as far as i can see, there are no relevant messages in the log that explain why the custom Tesla integration does not show up
v0.2.0
Installed via HACS. Configured via GUI config flow. No errors to report (this is a logic issue, not an error/exception).
The new energy management stuff in Home Assistant expects that you have an entity which "counts up" as usage is measured, and then at some point if that entity resets to 0, the last_reset
attribute on the sensor should be updated to the current timestamp.
The current charge sensor is not behaving this way.
Because the last_reset
attribute was updated without the sensor resetting, Home Assistant doesn't track any usage in the energy dashboard:
Essentially, the last_reset
value must be updated nightly at 12 AM, and at the same moment, the sensor must be reset to 0.
Today - in 2021.8.x - this is broken.
However, as of 2 days ago, they announced that this mechanism was "deprecated": https://developers.home-assistant.io/blog/2021/08/16/state_class_total (Of course, just as people were starting to implement this whole thing... 🙄)
And instead, they are adding state_class: total_increasing
which represents an entity that counts up forever (unless HA restarts).
Ideally, since this custom component is developed much more rapidly than the official integration (ahem...OAuth... 🙄), it would be awesome if we could:
last_reset
attribute issue and push a new version, so that energy monitoring starts working today for users that have this configuredstate_class: total_increasing
(or just use the existing state_class: measurement
since it sounds like they are tweaking the logic behind this?) and wait for HA to release with these changeslast_reset
attribute (or leave it... it probably doesn't hurt anything? HA just won't read it.)I am not a strong Python developer, but if this is really easy to fix and someone could point me in the right direction, I can take a crack at it. I can write Python but I don't have familiarity with running tests or anything like that, sorry. 😅 I want to help if I can, because I think it would be really cool for HA to track my overall kWh used for charging my Tesla!
1.2.0
service: tesla_custom.api
data:
command: CHANGE_CLIMATE_TEMPERATURE_SETTING
parameters:
path_vars:
vehicle_id: '786889216'
driver_temp: 23.0
passenger_temp: 23.0
wake_if_asleep: true
or
service: tesla_custom.api
data:
command: REMOTE_SEAT_HEATER_REQUEST
parameters:
path_vars:
vehicle_id: '786889216'
heater: 1
level: 1
wake_if_asleep: true
Can't seem to get any tesla_custom.api service calls to work.
Both the above examples return an UnknownError immediately. I imagine i'm doing something wrong, but not sure what. I grabbed the vehicle_id from teslafi - it should always be the same, right?
Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/tesla_custom/services.py:89
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 4:13:54 PM (3 occurrences)
Last logged: 4:24:49 PM[281473288586144] Error handling message: Unknown error
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 525, in handle_execute_script
await script_obj.async_run(msg.get("variables"), context=context)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1219, in async_run
await asyncio.shield(run.async_run())
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 353, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 371, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 571, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1491, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1526, in _execute_service
await handler.job.target(service_call)
File "/config/custom_components/tesla_custom/services.py", line 43, in async_call_tesla_service
await api(service_call)
File "/config/custom_components/tesla_custom/services.py", line 89, in api
return await controller.api(name=command, path_vars=path_vars, **parameters)
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/controller.py", line 166, in wake_up
result = await wrapped(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/controller.py", line 1180, in api
return await self.__connection.post(
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/connection.py", line 167, in post
return await self.__open(
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/connection.py", line 218, in __open
raise TeslaException(resp.status_code)
teslajsonpy.exceptions.TeslaException
using 1.2.1
The Tesla API is called every 1 minute. I thought the cadence should be throttled at 10 mins (600 seconds?)
2021-10-19 10:24:30 DEBUG (MainThread) [teslajsonpy.controller] Updating 184280630899
2021-10-19 10:24:30 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 43 days, 18:37:27
2021-10-19 10:24:30 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/energy_sites/184280630899/live_status {}
2021-10-19 10:24:30 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":{"solar_power":2531,"timestamp":"2021-10-19T10:24:20-07:00"}}
2021-10-19 10:24:30 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.287 seconds (success: True)
2021-10-19 10:25:30 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 43 days, 18:36:27
2021-10-19 10:25:30 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/vehicles {}
2021-10-19 10:25:30 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":[],"count":0}
2021-10-19 10:25:30 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/products {}
2021-10-19 10:25:30 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":[{"energy_site_id":184280630899,"resource_type":"solar","site_name":"Villa Madrona","id":"c7ff07a3-0dad-4b6a-a8d9-1674bd7d7385","asset_site_id":"33d9bc12-b870-4189-8ce7-c0799de0381d","solar_power":1120,"solar_type":"pv_panel","sync_grid_alert_enabled":false,"breaker_alert_enabled":false,"components":{"battery":false,"solar":true,"solar_type":"pv_panel","grid":true,"load_meter":false,"market_type":"residential"}}],"count":1}
2021-10-19 10:25:30 DEBUG (MainThread) [teslajsonpy.controller] Updating 184280630899
2021-10-19 10:25:30 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/energy_sites/184280630899/live_status {}
2021-10-19 10:25:30 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":{"solar_power":0,"grid_status":"Unknown","grid_services_active":false,"timestamp":"2021-10-19T10:25:30-07:00"}}
2021-10-19 10:25:30 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.697 seconds (success: True)
2021-10-19 10:26:30 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 43 days, 18:35:27
2021-10-19 10:26:30 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/vehicles {}
2021-10-19 10:26:30 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":[],"count":0}
2021-10-19 10:26:30 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/products {}
2021-10-19 10:26:30 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":[{"energy_site_id":184280630899,"resource_type":"solar","site_name":"Villa Madrona","id":"c7ff07a3-0dad-4b6a-a8d9-1674bd7d7385","asset_site_id":"33d9bc12-b870-4189-8ce7-c0799de0381d","solar_power":1120,"solar_type":"pv_panel","sync_grid_alert_enabled":false,"breaker_alert_enabled":false,"components":{"battery":false,"solar":true,"solar_type":"pv_panel","grid":true,"load_meter":false,"market_type":"residential"}}],"count":1}
2021-10-19 10:26:30 DEBUG (MainThread) [teslajsonpy.controller] Updating 184280630899
2021-10-19 10:26:30 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/energy_sites/184280630899/live_status {}
2021-10-19 10:26:30 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":{"solar_power":3429,"timestamp":"2021-10-19T10:26:29-07:00"}}
2021-10-19 10:26:30 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.342 seconds (success: True)
2021-10-19 10:27:30 DEBUG (MainThread) [teslajsonpy.controller] Updating 184280630899
2021-10-19 10:27:30 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 43 days, 18:34:27
2021-10-19 10:27:30 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/energy_sites/184280630899/live_status {}
2021-10-19 10:27:30 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":{"solar_power":3101,"timestamp":"2021-10-19T10:27:29-07:00"}}
2021-10-19 10:27:30 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.173 seconds (success: True)
I'm not 100% sure if this is a bug or a feature request. As reported in #4 many of the entities stay in an unknown state until the car is awakened. This is understandable if the car was never awake when the first (or any subsequent) polling happen.
The problem I see is after a successful update happens (the car was awake when polled). If the car goes back to sleep, all the entities go back to being unknown. This shouldn't be the case for most (if not all) of the entities. When a car is asleep, many of these values remain constant. For example, the mileage_sensor
should show the last valid value and keep that value until a successful update happens, the same should happen with the location_tracker
. I would argue that this behavior should happen with every single entity. The temperature sensor might be an exception, but I rather see the last temperature recorded in my car rather than nothing at all.
Another issue is that some entities default to showing that some doors are actually unlocked, due to the behavior described here (and in #4). The entities are not even greyed out, showing them as unlocked and giving you the option to lock them, which will wake up the car unnecessarily. As an example (see the image in #4), the frunk and trunk locks have this problem.
An example of what we could do if these changes are implemented: we could check the battery (or range) sensors, without waking up the car, to have a rough estimate of how much battery (or range) the car has. I know that there's a drain in the battery even in sleep mode, and it could be as much as 1-2% per day. Nonetheless, being able to have a rough estimate without having to wake up the car is very helpful.
Is your feature request related to a problem? Please describe.
The Tesla API recently introduced new functionality related to setting and reading the preferred charging rate in Amps and it would be great to have this included (without customising yaml with new services etc).
The use-case includes:
Describe the solution you'd like
A method to read the charge_current_request
and charge_current_request_max
values (HA sensors?) and a method to set the charging current ideally supported through the standard HA UI (which entity type? Requested Current (amps) will be 1 - 40 (or rather, 1 to charge_current_request_max)
Describe alternatives you've considered
Manually adjusting the charge rate in the app, or using a different tesla automation app.
See also discussion in telsajsonpy: zabuldon/teslajsonpy#246
1.0.0
N/A
If I turn off the polling switch for my car and then restart HA, the polling switch is turned back on. I would expect the state to be retained between HA restarts.
N/A
此错误来自自定义集成。
Logger: aiohttp.server
Source: custom_components/tesla_custom/config_flow.py:132
Integration: Tesla Custom Integration (documentation, issues)
First occurred: 22:57:35 (3 occurrences)
Last logged: 22:57:38
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 77, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 144, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 135, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 146, in get
return await super().get(request, flow_id)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 95, in get
result = await self._flow_mgr.async_configure(flow_id)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 202, in async_configure
result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 260, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/config/custom_components/tesla_custom/config_flow.py", line 132, in async_step_finish_oauth
self.controller.set_authorization_code(self.data.get("code", ""))
AttributeError: 'NoneType' object has no attribute 'get'
Add your logs here.
A clear and concise description of what the bug is.
Add your logs here.
0.2.1
n/a
In the tesla login page that is proxied, the Captcha doesn't load
Page URL in browser is :
https://myhomeassistantdomain/auth/tesla/proxy?config_flow_id=57a927ee399f4c178b1a6cc476ee35c1&callback_url=https://myhomeassistantdomain/auth/tesla/callback?flow_id%3D57a927ee399f4c178b1a6cc476ee35c1
2021-09-04 19:48:24 DEBUG (MainThread) [custom_components.tesla_custom.config_flow] Found flow_id; adding 10.1.0.42 to known_ips for 300 seconds
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Received get: https://myhomeassistant.mydomain/auth/tesla/proxy?config_flow_id=e5e4f5a18c31464cae282cb57b0dc019&callback_url=https://myhomeassistant.mydomain/auth/tesla/callback?flow_id%3De5e4f5a18c31464cae282cb57b0dc019 for https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Starting auth capture proxy for https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Final headers {'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Connection': 'keep-alive', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15', 'Accept-Language': 'en-us', 'Referer': 'https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA', 'Accept-Encoding': 'gzip, deflate, br', 'x-tesla-user-agent': 'TeslaApp/3.10.9-433/adff2e065/android/10', 'X-Requested-With': 'com.teslamotors.tesla'}
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Attempting get to https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA
headers: {'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Connection': 'keep-alive', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15', 'Accept-Language': 'en-us', 'Referer': 'https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA', 'Accept-Encoding': 'gzip, deflate, br', 'x-tesla-user-agent': 'TeslaApp/3.10.9-433/adff2e065/android/10', 'X-Requested-With': 'com.teslamotors.tesla'}
cookies: <CookieJar[]>
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] GET:
https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA with
{"host": "auth.tesla.com", "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "accept-encoding": "gzip, deflate, br", "connection": "keep-alive", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15", "accept-language": "en-us", "referer": "https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA", "x-tesla-user-agent": "TeslaApp/3.10.9-433/adff2e065/android/10", "x-requested-with": "com.teslamotors.tesla"}
returned 200:OK with response Headers([('content-type', 'text/html; charset=utf-8'), ('x-dns-prefetch-control', 'off'), ('x-frame-options', 'DENY'), ('strict-transport-security', 'max-age=15552000; includeSubDomains'), ('x-download-options', 'noopen'), ('x-content-type-options', 'nosniff'), ('x-xss-protection', '1; mode=block'), ('x-request-id', 'c98fd737-9f8d-49cf-a808-879d99dbb2bd'), ('x-correlation-id', 'c98fd737-9f8d-49cf-a808-879d99dbb2bd'), ('cache-control', 'no-store'), ('content-security-policy', "connect-src 'self'; default-src 'none'; font-src 'self' data: fonts.gstatic.com; frame-src 'self' www.google.com www.recaptcha.net; img-src 'self' data:; script-src www.recaptcha.net 'self' 'nonce-bb5c161230a3934f834a'; style-src 'unsafe-inline' 'self'"), ('etag', 'W/"709a-rs8SRDKsYNnmvSHcERim/Rvo/TU"'), ('x-response-time', '20.291ms'), ('content-encoding', 'gzip'), ('x-edgeconnect-midmile-rtt', '16'), ('x-edgeconnect-origin-mex-latency', '175'), ('originip', '209.133.79.56'), ('x-akamai-transformed', '9 6251 0 pmb=mTOE,1'), ('date', 'Sat, 04 Sep 2021 17:48:24 GMT'), ('content-length', '6090'), ('connection', 'keep-alive'), ('vary', 'Accept-Encoding'), ('set-cookie', 'tesla-auth.sid=s%3AarDrMEgjr9U7ajsldIHGSyrfT1VYPhOM.EbBQKQy24%2BbtqnGFhGA9um2eDDR%2F9Ooux3loRDg0of4; Path=/; Expires=Tue, 07 Sep 2021 17:48:24 GMT; HttpOnly; Secure; SameSite=Lax'), ('origin_hostname', 'auth.tesla.com'), ('permissions-policy', 'interest-cohort=()'), ('set-cookie', '_abck=F7596CF8A824099CB6D526AC660394D2~-1~YAAQ0nRZaIFRyZ17AQAApv/ssQax2rEvAoEVSCm+LrA0f4gPT6HUiTcheIG34/CSLRAX4nL7KKQovkSKPCIMTooj9kn0ymZcak3ASIZ0/oc9+WYGz5zCo4xH02NNn4lgkZOysy6Q4SU0M2R32lpABG96FWOXbWL/iApmiD7QDRqynv4CcS6lY8UMylB0Ee1/gbTQ3wofptmzM/UxE5oAgB6rw1VKKii8uuo8e+HhJkstLS+QoFu8qdc4VFB5nOoZxx0S9zrkPTwXVvvA6xytlF4RYmFvWkDZl44lqM3faNF8nW6AdsawHeeUqycR8F+Am8ZI6z/aOSA7jInl2kEIafUVEZKNqvBx5eiPt+wo+3/jE3ETgafUkI2elvg=~-1~-1~-1; Domain=.tesla.com; Path=/; Expires=Sun, 04 Sep 2022 17:48:24 GMT; Max-Age=31536000; Secure'), ('set-cookie', 'ak_bmsc=86D6AA52AA22E3528A4E7BFCFDAE87F5~000000000000000000000000000000~YAAQ0nRZaIJRyZ17AQAApv/ssQ2fQnUh5UB7b03KViDtLWMNQbTZ6CJrHGX0R6Q0DDYVQM3mUyzBw9tQVlrnubgKXskheZZnMZ8/wXVgEO4XDswHTloX6KXWvpKyHtWG7Pypp4rhZZM4I05xJR2/swDU8NnjfD/15pFoNjs7epWNK3jadYhslcorUH1VqPhXFTJBT5XSMazYx53SIEmtLOnoDXWO4baA4dP8522B/SAY3VfLuLuVnVDSevV7q8V4ATNcRT4iqBArQPPtNDCc0ycTQBjbhkvcHaDxkCq2hgKt1tk4N+wV/xhReTGxMV0WjKkSwmx7kevNNDnEsOr1j8DQr2fE3uJiqVeEdGJQ6L4tIm5cE39sqH7t; Domain=.tesla.com; Path=/; Expires=Sat, 04 Sep 2021 19:48:24 GMT; Max-Age=7200; HttpOnly'), ('set-cookie', 'bm_sz=C034275AB655FEF9C8B9502642C0B967~YAAQ0nRZaINRyZ17AQAApv/ssQ20xVaSdef2MBbK/UZzR3Jy+VwkejzO/wXc6ZM4C2W7qIW2woUNL6ki96UJNBl0iVqGj09qenAxyiEI2t2u1g7blIPzAgxEmhryeBU//eJROqu1+AM5055Tv4sqyxuI41nNgRcq1M+wXrfKUJt8211vrD4Km0alZG9uzqeu5kNv4AuykI9p8dbVrLjwdUB60CqOOdV6T+/SqUjfpHNpPLgua4zeVN/c9gktnEqeUbjhtuB2yjwYv/UfEJouJSEnchMKYpwTQXAe4Xixa6neXQ==~3486773~4405060; Domain=.tesla.com; Path=/; Expires=Sat, 04 Sep 2021 21:48:24 GMT; Max-Age=14400')])
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Refreshed 1 tests: ['test_url']
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running coroutine test_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Refreshed 5 modifiers: ['prepend_relative_urls', 'change_host_to_proxy', 'change_empty_to_proxy', 'prepend_url_ajax', 'prepend_url_i18n']
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running coroutine prepend_relative_urls
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for script:src /static/js/i18next.bundle.min.js -> https://myhomeassistant.mydomain/auth/tesla/proxy/static/js/i18next.bundle.min.js
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for script:src /static/js/tds4-i18n.js -> https://myhomeassistant.mydomain/auth/tesla/proxy/static/js/tds4-i18n.js
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for script:src /static/js/minimal.bundle.js -> https://myhomeassistant.mydomain/auth/tesla/proxy/static/js/minimal.bundle.js
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for script:src /static/scripts/utils.js -> https://myhomeassistant.mydomain/auth/tesla/proxy/static/scripts/utils.js
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for script:src /static/js/tds4-site.js -> https://myhomeassistant.mydomain/auth/tesla/proxy/static/js/tds4-site.js
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for script:src /static/js/tds-text-inputs--password.js -> https://myhomeassistant.mydomain/auth/tesla/proxy/static/js/tds-text-inputs--password.js
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for script:src /VWl_M/DC/RL/vaO3/5yqzowz/ti5uk00p3r/SFwXZkc/QUELIm/ZyEms -> https://myhomeassistant.mydomain/auth/tesla/proxy/VWl_M/DC/RL/vaO3/5yqzowz/ti5uk00p3r/SFwXZkc/QUELIm/ZyEms
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for link:href /static/css/tds4-minimal.bundle.css -> https://myhomeassistant.mydomain/auth/tesla/proxy/static/css/tds4-minimal.bundle.css
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for link:href /static/css/tds4-shims.min.css -> https://myhomeassistant.mydomain/auth/tesla/proxy/static/css/tds4-shims.min.css
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for a:href /user/password/forgot -> https://myhomeassistant.mydomain/auth/tesla/proxy/user/password/forgot
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
[...]
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running coroutine change_host_to_proxy
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function swap_url
[...]
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for a:href https://www.tesla.com/support/tesla-app?redirect=no#privacy -> https://www.tesla.com/support/tesla-app?redirect=no
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function swap_url
[...]
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function swap_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running coroutine change_empty_to_proxy
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running coroutine prepend_url_ajax
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Found 0 patterns for method_func
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Received get: https://myhomeassistant.mydomain/auth/tesla/proxy/VWl_M/DC/RL/vaO3/5yqzowz/ti5uk00p3r/SFwXZkc/QUELIm/ZyEms for https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Final headers {'Accept': '*/*', 'Connection': 'keep-alive', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15', 'Accept-Language': 'en-us', 'Referer': 'https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA', 'Accept-Encoding': 'gzip, deflate, br', 'x-tesla-user-agent': 'TeslaApp/3.10.9-433/adff2e065/android/10', 'X-Requested-With': 'com.teslamotors.tesla'}
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Attempting get to https://auth.tesla.com/VWl_M/DC/RL/vaO3/5yqzowz/ti5uk00p3r/SFwXZkc/QUELIm/ZyEms
headers: {'Accept': '*/*', 'Connection': 'keep-alive', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15', 'Accept-Language': 'en-us', 'Referer': 'https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA', 'Accept-Encoding': 'gzip, deflate, br', 'x-tesla-user-agent': 'TeslaApp/3.10.9-433/adff2e065/android/10', 'X-Requested-With': 'com.teslamotors.tesla'}
cookies: <CookieJar[<Cookie _abck=F7596CF8A824099CB6D526AC660394D2~-1~YAAQ0nRZaIFRyZ17AQAApv/ssQax2rEvAoEVSCm+LrA0f4gPT6HUiTcheIG34/CSLRAX4nL7KKQovkSKPCIMTooj9kn0ymZcak3ASIZ0/oc9+WYGz5zCo4xH02NNn4lgkZOysy6Q4SU0M2R32lpABG96FWOXbWL/iApmiD7QDRqynv4CcS6lY8UMylB0Ee1/gbTQ3wofptmzM/UxE5oAgB6rw1VKKii8uuo8e+HhJkstLS+QoFu8qdc4VFB5nOoZxx0S9zrkPTwXVvvA6xytlF4RYmFvWkDZl44lqM3faNF8nW6AdsawHeeUqycR8F+Am8ZI6z/aOSA7jInl2kEIafUVEZKNqvBx5eiPt+wo+3/jE3ETgafUkI2elvg=~-1~-1~-1 for .tesla.com/>, <Cookie ak_bmsc=86D6AA52AA22E3528A4E7BFCFDAE87F5~000000000000000000000000000000~YAAQ0nRZaIJRyZ17AQAApv/ssQ2fQnUh5UB7b03KViDtLWMNQbTZ6CJrHGX0R6Q0DDYVQM3mUyzBw9tQVlrnubgKXskheZZnMZ8/wXVgEO4XDswHTloX6KXWvpKyHtWG7Pypp4rhZZM4I05xJR2/swDU8NnjfD/15pFoNjs7epWNK3jadYhslcorUH1VqPhXFTJBT5XSMazYx53SIEmtLOnoDXWO4baA4dP8522B/SAY3VfLuLuVnVDSevV7q8V4ATNcRT4iqBArQPPtNDCc0ycTQBjbhkvcHaDxkCq2hgKt1tk4N+wV/xhReTGxMV0WjKkSwmx7kevNNDnEsOr1j8DQr2fE3uJiqVeEdGJQ6L4tIm5cE39sqH7t for .tesla.com/>, <Cookie bm_sz=C034275AB655FEF9C8B9502642C0B967~YAAQ0nRZaINRyZ17AQAApv/ssQ20xVaSdef2MBbK/UZzR3Jy+VwkejzO/wXc6ZM4C2W7qIW2woUNL6ki96UJNBl0iVqGj09qenAxyiEI2t2u1g7blIPzAgxEmhryeBU//eJROqu1+AM5055Tv4sqyxuI41nNgRcq1M+wXrfKUJt8211vrD4Km0alZG9uzqeu5kNv4AuykI9p8dbVrLjwdUB60CqOOdV6T+/SqUjfpHNpPLgua4zeVN/c9gktnEqeUbjhtuB2yjwYv/UfEJouJSEnchMKYpwTQXAe4Xixa6neXQ==~3486773~4405060 for .tesla.com/>, <Cookie tesla-auth.sid=s%3AarDrMEgjr9U7ajsldIHGSyrfT1VYPhOM.EbBQKQy24%2BbtqnGFhGA9um2eDDR%2F9Ooux3loRDg0of4 for auth.tesla.com/>]>
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] GET:
https://auth.tesla.com/VWl_M/DC/RL/vaO3/5yqzowz/ti5uk00p3r/SFwXZkc/QUELIm/ZyEms with
{"host": "auth.tesla.com", "accept": "*/*", "accept-encoding": "gzip, deflate, br", "connection": "keep-alive", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15", "accept-language": "en-us", "referer": "https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA", "x-tesla-user-agent": "TeslaApp/3.10.9-433/adff2e065/android/10", "x-requested-with": "com.teslamotors.tesla", "cookie": {"_abck": "F7596CF8A824099CB6D526AC660394D2~-1~YAAQ0nRZaIFRyZ17AQAApv/ssQax2rEvAoEVSCm+LrA0f4gPT6HUiTcheIG34/CSLRAX4nL7KKQovkSKPCIMTooj9kn0ymZcak3ASIZ0/oc9+WYGz5zCo4xH02NNn4lgkZOysy6Q4SU0M2R32lpABG96FWOXbWL/iApmiD7QDRqynv4CcS6lY8UMylB0Ee1/gbTQ3wofptmzM/UxE5oAgB6rw1VKKii8uuo8e+HhJkstLS+QoFu8qdc4VFB5nOoZxx0S9zrkPTwXVvvA6xytlF4RYmFvWkDZl44lqM3faNF8nW6AdsawHeeUqycR8F+Am8ZI6z/aOSA7jInl2kEIafUVEZKNqvBx5eiPt+wo+3/jE3ETgafUkI2elvg=~-1~-1~-1", "ak_bmsc": "86D6AA52AA22E3528A4E7BFCFDAE87F5~000000000000000000000000000000~YAAQ0nRZaIJRyZ17AQAApv/ssQ2fQnUh5UB7b03KViDtLWMNQbTZ6CJrHGX0R6Q0DDYVQM3mUyzBw9tQVlrnubgKXskheZZnMZ8/wXVgEO4XDswHTloX6KXWvpKyHtWG7Pypp4rhZZM4I05xJR2/swDU8NnjfD/15pFoNjs7epWNK3jadYhslcorUH1VqPhXFTJBT5XSMazYx53SIEmtLOnoDXWO4baA4dP8522B/SAY3VfLuLuVnVDSevV7q8V4ATNcRT4iqBArQPPtNDCc0ycTQBjbhkvcHaDxkCq2hgKt1tk4N+wV/xhReTGxMV0WjKkSwmx7kevNNDnEsOr1j8DQr2fE3uJiqVeEdGJQ6L4tIm5cE39sqH7t", "bm_sz": "C034275AB655FEF9C8B9502642C0B967~YAAQ0nRZaINRyZ17AQAApv/ssQ20xVaSdef2MBbK/UZzR3Jy+VwkejzO/wXc6ZM4C2W7qIW2woUNL6ki96UJNBl0iVqGj09qenAxyiEI2t2u1g7blIPzAgxEmhryeBU//eJROqu1+AM5055Tv4sqyxuI41nNgRcq1M+wXrfKUJt8211vrD4Km0alZG9uzqeu5kNv4AuykI9p8dbVrLjwdUB60CqOOdV6T+/SqUjfpHNpPLgua4zeVN/c9gktnEqeUbjhtuB2yjwYv/UfEJouJSEnchMKYpwTQXAe4Xixa6neXQ==~3486773~4405060", "tesla-auth.sid": "s%3AarDrMEgjr9U7ajsldIHGSyrfT1VYPhOM.EbBQKQy24%2BbtqnGFhGA9um2eDDR%2F9Ooux3loRDg0of4"}}
returned 200:OK with response Headers({'last-modified': 'Mon, 26 Apr 2021 16:10:06 GMT', 'etag': '"d1dbb955755ca44a0b872a64f97c471a45b14e941f69d082c19f792576ae34fb"', 'content-type': 'application/javascript', 'content-encoding': 'gzip', 'content-length': '19642', 'expires': 'Wed, 08 Sep 2021 10:32:21 GMT', 'date': 'Sat, 04 Sep 2021 17:48:24 GMT', 'connection': 'keep-alive', 'vary': 'Accept-Encoding', 'cache-control': 'max-age=21600', 'origin_hostname': 'auth.tesla.com', 'permissions-policy': 'interest-cohort=()', 'set-cookie': '_abck=F7596CF8A824099CB6D526AC660394D2~-1~YAAQ0nRZaJ1RyZ17AQAAkwHtsQaSxPpvlS4ZvXB0GcmrdCdPk6z6KcnQyaI8/CT08szpvUEa/pGvWIY4VGXz2A0ee4I62HUxco+TJytvEHUY769dgP8vfrP0icrZXjQQA4YeY9xOv5Pblh2rL0QRJRhxx5nhKSGfMi2jWjaKBPCQ0WaG6JVlUOqMPdelZRrENZLheWM3eHZedTKfmEsR2vIw5+EN37YMs2ySFGKoWJiEL3ynhsuvJ7DLIvHX4cxaw0y83aI1t5yXvvO1igrBni7t+oN2R/jFG+Zvdymgj/Av09X+fAPJY3K3zEx2O8COG2dgumy6ZI97m/G/kkDIqQ95IJxRB/UBdQoWUcBZUTi6ufAz+emrPHx5WkiVp3Wiz9r+9nWoeW8GJg==~-1~-1~-1; Domain=.tesla.com; Path=/; Expires=Sun, 04 Sep 2022 17:48:24 GMT; Max-Age=31536000; Secure'})
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Refreshed 1 tests: ['test_url']
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running coroutine test_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running coroutine prepend_url_i18n
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Found 0 patterns for method_func
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Received post: https://myhomeassistant.mydomain/auth/tesla/proxy/VWl_M/DC/RL/vaO3/5yqzowz/ti5uk00p3r/SFwXZkc/QUELIm/ZyEms for https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Storing json {'sensor_data': '7a74G7m23Vrp0o5c9271081.7-1,2,-94,-100,Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15,uaend,11011,20030107,en-gb,Gecko,1,0,0,0,401248,7705038,2560,1342,2560,1440,1616,1182,1616,,cpen:0,i1:0,dm:0,cwen:0,non:1,opc:0,fc:0,sc:0,wrc:1,isc:0,vib:0,bat:0,x11:0,x12:1,8923,0.218032634109,815388852519,0,loc:-1,2,-94,-101,do_dis,dm_dis,t_dis-1,2,-94,-105,0,0,0,1,1960,874,0;1,0,0,1,2137,1051,0;-1,2,-94,-102,0,0,0,1,1960,874,0;1,0,0,1,2137,1051,0;-1,2,-94,-108,-1,2,-94,-110,-1,2,-94,-117,-1,2,-94,-111,-1,2,-94,-109,-1,2,-94,-114,-1,2,-94,-103,-1,2,-94,-112,https://myhomeassistant.mydomain/auth/tesla/proxy?config_flow_id=e5e4f5a18c31464cae282cb57b0dc019&callback_url=https://myhomeassistant.mydomain/auth/tesla/callback?flow_id%3De5e4f5a18c31464cae282cb57b0dc019-1,2,-94,-115,1,32,32,0,0,0,0,2,0,1630777705038,-999999,17445,0,0,2907,0,0,4,0,1,2,50,-1,-1,26018161,PiZtE,14672,77,0,-1-1,2,-94,-106,0,0-1,2,-94,-119,-1-1,2,-94,-122,0,0,0,0,1,0,0-1,2,-94,-123,-1,2,-94,-124,-1,2,-94,-126,-1,2,-94,-127,6-1,2,-94,-70,-1-1,2,-94,-80,94-1,2,-94,-116,208036032-1,2,-94,-118,66469-1,2,-94,-129,-1,2,-94,-121,;3;-1;0'}
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Final headers {'Content-Type': 'text/plain;charset=UTF-8', 'Origin': 'https://auth.tesla.com', 'Accept-Encoding': 'gzip, deflate, br', 'Connection': 'keep-alive', 'Accept': '*/*', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15', 'Referer': 'https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA', 'Accept-Language': 'en-us', 'x-tesla-user-agent': 'TeslaApp/3.10.9-433/adff2e065/android/10', 'X-Requested-With': 'com.teslamotors.tesla'}
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Attempting post to https://auth.tesla.com/VWl_M/DC/RL/vaO3/5yqzowz/ti5uk00p3r/SFwXZkc/QUELIm/ZyEms
headers: {'Content-Type': 'text/plain;charset=UTF-8', 'Origin': 'https://auth.tesla.com', 'Accept-Encoding': 'gzip, deflate, br', 'Connection': 'keep-alive', 'Accept': '*/*', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15', 'Referer': 'https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA', 'Accept-Language': 'en-us', 'x-tesla-user-agent': 'TeslaApp/3.10.9-433/adff2e065/android/10', 'X-Requested-With': 'com.teslamotors.tesla'}
cookies: <CookieJar[<Cookie _abck=F7596CF8A824099CB6D526AC660394D2~-1~YAAQ0nRZaJ1RyZ17AQAAkwHtsQaSxPpvlS4ZvXB0GcmrdCdPk6z6KcnQyaI8/CT08szpvUEa/pGvWIY4VGXz2A0ee4I62HUxco+TJytvEHUY769dgP8vfrP0icrZXjQQA4YeY9xOv5Pblh2rL0QRJRhxx5nhKSGfMi2jWjaKBPCQ0WaG6JVlUOqMPdelZRrENZLheWM3eHZedTKfmEsR2vIw5+EN37YMs2ySFGKoWJiEL3ynhsuvJ7DLIvHX4cxaw0y83aI1t5yXvvO1igrBni7t+oN2R/jFG+Zvdymgj/Av09X+fAPJY3K3zEx2O8COG2dgumy6ZI97m/G/kkDIqQ95IJxRB/UBdQoWUcBZUTi6ufAz+emrPHx5WkiVp3Wiz9r+9nWoeW8GJg==~-1~-1~-1 for .tesla.com/>, <Cookie ak_bmsc=86D6AA52AA22E3528A4E7BFCFDAE87F5~000000000000000000000000000000~YAAQ0nRZaIJRyZ17AQAApv/ssQ2fQnUh5UB7b03KViDtLWMNQbTZ6CJrHGX0R6Q0DDYVQM3mUyzBw9tQVlrnubgKXskheZZnMZ8/wXVgEO4XDswHTloX6KXWvpKyHtWG7Pypp4rhZZM4I05xJR2/swDU8NnjfD/15pFoNjs7epWNK3jadYhslcorUH1VqPhXFTJBT5XSMazYx53SIEmtLOnoDXWO4baA4dP8522B/SAY3VfLuLuVnVDSevV7q8V4ATNcRT4iqBArQPPtNDCc0ycTQBjbhkvcHaDxkCq2hgKt1tk4N+wV/xhReTGxMV0WjKkSwmx7kevNNDnEsOr1j8DQr2fE3uJiqVeEdGJQ6L4tIm5cE39sqH7t for .tesla.com/>, <Cookie bm_sz=C034275AB655FEF9C8B9502642C0B967~YAAQ0nRZaINRyZ17AQAApv/ssQ20xVaSdef2MBbK/UZzR3Jy+VwkejzO/wXc6ZM4C2W7qIW2woUNL6ki96UJNBl0iVqGj09qenAxyiEI2t2u1g7blIPzAgxEmhryeBU//eJROqu1+AM5055Tv4sqyxuI41nNgRcq1M+wXrfKUJt8211vrD4Km0alZG9uzqeu5kNv4AuykI9p8dbVrLjwdUB60CqOOdV6T+/SqUjfpHNpPLgua4zeVN/c9gktnEqeUbjhtuB2yjwYv/UfEJouJSEnchMKYpwTQXAe4Xixa6neXQ==~3486773~4405060 for .tesla.com/>, <Cookie tesla-auth.sid=s%3AarDrMEgjr9U7ajsldIHGSyrfT1VYPhOM.EbBQKQy24%2BbtqnGFhGA9um2eDDR%2F9Ooux3loRDg0of4 for auth.tesla.com/>]>
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.helper] POST:
https://auth.tesla.com/VWl_M/DC/RL/vaO3/5yqzowz/ti5uk00p3r/SFwXZkc/QUELIm/ZyEms with
{"host": "auth.tesla.com", "accept": "*/*", "accept-encoding": "gzip, deflate, br", "connection": "keep-alive", "user-agent": "python-httpx/0.19.0", "content-type": "text/plain;charset=UTF-8", "referer": "https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA", "accept-language": "en-us", "x-tesla-user-agent": "TeslaApp/3.10.9-433/adff2e065/android/10", "x-requested-with": "com.teslamotors.tesla", "cookie": {"_abck": "F7596CF8A824099CB6D526AC660394D2~-1~YAAQ0nRZaJ1RyZ17AQAAkwHtsQaSxPpvlS4ZvXB0GcmrdCdPk6z6KcnQyaI8/CT08szpvUEa/pGvWIY4VGXz2A0ee4I62HUxco+TJytvEHUY769dgP8vfrP0icrZXjQQA4YeY9xOv5Pblh2rL0QRJRhxx5nhKSGfMi2jWjaKBPCQ0WaG6JVlUOqMPdelZRrENZLheWM3eHZedTKfmEsR2vIw5+EN37YMs2ySFGKoWJiEL3ynhsuvJ7DLIvHX4cxaw0y83aI1t5yXvvO1igrBni7t+oN2R/jFG+Zvdymgj/Av09X+fAPJY3K3zEx2O8COG2dgumy6ZI97m/G/kkDIqQ95IJxRB/UBdQoWUcBZUTi6ufAz+emrPHx5WkiVp3Wiz9r+9nWoeW8GJg==~-1~-1~-1", "ak_bmsc": "86D6AA52AA22E3528A4E7BFCFDAE87F5~000000000000000000000000000000~YAAQ0nRZaIJRyZ17AQAApv/ssQ2fQnUh5UB7b03KViDtLWMNQbTZ6CJrHGX0R6Q0DDYVQM3mUyzBw9tQVlrnubgKXskheZZnMZ8/wXVgEO4XDswHTloX6KXWvpKyHtWG7Pypp4rhZZM4I05xJR2/swDU8NnjfD/15pFoNjs7epWNK3jadYhslcorUH1VqPhXFTJBT5XSMazYx53SIEmtLOnoDXWO4baA4dP8522B/SAY3VfLuLuVnVDSevV7q8V4ATNcRT4iqBArQPPtNDCc0ycTQBjbhkvcHaDxkCq2hgKt1tk4N+wV/xhReTGxMV0WjKkSwmx7kevNNDnEsOr1j8DQr2fE3uJiqVeEdGJQ6L4tIm5cE39sqH7t", "bm_sz": "C034275AB655FEF9C8B9502642C0B967~YAAQ0nRZaINRyZ17AQAApv/ssQ20xVaSdef2MBbK/UZzR3Jy+VwkejzO/wXc6ZM4C2W7qIW2woUNL6ki96UJNBl0iVqGj09qenAxyiEI2t2u1g7blIPzAgxEmhryeBU//eJROqu1+AM5055Tv4sqyxuI41nNgRcq1M+wXrfKUJt8211vrD4Km0alZG9uzqeu5kNv4AuykI9p8dbVrLjwdUB60CqOOdV6T+/SqUjfpHNpPLgua4zeVN/c9gktnEqeUbjhtuB2yjwYv/UfEJouJSEnchMKYpwTQXAe4Xixa6neXQ==~3486773~4405060", "tesla-auth.sid": "s%3AarDrMEgjr9U7ajsldIHGSyrfT1VYPhOM.EbBQKQy24%2BbtqnGFhGA9um2eDDR%2F9Ooux3loRDg0of4"}, "content-length": "1192"}
returned 201:Created with response Headers({'content-length': '22', 'access-control-allow-headers': 'Content-Type,Authorization', 'access-control-allow-origin': '*', 'date': 'Sat, 04 Sep 2021 17:48:25 GMT', 'connection': 'keep-alive', 'content-type': 'application/json', 'origin_hostname': 'auth.tesla.com', 'originip': '127.0.0.1', 'permissions-policy': 'interest-cohort=()', 'set-cookie': '_abck=F7596CF8A824099CB6D526AC660394D2~-1~YAAQ0nRZaKhRyZ17AQAA9gLtsQZLGr2VdHT3nHrFAZe9tOn1pHmXYuPOAsSYaMN+bKN8UvXy4HjDTdNp/iQXva4Tq0aL8HUT93Q4Aw4pFr48YS/HvOaMB74iPJdl6qkOa8wPMxM25Ul/T0/9GX6GqWgsCUSSoUYztPOsberIj58Cj5eGMKAxKZAZXTUcWKNFHyOzNgkR6bzQxn63T2a2UtElAOGm+bcIy3r5f53I5bpmjeb9qbj1MnMuQwfqwQCQ4SSBMGE1BbSVnFjr7tgIp+ymyNb4SRC09U4jfya8BBLoOThH7+ANARnbXd3gNSy9J3Jjn4DMxGrGP74x86tXtH/PK0AatRnc+QaeoNXi9go9UWxkPY3xyge0W//fD0b+6ET/QZ8ErbxWlg==~-1~-1~-1; Domain=.tesla.com; Path=/; Expires=Sun, 04 Sep 2022 17:48:25 GMT; Max-Age=31536000; Secure'})
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Refreshed 1 tests: ['test_url']
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.helper] Running coroutine test_url
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Passing through ZyEms as application/json
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Received post: https://myhomeassistant.mydomain/auth/tesla/proxy/VWl_M/DC/RL/vaO3/5yqzowz/ti5uk00p3r/SFwXZkc/QUELIm/ZyEms for https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Storing json {'sensor_data': '7a74G7m23Vrp0o5c9271081.7-1,2,-94,-100,Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15,uaend,11011,20030107,en-gb,Gecko,1,0,0,0,401248,7705038,2560,1342,2560,1440,1616,1182,1616,,cpen:0,i1:0,dm:0,cwen:0,non:1,opc:0,fc:0,sc:0,wrc:1,isc:0,vib:0,bat:0,x11:0,x12:1,8923,0.553902510276,815388852519,0,loc:-1,2,-94,-101,do_dis,dm_dis,t_dis-1,2,-94,-105,0,0,0,1,1960,874,0;1,0,0,1,2137,1051,0;-1,2,-94,-102,0,0,0,1,1960,874,0;1,0,0,1,2137,1051,0;-1,2,-94,-108,-1,2,-94,-110,-1,2,-94,-117,-1,2,-94,-111,-1,2,-94,-109,-1,2,-94,-114,-1,2,-94,-103,-1,2,-94,-112,https://myhomeassistant.mydomain/auth/tesla/proxy?config_flow_id=e5e4f5a18c31464cae282cb57b0dc019&callback_url=https://myhomeassistant.mydomain/auth/tesla/callback?flow_id%3De5e4f5a18c31464cae282cb57b0dc019-1,2,-94,-115,1,32,32,0,0,0,0,588,0,1630777705038,12,17445,0,0,2907,0,0,588,0,1,2,50,437,1490478648,26018161,PiZtE,83930,107,0,-1-1,2,-94,-106,9,1-1,2,-94,-119,200,0,0,0,0,0,0,0,0,0,0,0,0,200,-1,2,-94,-122,0,0,0,0,1,0,0-1,2,-94,-123,-1,2,-94,-124,-1,2,-94,-126,-1,2,-94,-127,6-1,2,-94,-70,-356158881;-894418032;dis;;true;true;true;-120;true;24;24;true;false;-1-1,2,-94,-80,5378-1,2,-94,-116,208036032-1,2,-94,-118,68409-1,2,-94,-129,4d624c99ce55b315c4f2eddf110ab32c60f386cf5ccf175f66d4b8ecaf332b09,1,46b78825e671e79042d6477c5e50fbb644ee6aa0247817cc2b5ee5d1b9058939,Apple Inc.,Apple GPU,847f317542226f5fc40f6864287d658e1815d8fcb65bfffd759afb7588dd4529,26-1,2,-94,-121,;151;6;0'}
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Final headers {'Content-Type': 'text/plain;charset=UTF-8', 'Origin': 'https://auth.tesla.com', 'Accept-Encoding': 'gzip, deflate, br', 'Connection': 'keep-alive', 'Accept': '*/*', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15', 'Referer': 'https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA', 'Accept-Language': 'en-us', 'x-tesla-user-agent': 'TeslaApp/3.10.9-433/adff2e065/android/10', 'X-Requested-With': 'com.teslamotors.tesla'}
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Attempting post to https://auth.tesla.com/VWl_M/DC/RL/vaO3/5yqzowz/ti5uk00p3r/SFwXZkc/QUELIm/ZyEms
headers: {'Content-Type': 'text/plain;charset=UTF-8', 'Origin': 'https://auth.tesla.com', 'Accept-Encoding': 'gzip, deflate, br', 'Connection': 'keep-alive', 'Accept': '*/*', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15', 'Referer': 'https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA', 'Accept-Language': 'en-us', 'x-tesla-user-agent': 'TeslaApp/3.10.9-433/adff2e065/android/10', 'X-Requested-With': 'com.teslamotors.tesla'}
cookies: <CookieJar[<Cookie _abck=F7596CF8A824099CB6D526AC660394D2~-1~YAAQ0nRZaKhRyZ17AQAA9gLtsQZLGr2VdHT3nHrFAZe9tOn1pHmXYuPOAsSYaMN+bKN8UvXy4HjDTdNp/iQXva4Tq0aL8HUT93Q4Aw4pFr48YS/HvOaMB74iPJdl6qkOa8wPMxM25Ul/T0/9GX6GqWgsCUSSoUYztPOsberIj58Cj5eGMKAxKZAZXTUcWKNFHyOzNgkR6bzQxn63T2a2UtElAOGm+bcIy3r5f53I5bpmjeb9qbj1MnMuQwfqwQCQ4SSBMGE1BbSVnFjr7tgIp+ymyNb4SRC09U4jfya8BBLoOThH7+ANARnbXd3gNSy9J3Jjn4DMxGrGP74x86tXtH/PK0AatRnc+QaeoNXi9go9UWxkPY3xyge0W//fD0b+6ET/QZ8ErbxWlg==~-1~-1~-1 for .tesla.com/>, <Cookie ak_bmsc=86D6AA52AA22E3528A4E7BFCFDAE87F5~000000000000000000000000000000~YAAQ0nRZaIJRyZ17AQAApv/ssQ2fQnUh5UB7b03KViDtLWMNQbTZ6CJrHGX0R6Q0DDYVQM3mUyzBw9tQVlrnubgKXskheZZnMZ8/wXVgEO4XDswHTloX6KXWvpKyHtWG7Pypp4rhZZM4I05xJR2/swDU8NnjfD/15pFoNjs7epWNK3jadYhslcorUH1VqPhXFTJBT5XSMazYx53SIEmtLOnoDXWO4baA4dP8522B/SAY3VfLuLuVnVDSevV7q8V4ATNcRT4iqBArQPPtNDCc0ycTQBjbhkvcHaDxkCq2hgKt1tk4N+wV/xhReTGxMV0WjKkSwmx7kevNNDnEsOr1j8DQr2fE3uJiqVeEdGJQ6L4tIm5cE39sqH7t for .tesla.com/>, <Cookie bm_sz=C034275AB655FEF9C8B9502642C0B967~YAAQ0nRZaINRyZ17AQAApv/ssQ20xVaSdef2MBbK/UZzR3Jy+VwkejzO/wXc6ZM4C2W7qIW2woUNL6ki96UJNBl0iVqGj09qenAxyiEI2t2u1g7blIPzAgxEmhryeBU//eJROqu1+AM5055Tv4sqyxuI41nNgRcq1M+wXrfKUJt8211vrD4Km0alZG9uzqeu5kNv4AuykI9p8dbVrLjwdUB60CqOOdV6T+/SqUjfpHNpPLgua4zeVN/c9gktnEqeUbjhtuB2yjwYv/UfEJouJSEnchMKYpwTQXAe4Xixa6neXQ==~3486773~4405060 for .tesla.com/>, <Cookie tesla-auth.sid=s%3AarDrMEgjr9U7ajsldIHGSyrfT1VYPhOM.EbBQKQy24%2BbtqnGFhGA9um2eDDR%2F9Ooux3loRDg0of4 for auth.tesla.com/>]>
2021-09-04 19:48:26 DEBUG (MainThread) [authcaptureproxy.helper] POST:
https://auth.tesla.com/VWl_M/DC/RL/vaO3/5yqzowz/ti5uk00p3r/SFwXZkc/QUELIm/ZyEms with
{"host": "auth.tesla.com", "accept": "*/*", "accept-encoding": "gzip, deflate, br", "connection": "keep-alive", "user-agent": "python-httpx/0.19.0", "content-type": "text/plain;charset=UTF-8", "referer": "https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA", "accept-language": "en-us", "x-tesla-user-agent": "TeslaApp/3.10.9-433/adff2e065/android/10", "x-requested-with": "com.teslamotors.tesla", "cookie": {"_abck": "F7596CF8A824099CB6D526AC660394D2~-1~YAAQ0nRZaKhRyZ17AQAA9gLtsQZLGr2VdHT3nHrFAZe9tOn1pHmXYuPOAsSYaMN+bKN8UvXy4HjDTdNp/iQXva4Tq0aL8HUT93Q4Aw4pFr48YS/HvOaMB74iPJdl6qkOa8wPMxM25Ul/T0/9GX6GqWgsCUSSoUYztPOsberIj58Cj5eGMKAxKZAZXTUcWKNFHyOzNgkR6bzQxn63T2a2UtElAOGm+bcIy3r5f53I5bpmjeb9qbj1MnMuQwfqwQCQ4SSBMGE1BbSVnFjr7tgIp+ymyNb4SRC09U4jfya8BBLoOThH7+ANARnbXd3gNSy9J3Jjn4DMxGrGP74x86tXtH/PK0AatRnc+QaeoNXi9go9UWxkPY3xyge0W//fD0b+6ET/QZ8ErbxWlg==~-1~-1~-1", "ak_bmsc": "86D6AA52AA22E3528A4E7BFCFDAE87F5~000000000000000000000000000000~YAAQ0nRZaIJRyZ17AQAApv/ssQ2fQnUh5UB7b03KViDtLWMNQbTZ6CJrHGX0R6Q0DDYVQM3mUyzBw9tQVlrnubgKXskheZZnMZ8/wXVgEO4XDswHTloX6KXWvpKyHtWG7Pypp4rhZZM4I05xJR2/swDU8NnjfD/15pFoNjs7epWNK3jadYhslcorUH1VqPhXFTJBT5XSMazYx53SIEmtLOnoDXWO4baA4dP8522B/SAY3VfLuLuVnVDSevV7q8V4ATNcRT4iqBArQPPtNDCc0ycTQBjbhkvcHaDxkCq2hgKt1tk4N+wV/xhReTGxMV0WjKkSwmx7kevNNDnEsOr1j8DQr2fE3uJiqVeEdGJQ6L4tIm5cE39sqH7t", "bm_sz": "C034275AB655FEF9C8B9502642C0B967~YAAQ0nRZaINRyZ17AQAApv/ssQ20xVaSdef2MBbK/UZzR3Jy+VwkejzO/wXc6ZM4C2W7qIW2woUNL6ki96UJNBl0iVqGj09qenAxyiEI2t2u1g7blIPzAgxEmhryeBU//eJROqu1+AM5055Tv4sqyxuI41nNgRcq1M+wXrfKUJt8211vrD4Km0alZG9uzqeu5kNv4AuykI9p8dbVrLjwdUB60CqOOdV6T+/SqUjfpHNpPLgua4zeVN/c9gktnEqeUbjhtuB2yjwYv/UfEJouJSEnchMKYpwTQXAe4Xixa6neXQ==~3486773~4405060", "tesla-auth.sid": "s%3AarDrMEgjr9U7ajsldIHGSyrfT1VYPhOM.EbBQKQy24%2BbtqnGFhGA9um2eDDR%2F9Ooux3loRDg0of4"}, "content-length": "1523"}
returned 201:Created with response Headers({'content-length': '22', 'access-control-allow-headers': 'Content-Type,Authorization', 'access-control-allow-origin': '*', 'date': 'Sat, 04 Sep 2021 17:48:26 GMT', 'connection': 'keep-alive', 'content-type': 'application/json', 'origin_hostname': 'auth.tesla.com', 'originip': '127.0.0.1', 'permissions-policy': 'interest-cohort=()'})
2021-09-04 19:48:26 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Refreshed 1 tests: ['test_url']
2021-09-04 19:48:26 DEBUG (MainThread) [authcaptureproxy.helper] Running coroutine test_url
2021-09-04 19:48:26 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Passing through ZyEms as application/json
I have a reverse proxy for Home Assistant, it seems to whitelist its IP correctly
EDIT BY ADMIN:
WORKAROUND:
#20 (comment). All credits to sillyfrog.
Is your feature request related to a problem? Please describe.
Since we are no longer in core, we do not get free translations. They can manually be added with a translations submission. However, it's better to use lokalise.
I have a Tesla and a charger installed at my house.
When I looked at the figures of sensor.tesla_XXXXX_energy_added_sensor it seems to increase regardless of the location of charging.
For the HA Energy dashboard to work nicely, it's more reliable to track energy usage to distinct between charges done at home vs. elsewhere using device_tracker.tesla_XXXX_location_tracker
I guess it's possible to use a template to customize this, but looking at the use-case of this sensor it's a good idea I think to embed this in the standard and get two metrics perhaps, so the existing one and a new one for charges at home.
I know it's a nice-to-have feature request.
I installed HACS, installed this repository and the tesla custom component and restarted HA. after restarting and trying to add the integration, i'm getting the following error at the part where it says "The next step will forward to the proxy for Tesla authentication. Tesla protects the login with a web application firewall (WAF) which may require a refresh to get or receive data. Please be cautious with multiple refreshes in a short period of time": Unknown error occured.
Checking XHR requests the POST to api/config/config_entries/flow/ is getting a 500 back (500 Internal Server Error - Server got itself in trouble)
Version | core-2021.4.6 |
---|---|
Installation Type | Home Assistant OS |
Development | false |
Supervisor | true |
Docker | true |
Virtual Environment | false |
Python Version | 3.8.7 |
Operating System Family | Linux |
Operating System Version | 5.4.86 |
CPU Architecture | x86_64 |
Timezone | America/New_YorK |
2021-05-01 12:57:32 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request resp = await self._request_handler(request) File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle resp = await handler(request) File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 74, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 135, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 131, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 155, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 60, in wrapper result = await method(view, request, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 107, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 156, in async_configure result = await self._async_handle_step(flow, cur_step["step_id"], user_input) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 214, in _async_handle_step result: dict = await getattr(flow, method)(user_input) File "/config/custom_components/tesla_custom/config_flow.py", line 72, in async_step_user return await self.async_step_start_oauth() File "/config/custom_components/tesla_custom/config_flow.py", line 86, in async_step_start_oauth host_url: URL = self.controller.get_oauth_url() AttributeError: 'Controller' object has no attribute 'get_oauth_url'
I would love to see an option to control the seat heaters (all 5 of them).
Before I was aware of this integration, I had my own server that will turn on my car's HVAC and decide whether to turn on the seat heaters based on the outside temperature when I'm leaving my house. I'm trying to move that logic inside of Home Assistant, but there's no support for seat heaters.
I was using this integration fine for quite a while. Recently upgraded to 1.0.0, and it continued working fine for a few days. Starting today, it's showing "Failed to set up: could not authenticate". When I go into Configure, I don't see any options to re-auth. What should I do to get it working again?
Is your feature request related to a problem? Please describe.
I would like to be able to directly control the car's charging rate. THis is now possible via the new API endpoint CHARGING_AMPS (requires vehicle 2021.36.5+).
Describe the solution you'd like
A number entity that lets you set the current, from 5 amps to the vehicle maximum (too tricky? Could just use 48, but some cars won't take more than 32).
Describe alternatives you've considered
Just calling the custom api via the below from an automation triggered by an input_number works well, but it would be nice to be able to rate limit it, check for errors etc.
service: tesla_custom.api
data:
command: CHARGING_AMPS
parameters:
path_vars:
vehicle_id: '{{ state_attr(''binary_sensor.<car_name>_online_sensor'', ''id'') }}'
charging_amps: 16
Additional context
Until now i've been using TWCManager to control the charge rate using the wall charger itself. The use case being to track solar production and charge your car using solar power exclusively. TWCManager is somewhat error prone. The codebase is a bit unstable, and it requires a hardware hack i'd just as soon eliminate if possible.
Is your feature request related to a problem? Please describe.
Need to move this to custom_components repo.
0.2.1
After running through the dirty (in a good way) workaround described here for the Invalid domain for site key bug, I hit a 500. I've continued to hit a 500 subsequently each time I restart the add intigration workflow with popping open the proxy page.
Please let me know if you're needing more regarding the logs.
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 144, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 135, in handle
result = await result
File "/config/custom_components/tesla_custom/config_flow.py", line 325, in wrapped
return await cls.handler(request, **kwargs)
File "/usr/local/lib/python3.9/site-packages/authcaptureproxy/auth_capture_proxy.py", line 396, in all_handler
result = await run_func(test, test_name, resp, self.data, self.query)
File "/usr/local/lib/python3.9/site-packages/authcaptureproxy/helper.py", line 83, in run_func
result = await func(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/teslaproxy.py", line 85, in test_url
code = resp.url.query.get("code")
AttributeError: 'bytes' object has no attribute 'get'
2021-09-09 19:17:45 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 89, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 144, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 135, in handle
result = await result
File "/config/custom_components/tesla_custom/config_flow.py", line 325, in wrapped
return await cls.handler(request, **kwargs)
File "/usr/local/lib/python3.9/site-packages/authcaptureproxy/auth_capture_proxy.py", line 396, in all_handler
result = await run_func(test, test_name, resp, self.data, self.query)
File "/usr/local/lib/python3.9/site-packages/authcaptureproxy/helper.py", line 83, in run_func
result = await func(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/teslaproxy.py", line 85, in test_url
code = resp.url.query.get("code")
AttributeError: 'bytes' object has no attribute 'get'
2021-09-09 19:17:55 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 89, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 144, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 135, in handle
result = await result
File "/config/custom_components/tesla_custom/config_flow.py", line 325, in wrapped
return await cls.handler(request, **kwargs)
File "/usr/local/lib/python3.9/site-packages/authcaptureproxy/auth_capture_proxy.py", line 396, in all_handler
result = await run_func(test, test_name, resp, self.data, self.query)
File "/usr/local/lib/python3.9/site-packages/authcaptureproxy/helper.py", line 83, in run_func
result = await func(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/teslaproxy.py", line 85, in test_url
code = resp.url.query.get("code")
AttributeError: 'bytes' object has no attribute 'get'
2021-09-09 19:18:22 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 89, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 144, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 135, in handle
result = await result
File "/config/custom_components/tesla_custom/config_flow.py", line 325, in wrapped
return await cls.handler(request, **kwargs)
File "/usr/local/lib/python3.9/site-packages/authcaptureproxy/auth_capture_proxy.py", line 396, in all_handler
result = await run_func(test, test_name, resp, self.data, self.query)
File "/usr/local/lib/python3.9/site-packages/authcaptureproxy/helper.py", line 83, in run_func
result = await func(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/teslaproxy.py", line 85, in test_url
code = resp.url.query.get("code")
AttributeError: 'bytes' object has no attribute 'get'
Since HA landed your PR to remove the Tesla integration home-assistant/core#55988, it also removed the documentation page linked in this project's README.
https://www.home-assistant.io/integrations/tesla/ no longer describes the integration. Is there any alternative source of those docs somewhere?
1.2.1
Removed and re-added the integration and it's only showing vehicles
(removed the vehicle portion of the response)
DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 43 days, 5:58:44
DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/products {}
DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":[{"energy_site_id":XXX,"resource_type":"battery","site_name":"XXX","id":"STEXXXX","gateway_id":"XXX","asset_site_id":"XXX","energy_left":17850.21052631579,"total_pack_energy":27686,"percentage_charged":64.47377926141657,"battery_type":"ac_powerwall","backup_capable":true,"battery_power":-1340,"sync_grid_alert_enabled":true,"breaker_alert_enabled":false,"components":{"battery":true,"battery_type":"ac_powerwall","solar":true,"solar_type":"pv_panel","grid":true,"load_meter":true,"market_type":"residential"}}],"count":3}
The linked website is opened with an error...
Die Website ist nicht erreichbargcg74bhlxv4rotu8wqhyv1z1u4dsie9s.ui.nabu.casa hat die Verbindung unerwartet geschlossen.
Versuchen Sie Folgendes:
Verbindung prüfen
Proxy und Firewall prüfen
ERR_CONNECTION_CLOSED
Fresh HACS install
Add your logs here.
A clear and concise description of what the bug is.
Traceback (most recent call last):
File "/home/knutas/anaconda3/envs/hass/lib/python3.8/site-packages/homeassistant-2021.5.0.dev0-py3.8.egg/homeassistant/config_entries.py", line 260, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/home/knutas/.homeassistant/custom_components/tesla_custom/__init__.py", line 127, in async_setup_entry
result = await controller.connect(
File "/home/knutas/.homeassistant/deps/lib/python3.8/site-packages/teslajsonpy/controller.py", line 288, in connect
cars = await self.get_vehicles()
File "/home/knutas/.homeassistant/deps/lib/python3.8/site-packages/backoff/_async.py", line 133, in retry
ret = await target(*args, **kwargs)
File "/home/knutas/.homeassistant/deps/lib/python3.8/site-packages/teslajsonpy/controller.py", line 407, in get_vehicles
return (await self.__connection.get("vehicles"))["response"]
File "/home/knutas/.homeassistant/deps/lib/python3.8/site-packages/teslajsonpy/connection.py", line 90, in get
return await self.post(command, "get", None)
File "/home/knutas/.homeassistant/deps/lib/python3.8/site-packages/teslajsonpy/connection.py", line 161, in post
return await self.__open(
File "/home/knutas/.homeassistant/deps/lib/python3.8/site-packages/teslajsonpy/connection.py", line 202, in __open
resp = await getattr(self.websession, method)(
File "/home/knutas/anaconda3/envs/hass/lib/python3.8/site-packages/httpx-0.17.1-py3.8.egg/httpx/_client.py", line 1539, in get
return await self.request(
File "/home/knutas/anaconda3/envs/hass/lib/python3.8/site-packages/httpx-0.17.1-py3.8.egg/httpx/_client.py", line 1361, in request
response = await self.send(
File "/home/knutas/anaconda3/envs/hass/lib/python3.8/site-packages/httpx-0.17.1-py3.8.egg/httpx/_client.py", line 1396, in send
response = await self._send_handling_auth(
File "/home/knutas/anaconda3/envs/hass/lib/python3.8/site-packages/httpx-0.17.1-py3.8.egg/httpx/_client.py", line 1434, in _send_handling_auth
response = await self._send_handling_redirects(
File "/home/knutas/anaconda3/envs/hass/lib/python3.8/site-packages/httpx-0.17.1-py3.8.egg/httpx/_client.py", line 1466, in _send_handling_redirects
response = await self._send_single_request(request, timeout)
File "/home/knutas/anaconda3/envs/hass/lib/python3.8/site-packages/httpx-0.17.1-py3.8.egg/httpx/_client.py", line 1492, in _send_single_request
(status_code, headers, stream, ext) = await transport.arequest(
File "/home/knutas/anaconda3/envs/hass/lib/python3.8/site-packages/httpx-0.17.1-py3.8.egg/httpx/_transports/default.py", line 169, in arequest
return await self._pool.arequest(
AttributeError: 'AsyncConnectionPool' object has no attribute 'arequest'
Add your logs here.
It would be great to be able to control the charge port lock with a HA routine or Node Red flow. I presume its the charger sensor entity is to show if a cable is plugged in or not but cant find a sensor the port lock/unlock....not sure if this is exposed via the Tesla API or not?
thanks
1.0.0
N/A
When I go to Configuration -> Integrations and select tesla_custom, the attribute labels are missing in the config flow form, so I can't tell what I'm supposed to enter into these fields. See below screenshot.
HA version: 2021.9.3
N/A
0.1.5
# Not-applicable, I cannot get it to let me configure it again
# Unless you want my entire config.yaml, but that seems unnecessary,
# and is going to be missing most of the actual configuration in other files.
# Also I try to configure via the UI as much as possible.
I do have my server set up with both internal (homeassistant.local:8123
) and external (https://«external-url»:1234
) URLs, and the external one is working fine when I check it from inside OR outside my network.
I also verified the https://«external-url»:1234/auth/tesla/callback?flow_id=...
is accessible by my browser.
I had the integration working, then it started failing when everyone's Tesla integration failed (about when I upgraded to HA 2021.08.1).
I removed the integration and tried to re-add it, but now I can't get it to work. The first time, there's usually not a CAPTCHA image. I enter the un/pw and then it reloads asking to include the letters in the image. Except, there's no image to look at. Also, I don't use 2FA, I had just switched to this the last time Tesla logins stopped working, and never switched back.
Because I removed the integration, I can't use the technique where I use the iOS app to get new tokens, either.
I tried waiting 2 days between when this started happening and now in case it was related to too many login attempts, but I haven't had any trouble getting the login to work in other apps or browsers.
Sorry if this is covered somewhere, but I couldn't find mention of it in issues, or in the README.
This error originated from a custom integration.
Logger: aiohttp.server
Source: custom_components/tesla_custom/config_flow.py:325
Integration: Tesla Custom Integration (documentation, issues)
First occurred: 2:40:41 PM (88 occurrences)
Last logged: 2:48:02 PM
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 61, in map_httpcore_exceptions
yield
File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 283, in handle_async_request
) = await self._pool.handle_async_request(
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 237, in handle_async_request
response = await connection.handle_async_request(
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 136, in handle_async_request
self.socket = await self._open_socket(timeout)
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 163, in _open_socket
return await self._backend.open_tcp_stream(
File "/usr/local/lib/python3.9/site-packages/httpcore/_backends/auto.py", line 44, in open_tcp_stream
return await self.backend.open_tcp_stream(
File "/usr/local/lib/python3.9/site-packages/httpcore/_backends/anyio.py", line 154, in open_tcp_stream
stream = await TLSStream.wrap(
File "/usr/local/lib/python3.9/contextlib.py", line 135, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.9/site-packages/httpcore/_exceptions.py", line 12, in map_exceptions
raise to_exc(exc) from None
httpcore.ConnectError: All connection attempts failed
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 197, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 144, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 135, in handle
result = await result
File "/config/custom_components/tesla_custom/config_flow.py", line 325, in wrapped
return await cls.handler(request, **kwargs)
File "/usr/local/lib/python3.9/site-packages/authcaptureproxy/auth_capture_proxy.py", line 385, in all_handler
resp = await getattr(self.session, method)(site, headers=headers)
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1722, in get
return await self.request(
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1481, in request
response = await self.send(
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1568, in send
response = await self._send_handling_auth(
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1604, in _send_handling_auth
response = await self._send_handling_redirects(
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1640, in _send_handling_redirects
response = await self._send_single_request(request, timeout)
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1681, in _send_single_request
) = await transport.handle_async_request(
File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 278, in handle_async_request
(
File "/usr/local/lib/python3.9/contextlib.py", line 135, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 78, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ConnectError: All connection attempts failed
Expose https://www.teslaapi.io/vehicles/commands#set-charge-limit
I'm trying to limit how much my car is allowed to charge at home, since I only have inefficient 120v home charging and time of use restrictions. However, I still want to allow home charging up to a certain safety amount (say 40%), rather than always enabling or disabling charging at home.
I could do fancy things like poll the current charge state and use the enable/disable charging switch, but it's a lot more complicated compared to the API which does exactly this, and it also runs into potential problems with the car going to sleep and the charge state not necessarily being available.
Thanks
1.1.0
When attempting to configure the integration it fails with this (and yes I put the correct token in the window):
I only have a solar system (no car), I think it's related to this: #58. Maybe @giachello knows what's going on?
2021-10-12 11:34:20 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 220, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 144, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 157, in post
return await super().post(request, flow_id)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 62, in wrapper
result = await method(view, request, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 111, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 198, in async_configure
result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 256, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/config/custom_components/tesla_custom/config_flow.py", line 56, in async_step_user
info = await validate_input(self.hass, user_input)
File "/config/custom_components/tesla_custom/config_flow.py", line 160, in validate_input
result = await controller.connect(test_login=True)
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/controller.py", line 349, in connect
self.__energysite_name[energysite_id] = energysite["site_name"]
KeyError: 'site_name'
Is your feature request related to a problem? Please describe.
To prevent waking up my car (good) this integration has a rather high update interval (bad).
Describe the solution you'd like
When the car is active/driving decrease the polling interval so I get more detailed data of drives.
Describe alternatives you've considered
NA.
Additional context
NA.
Logger: homeassistant.config_entries
Source: custom_components/tesla/init.py:155
First occurred: 10:45:30 AM (1 occurrences)
Last logged: 10:45:30 AM
Error setting up entry [email protected] for tesla
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 239, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/config/custom_components/tesla/init.py", line 155, in async_setup_entry
await coordinator.async_config_entry_first_refresh()
AttributeError: 'TeslaDataUpdateCoordinator' object has no attribute 'async_config_entry_first_refresh'
Current integration states that either iOS or Android app needed to generate a Refresh Token.
I can confirm that teslafi.com, which is used by many Tesla owners, Refresh Tokens also work with this custom integration:
https://support.teslafi.com/en/communities/1/topics/16979-tesla-v3-api-tokens
The readme and configuration dialog could be updated to inform users of this additional option.
v1.2.0
The solar panel entity doesn't seem to be able to fetch data.
2021-10-18 10:22:28 ERROR (MainThread) [custom_components.tesla_custom] Unexpected error fetching tesla_custom data: get() got an unexpected keyword argument 'data'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/tesla_custom/__init__.py", line 291, in _async_update_data
return await self.controller.update()
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/controller.py", line 903, in update
return any(await asyncio.gather(*tasks))
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/controller.py", line 830, in _get_and_process_energysite_data
data = await self.api(
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/controller.py", line 166, in wake_up
result = await wrapped(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/controller.py", line 1179, in api
return await self.__connection.post("", method="get", data=kwargs, url=uri)
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/connection.py", line 167, in post
return await self.__open(
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/connection.py", line 204, in __open
resp = await getattr(self.websession, method)(
TypeError: get() got an unexpected keyword argument 'data'
Release V1.3.0
N/A
When starting charging for a sleeping vehicle I get the below error.
Same error when trying a door lock or other command to.
All working fine with vehicle awake.
2021-10-21 10:34:12 DEBUG (MainThread) [teslajsonpy.connection] post: https://owner-api.teslamotors.com/api/1/vehicles/5025388345911957/command/charge_start {}
2021-10-21 10:34:12 DEBUG (MainThread) [teslajsonpy.connection] 408: {"response":null,"error":"vehicle unavailable: {:error=>\"vehicle unavailable:\"}","error_description":""}
2021-10-21 10:34:12 DEBUG (MainThread) [teslajsonpy.controller] Exception: vehicle_unavailable
api(('START_CHARGE',) {'path_vars': {'vehicle_id': 5025388345911957}, 'wake_if_asleep': True})
2021-10-21 10:34:12 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139941383171328] vehicle_unavailable
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 185, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1491, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1526, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 658, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 830, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 695, in _handle_entity_call
await result
File "/config/custom_components/tesla_custom/tesla_device.py", line 35, in wrapped
result = await func(*args, **kwargs)
File "/config/custom_components/tesla_custom/switch.py", line 35, in async_turn_on
await self.tesla_device.start_charge()
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/homeassistant/charger.py", line 65, in start_charge
data = await self._controller.api(
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/controller.py", line 166, in wake_up
result = await wrapped(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/controller.py", line 1189, in api
return await self.__connection.post(
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/connection.py", line 167, in post
return await self.__open(
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/connection.py", line 217, in __open
raise TeslaException(resp.status_code, "vehicle_unavailable")
teslajsonpy.exceptions.TeslaException: vehicle_unavailable
v1.2.0
Since updating to v1.2.0 (possibly also seen on 1.1.2; I passed through these versions quickly), attempts to set the state of the car's HVAC are failing with an internal error. I see similar errors when calling eg: lock.unlock
eg: when calling climate.set_hvac_mode:
Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/tesla_custom/climate.py:96
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 11:16:04 (1 occurrences)
Last logged: 11:16:04
[281473065545984] None
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 185, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1491, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1526, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 658, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 830, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 695, in _handle_entity_call
await result
File "/config/custom_components/tesla_custom/tesla_device.py", line 35, in wrapped
result = await func(*args, **kwargs)
File "/config/custom_components/tesla_custom/climate.py", line 96, in async_set_hvac_mode
await self.tesla_device.set_status(False)
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/homeassistant/climate.py", line 140, in set_status
data = await self._controller.api(
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/controller.py", line 202, in wake_up
result = await instance._wake_up(car_id)
File "/usr/local/lib/python3.9/site-packages/teslajsonpy/controller.py", line 677, in _wake_up
async with self.__wakeup_conds[car_vin]:
KeyError: None
Operating System
Home Assistant OS 5.13
Core
Version
core-2021.4.6
Newest Version
core-2021.5.0b1
Supervisor
Version
supervisor-2021.04.3
Newest Version
supervisor-2021.04.3
Logger: custom_components.tesla
Source: custom_components/tesla/init.py:253
Integration: Tesla (documentation, issues)
First occurred: 7:58:48 (33 occurrences)
Last logged: 8:30:48
Unexpected error fetching tesla data: 'str' object is not callable
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 173, in _async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/tesla/init.py", line 253, in _async_update_data
return await self.controller.update()
File "/usr/local/lib/python3.8/site-packages/teslajsonpy/controller.py", line 719, in update
cars = await self.get_vehicles()
File "/usr/local/lib/python3.8/site-packages/backoff/_async.py", line 133, in retry
ret = await target(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/teslajsonpy/controller.py", line 407, in get_vehicles
return (await self.__connection.get("vehicles"))["response"]
File "/usr/local/lib/python3.8/site-packages/teslajsonpy/connection.py", line 90, in get
return await self.post(command, "get", None)
File "/usr/local/lib/python3.8/site-packages/teslajsonpy/connection.py", line 112, in post
self.code = await self.get_authorization_code(
File "/usr/local/lib/python3.8/site-packages/teslajsonpy/connection.py", line 405, in get_authorization_code
html = await resp.text()
TypeError: 'str' object is not callable
I find the Tesla's use of the word 'update' confusing. It seems to expose:
I think it would be better if we used the "mdi:car-connected" icon for the update-switch, and considered renaming it to 'enable polling' or 'enable scans' (as 'scan' is the word used in the configuration).
I've tweaked my dashboard to show these values so that I'm no longer confused, but I wonder if others might benefit from making the change in the actual integration.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.