Automation code for evaluating state attributes

I’m using the Tesla Custom Integration which has an entity
binary_sensor.<tesla>_online_sensor
which has attributes:

state: asleep
vehicle_id: 2028696424
vin: 5YJ3E1EB8JF104401
id: 1492931109939305
update_interval: 3600
vehicle_data: {"climate_state": {"allow_cabin_overheat_protection": true, "auto_seat_climate_left": false, 
"auto_seat_climate_right": false, "battery_heater": false, "battery_heater_no_power": null, 
"cabin_overheat_protection": "On", "cabin_overheat_protection_actively_cooling": false, 

snip


"charge_state": {"battery_heater_on": false, "battery_level": 74, "battery_range": 228.44, "charge_amps": 
12, "charge_current_request": 12, "charge_current_request_max": 48, "charge_enable_request": true, 
"charge_energy_added": 10.98, "charge_limit_soc": 69, "charge_limit_soc_max": 100, 
"charge_limit_soc_min": 50, "charge_limit_soc_std": 90, "charge_miles_added_ideal": 45.0, 
"charge_miles_added_rated": 45.0, "charge_port_cold_weather_mode": false, "charge_port_color": 
"<invalid>", "charge_port_door_open": true,"charge_port_latch": "Engaged", "charge_rate": 0.0,

snip

How do I evaluate whether charge_port_door_open is true? I suspect I need something like

condition: template
      value_template: '{{ is_state_attr(.................

Any help is appreciated.