Teslemetry / hass-teslemetry

Teslemetry integration from Home Assistant through HACS
https://teslemetry.com
MIT License
13 stars 7 forks source link

Home Link #12

Closed ddaddy closed 7 months ago

ddaddy commented 9 months ago

Checklist

Is your feature request related to a problem? Please describe.

Can you add support for activating Home Link please?

Describe the solution you'd like

Home Link activation

Describe alternatives you've considered

None

Additional context

Nothing

Bre77 commented 9 months ago

Yes, I'll throw it into a future release but you'll have to test it and let me know if it works because I cannot test it.

ddaddy commented 9 months ago

No problem

Bre77 commented 9 months ago

The latest release has Home Link button and it works as far as I can test it. Let me know what error you get when running it.

ddaddy commented 9 months ago

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 240, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2279, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2316, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 892, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 962, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/button/__init__.py", line 139, in _async_press_action
    await self.async_press()
  File "/config/custom_components/teslemetry/button.py", line 82, in async_press
    await self.handle_command(self.entity_description.func(self.api))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/teslemetry/button.py", line 43, in <lambda>
    lat=api.coordinator.data["drive_state_latitude"],
        ^^^^^^^^^^^^^^^
AttributeError: 'VehicleSpecific' object has no attribute 'coordinator'```
Bre77 commented 9 months ago

Sorry I should have been cleared you'll need to update to the latest release, which in HACS may require you to tick the beta switch to see it.

ddaddy commented 9 months ago

Ah ok. I did update but not to the beta. I’ll get back to you.

ddaddy commented 9 months ago
2024-02-13 08:58:18.805 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Teslemetry for teslemetry
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 444, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/teslemetry/__init__.py", line 78, in async_setup_entry
    car_type=product["vehicle_config"]["car_type"],
             ~~~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 'vehicle_config'
Bre77 commented 9 months ago

Ok leave it with me.

Bre77 commented 9 months ago

Turns out this was a change made by Tesla to the product API endpoint, took out the whole integration. A new version has been released to fix it.

Bre77 commented 9 months ago

@ddaddy please retest with the latest version (1.5.5) when possible.