Tesla unlock cable or open charge port

Hi all

Simple automation to unlock the charging cable without needkng the app or going into the car.

Can do with Shelly motion sensor or button. I have chosen the button which I’ve put next to my charging station.

Can do with Yaml code for the automation (go to new automation - edit in yaml - paste). Probably need the ID so might be simpeler to simply add the trigger (push of the button), condition (car is home) and actions (stop charging and open charge port which is also same for unlocking the cable)

YAML

alias: Disconnect Charger Tesla Button
description: ''
trigger:
  - platform: device
    device_id: <fill yours in>
    domain: shelly
    type: single
    subtype: button
condition:
  - condition: state
    entity_id: device_tracker.tesla_model_3_location_tracker
    state: home
action:
  - service: switch.turn_off
    data: {}
    target:
      entity_id: switch.tesla_model_3_charger_switch
  - service: lock.unlock
    data: {}
    target:
      entity_id: lock.tesla_model_3_charger_door_lock
mode: single

@Test123

Thanks for this! I want to trigger this action by using a Robbshop 4 button zigbee wall switch, I have managed to record the Event, but don’t seem to get to the correct action.

Can you help me to write the right yaml code?

Event:

event_type: deconz_event

data:

id: rob_200_008_0

unique_id: hidden

event: 3002

device_id: hidden

origin: LOCAL

time_fired: “2023-09-11T09:54:28.823322+00:00”

context:

id: hidden

parent_id: null

user_id: null

Already got it to work, the issue was in the entity ID, I copied the one from above but needed to use the entity_ID from my Tesla which is different.

Hi there.

I don’t seem to have any entities that enable actions for my Tesla. How have you linked the Tesla to HA? I seem to only see sensors from the car. I used the fleet linking option to add the car to HA.

Thanks

Started to use the Tessie App on my iphone + Tessie integration in HA. Costs like €5 a month but saves me a shit load of annoying Tesla API fleet BS