Tesla actions fail unless mobile app is open and connected

Running Hass.IO 84.6, with the Tesla component configured and pulling data successfully, but when I don’t have the Tesla app open on my phone HA will fail to turn on climate, unlock, etc. If I open the Tesla app and wait for it to connect to the car, then HA works fine, but it’s just not practical. Initially I had the scan_interval set to 1800, but I’ve since removed that and am using the default of 300 with no difference. Surely, this is not expected behavior. Thanks in advance! I appreciate anyone’s help!

Climate error:

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/service.py", line 277, in _handle_service_platform_call
    await getattr(entity, func)(**data)
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/climate/tesla.py", line 100, in set_operation_mode
    self.tesla_device.set_status(True)
  File "/usr/local/lib/python3.6/site-packages/teslajsonpy/Climate.py", line 68, in set_status
    if data['response']['result']:
TypeError: 'bool' object is not subscriptable

Unlock error:

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/service.py", line 277, in _handle_service_platform_call
    await getattr(entity, func)(**data)
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/lock/tesla.py", line 43, in unlock
    self.tesla_device.unlock()
  File "/usr/local/lib/python3.6/site-packages/teslajsonpy/Lock.py", line 36, in unlock
    if data['response']['result']:
TypeError: 'bool' object is not subscriptable

Hello,
Yea I know about this issue and currently working for resolution.

4 Likes

Awesome! Thank you sir!

Anything I can do to help?