FordPass Integration

I don’t believe the Tesla Wall Connector has a power on/off toggle…I had one previously and could only control charging from the Tesla itself, but the Tesla integration for HA did provide this control over the vehicle…really wish this was possible with this FordPass integration for HA.

Here’s my card and code. I started it as a Vertical Stack in case I wanted to add a different card below, but haven’t added more yet. Also, I modified the following:

  • Used the template sensor for battery level I had previously configured
  • adjusted the door lock icon to the default
  • enabled color for sensor state
  • added secondary info for when the sensor was last updated
  • added conditional rows when charging to show several items such as how much energy is being transferred from the sensor on the EVSE, the Zwave switch to toggle EVSE on/off, the time until vehicle reaches 90%, and energy required to get to 90%. → I couldn’t figure out how to merge these into a more concise conditional statement, so ended up with what you can see below.
  • Used the image available on ford.com when I log in to my fordpass account, and I found that adjusting the number at the end from 1-5 changes the orientation of the vehicle.
  • added a tap action for the vehicle image to take me to the device integration page for this vehicle within HA for more information.

type: vertical-stack
cards:
  - type: entities
    entities:
      - entity: sensor.fordpass_elveh
        name: Range
        secondary_info: last-updated
      - entity: sensor.fordpass_battery_level
        secondary_info: last-updated
      - entity: sensor.fordpass_charging_cable
        icon: mdi:ev-plug-type1
        secondary_info: last-updated
      - entity: sensor.fordpass_charging_status
        icon: mdi:lightning-bolt
        secondary_info: last-updated
      - type: conditional
        conditions:
          - entity: sensor.fordpass_charging_status
            state: Charging
        row:
          entity: sensor.direct_wire_indoor_outdoor_smart_switch_electric_production_w
          secondary_info: last-updated
      - type: conditional
        conditions:
          - entity: sensor.fordpass_charging_status
            state: Charging
        row:
          entity: switch.direct_wire_indoor_outdoor_smart_switch
          secondary_info: last-updated
      - type: conditional
        conditions:
          - entity: sensor.fordpass_charging_status
            state: Charging
        row:
          entity: sensor.fordpass_time_to_charge_battery_to_90
          secondary_info: last-updated
      - type: conditional
        conditions:
          - entity: sensor.fordpass_charging_status
            state: Charging
        row:
          entity: sensor.fordpass_energy_to_90
          secondary_info: last-updated
      - entity: switch.fordpass_ignition_switch
        name: Start
        secondary_info: last-updated
      - entity: lock.fordpass_doorlock
        name: Door Locks
        secondary_info: last-updated
      - entity: sensor.fordpass_windowposition
        name: Windows
        icon: mdi:car-door
        secondary_info: last-updated
      - entity: device_tracker.fordpass_tracker
        name: Location
        secondary_info: last-updated
    header:
      type: picture
      image: >-
        https://www.digitalservices.ford.com/fs/api/v2/vehicles/image/full?vin=REDACTED&year=2022&countryCode=USA&angle=1
      tap_action:
        action: navigate
        navigation_path: /config/devices/device/fa2868b9f882b1845ca13ea5e95dc1cd
    footer:
      type: graph
      entity: sensor.fordpass_elveh
      hours_to_show: 24
      detail: 2
    title: Dayman - Mustang Mach-E GT
    state_color: true

And if you’re interested, here are the template sensors I used to calculate the charge time and energy to 90%.

#--------------------------------------------------------------------------------------------------
# Fordpass Energy to 90%
#--------------------------------------------------------------------------------------------------
- sensor:
  - name: "Fordpass Energy to 90%"
    unique_id: "fordpass_energy_to_90"
    unit_of_measurement: "kWh"
    device_class: "energy"
    state: >
      {% set percent = states('sensor.fordpass_battery_level') | float(0) / 100.0 | float(0) %}
      {% set energy = 91 | float(0) %}
      {% set charge = ((0.9 - percent) * energy) | float(0) %}
      {{ charge }}

#--------------------------------------------------------------------------------------------------
# Forpass Time to Charge Battery to 90% 
#--------------------------------------------------------------------------------------------------
- sensor:
  - name: "Fordpass Time to Charge Battery to 90%"
    unique_id: "fordpass_time_to_charge_battery_to_90"
    state: >
      {% set a = states('sensor.fordpass_energy_to_90') | float(0.0001) %}
      {% set b = states('sensor.direct_wire_indoor_outdoor_smart_switch_electric_production_w') | float(0.0001) %}
      {% if b > 5 %}
        {% set decimal_hours = a / b * 1000 %}
      {% else %}
        {% set decimal_hours = 0.0 %}
      {% endif %}
      {% set minutes = (decimal_hours % 1 * 60) | round(0) %}
      {% set decimal_hours = decimal_hours| int(0) %}
      {% if minutes  <= 9 %}
        {% set min = '0' ~ minutes | string %}
      {% else %}
        {% set min = minutes | string %}
      {% endif %}
      {{ decimal_hours ~ ':' ~ min }}
4 Likes