Jaguar Landrover InControl Integration

Nice job!
just a question: it’s not possible to commute start vehicle with a single button, just like lock and unlock, right?
It needs necessarly two different buttons, one for every service. Am I right?

You can start the car the car with a single button. The service is: jlrincontrol.start_vehicle

However, you need to give it the pin that you setup in the InControl App on your phone. I didn’t want to hardcode the pin in, so I have a keypad that allows you to put the pin in, and it uses a template for variable capture, and then a script to call the service to start the car with the pin. The script is what I call from the button

The doors do have to be locked for the service to work, otherwise it will fail.

That said, you could string multiple services together into a script so with one button you can lock the doors, then start the car.

Could you share your lovelace yaml please?

Is there a possibility to check if the remote start engine is running?

Edit: yes, there is

Screenshot 2023-01-12 at 10.58.50

If anybody interested in lovelace setup, here’s mine. Its not perfect yet.

Yaml:

type: picture-elements
image: /local/defender.png
style: |
  ha-card {
    border-radius: 10px;
    border: solid 1px rgba(100,100,100,0.3);
    box-shadow: 3px 3px rgba(0,0,0,0.4);
    overflow: hidden;
  } 
elements:
  - type: icon
    icon: mdi:car-key
    entity: lock.defender_doors
    tap_action:
      action: toggle
    style:
      color: white
      left: 10%
      top: 86%
  - type: state-label
    entity: lock.defender_doors
    tap_action:
      action: toggle
    style:
      color: white
      left: 10%
      top: 95%
  - type: icon
    icon: mdi:security
    entity: sensor.defender_alarm
    style:
      color: white
      left: 30%
      top: 86%
  - type: state-label
    entity: sensor.defender_alarm
    style:
      color: white
      left: 30%
      top: 95%
  - type: icon
    icon: mdi:car-door
    entity: sensor.defender_windows
    style:
      color: white
      left: 50%
      top: 86%
  - type: state-label
    entity: sensor.defender_windows
    style:
      color: white
      left: 50%
      top: 95%
  - type: icon
    icon: mdi:engine
    entity: switch.defender_remote_start
    tap_action:
      action: toggle
    style:
      color: white
      left: 70%
      top: 86%
  - type: state-label
    entity: switch.defender_remote_start
    tap_action:
      action: toggle
    style:
      color: white
      left: 70%
      top: 95%
  - type: icon
    icon: mdi:speedometer
    entity: sensor.defender_info
    tap_action: more_info
    style:
      color: white
      left: 90%
      top: 86%
  - type: icon
    icon: mdi:refresh
    entity: sensor.defender_info
    tap_action:
      action: call-service
      service: jlrincontrol.update_health_status
      service_data:
        entity_id: sensor.defender_info
    style:
      color: white
      left: 80%
      top: 45%
  - type: state-label
    entity: sensor.defender_info
    attribute: Odometer
    style:
      color: white
      left: 90%
      top: 95%
  - type: image
    entity: sensor.defender_tyres
    image: /local/defender_top1.png
    style:
      top: 2%
      right: 11%
      width: 5em
      height: 7em
      transform: none
  - type: state-label
    entity: sensor.defender_tyres
    attribute: Front Right Pressure (bar)
    tap_action: none
    style:
      color: white
      right: 0%
      top: 17%
  - type: icon
    icon: mdi:car-tire-alert
    entity: sensor.defender_alarm
    style:
      color: white
      right: 5%
      top: 9%
  - type: state-label
    entity: sensor.defender_tyres
    attribute: Front Left Pressure (bar)
    tap_action: more_info
    style:
      color: white
      right: 18%
      top: 17%
  - type: icon
    icon: mdi:car-tire-alert
    entity: sensor.defender_alarm
    style:
      color: white
      right: 23%
      top: 9%
  - type: state-label
    entity: sensor.defender_tyres
    attribute: Rear Left Pressure (bar)
    tap_action: more_info
    style:
      color: white
      right: 18%
      top: 37%
  - type: icon
    icon: mdi:car-tire-alert
    entity: sensor.defender_alarm
    style:
      color: white
      right: 23%
      top: 29%
  - type: state-label
    entity: sensor.defender_tyres
    attribute: Rear Right Pressure (bar)
    tap_action: more_info
    style:
      color: white
      right: 0%
      top: 37%
  - type: icon
    icon: mdi:car-tire-alert
    entity: sensor.defender_alarm
    style:
      color: white
      right: 5%
      top: 29%
  - type: custom:circle-sensor-card
    entity: sensor.defender_range
    max: 900
    min: 0
    stroke_width: 15
    gradient: true
    fill: '#aaaaaabb'
    name: range
    units: km
    font_style:
      font-size: 0.9em
      font-color: white
    style:
      top: 2%
      left: 0%
      width: 4em
      height: 4em
      transform: none

I also made a switch for engine remote start, which also shows status. I’m using it in my lovelace:

switch:
  - platform: template
    switches:
      defender_remote_start:
        friendly_name: "Defender Remote Start"
        value_template: "{{ is_state('sensor.defender_status', 'Engine On Remote Start') }}"
        turn_on:
          service: jlrincontrol.start_vehicle
          data:
            entity_id: sensor.defender_info
            pin: xxxx
            target_value: 22
        turn_off:
          service: jlrincontrol.stop_vehicle
          data:
            entity_id: sensor.defender_info
            pin: xxxx
        icon_template: >-
            {% if is_state('sensor.defender_status', 'Engine On Remote Start') %}
              mdi:engine
            {% else %}
              mdi:engine-off
            {% endif %}
3 Likes

Does anyone use Stop Preconditioning?

I’m trying to create an automation which manages the end of an Ocopus Intelligent charge period, I have a Zappi so I want the charger to go back into Eco+ mode when this happens and have the Jag ready to accept a charge. To do this I have this automation:

alias: OI off - Zappi to ECO+
description: ""
trigger:
  - type: turned_off
    platform: device
    device_id: XXXXX
    entity_id: binary_sensor.octopus_intelligent_slot
    domain: binary_sensor
condition: []
action:
  - device_id: XXXXXX
    domain: select
    entity_id: select.myenergi_zappi_XXXXX_charge_mode
    type: select_option
    option: Eco+
  - service: jlrincontrol.start_charging
    data:
      entity_id: sensor.XXXX_info
  - service: jlrincontrol.stop_preconditioning
    data:
      entity_id: sensor.XXXX_info
mode: single

The last part is because when you start charge the Zappi thinks the Jag wants pre-conditioning, this shoudl be a workaround to stop it, but it doesn’t stop. Any one know why?

Are there other I-Pace user here? I have an I-Pace and a Evoque PHEV. The services work on the Evoque but not on the I-Pace. I cannot do a simply “honk_blink” (easy to test because in don’t need pin or other information.
I duplicate the same button and only change the sensor.xxxx_info to the I-Pace and it didn’t’ work.
I can see all the values of the I-Pace (battery, doors, etc.), I can Lock and Unlock the doors with the Doors entity, but the lock and unlock services don’t work.
Just a note, I can make the I-Pace honk and blink with the oficial App (or with WattCat).
Any help would be much appreciated.

Update: I think I found the problem and opened an issue for it (problem with one integration with two different InControl JLR accounts… possible API Token problem).

Hello guys! Does anyone have tested the integration with Land Rover Discovery models? Thank you

Still work in progress, but getting there…
If it is of interest of some of you, I can share the data to do it.
Two I-Pace cards to the HA (it has the doors and windows entities hidden, just showing if unlocked or open):

image

image

Hi I am new to HA and have a range rover Evoque PHEV I was able to install the incontrol HACS. I just can’t lock and unlock the vehicle; start and stop charging. Also I would love to have the graphic leyaut that you have, it’s great. I really don’t know where to put my hands can you help me thanks a lot.

Hello congratulations for everything I wanted to ask you in what. folder the Yalm code for the switch should be entered

I will get back to you as soon as I get some more time to help you. I also have an Evoque PHEV and I already integrate it on the Home Assistant as I did with my I-Pace.

image

It works fine with my Land Rover Discovery Sport (2020 model).

1 Like

@Matfio22 , I can share my card code with you, but you need to make your own templates and change the “mycar” to the name of your car and “mypin” for your pin.

You also need to get the picture you want from the internet (where I got mine - don’t know how to share the .png file with the transparent background… I think you need to do it yourself) and have at least some external resources like “card-mod” to be able to change the colors with the color names and “text-element” to put some text where you want to put it.

I also have some other sensor that are not directly associated with JLR Integration (like the power one that I have connected to shelly).

Here is the code for mine. Hope it helps to get you started…

Picture-elements card code:

type: picture-elements
image: /local/images/evoque/evoque.jpg
style: |
  #root > hui-image {
    display: block;
    width: 100%;
    top: 0px;
    padding: 0px 0px 0px 0px;
    margin: auto;
  }
elements:
  - type: image
    image: /local/images/evoque/evoque_tyres_01.png
    style:
      top: 33%
      left: 15%
      width: 25%
      height: 50%
  - type: conditional
    conditions:
      - entity: sensor.mycar_tyre_front_right
        state: Normal
    elements:
      - type: state-label
        entity: sensor.mycar_tyre_front_right
        attribute: pressure_bar
        suffix: ' bar'
        style:
          color: black
          top: 12.5%
          left: 7%
          font-weight: bold
  - type: conditional
    conditions:
      - entity: sensor.mycar_tyre_front_right
        state_not: Normal
    elements:
      - type: state-icon
        entity: sensor.mycar_tyre_front_right
        style:
          top: 7%
          left: 7%
          '--paper-item-icon-color': red
      - type: state-label
        entity: sensor.mycar_tyre_front_right
        attribute: pressure_bar
        suffix: ' bar'
        style:
          color: red
          top: 12.5%
          left: 7%
          font-weight: bold
  - type: conditional
    conditions:
      - entity: sensor.mycar_tyre_rear_right
        state: Normal
    elements:
      - type: state-label
        entity: sensor.mycar_tyre_rear_right
        attribute: pressure_bar
        suffix: ' bar'
        style:
          color: black
          top: 7%
          left: 19%
          font-weight: bold
  - type: conditional
    conditions:
      - entity: sensor.mycar_tyre_rear_right
        state_not: Normal
    elements:
      - type: state-icon
        entity: sensor.mycar_tyre_rear_right
        style:
          '--paper-item-icon-color': red
          top: 7%
          left: 27%
      - type: state-label
        entity: sensor.mycar_tyre_rear_right
        attribute: pressure_bar
        suffix: ' bar'
        style:
          color: red
          top: 7%
          left: 19%
          font-weight: bold
  - type: conditional
    conditions:
      - entity: sensor.mycar_tyre_front_left
        state: Normal
    elements:
      - type: state-label
        entity: sensor.mycar_tyre_front_left
        attribute: pressure_bar
        suffix: ' bar'
        style:
          color: black
          top: 30%
          left: 13%
          font-weight: bold
  - type: conditional
    conditions:
      - entity: sensor.mycar_tyre_front_left
        state_not: Normal
    elements:
      - type: state-icon
        entity: sensor.mycar_tyre_front_left
        style:
          '--paper-item-icon-color': red
          top: 34.5%
          left: 12%
      - type: state-label
        entity: sensor.mycar_tyre_front_left
        attribute: pressure_bar
        suffix: ' bar'
        style:
          color: red
          top: 30%
          left: 13%
          font-weight: bold
  - type: conditional
    conditions:
      - entity: sensor.mycar_tyre_rear_left
        state: Normal
    elements:
      - type: state-label
        entity: sensor.mycar_tyre_rear_left
        attribute: pressure_bar
        suffix: ' bar'
        style:
          color: black
          top: 20.5%
          left: 24%
          font-weight: bold
  - type: conditional
    conditions:
      - entity: sensor.mycar_tyre_rear_left
        state_not: Normal
    elements:
      - type: state-icon
        entity: sensor.mycar_tyre_rear_left
        style:
          '--paper-item-icon-color': red
          top: 25%
          left: 23%
      - type: state-label
        entity: sensor.mycar_tyre_rear_left
        attribute: pressure_bar
        suffix: ' bar'
        style:
          color: red
          top: 20.5%
          left: 24%
          font-weight: bold
  - type: state-icon
    entity: sensor.mycar_soc
    style:
      transform: none
      color: black
      top: 6%
      left: 33%
  - type: state-label
    entity: sensor.mycar_soc
    style:
      transform: none
      color: black
      top: 7.2%
      left: 40%
      font-size: 110%
      font-weight: bold
      text-aligh: right
  - type: state-label
    entity: sensor.mycar_battery_energy_sensor
    prefix: (
    suffix: ' kWh)'
    style:
      transform: none
      color: black
      top: 7.2%
      left: 49%
      font-weight: bold
      text-alight: left
      font-size: 100%
  - type: state-label
    entity: sensor.mycar_soc
    attribute: Last Charge Energy (kWh)
    prefix: 'Last Charge: '
    suffix: ' kWh'
    style:
      transform: none
      color: black
      top: 13%
      left: 34%
      font-weight: bold
      text-alight: left
      font-size: 100%
  - type: state-label
    entity: sensor.mycar_info
    attribute: Odometer
    suffix: ' km'
    style:
      color: white
      top: 51%
      left: 13%
      font-size: 150%
      font-weight: bold
      text-aligh: right
  - type: conditional
    conditions:
      - entity: lock.mycar_doors
        state: locked
    elements:
      - type: icon
        icon: mdi:car-key
        style:
          color: lime
          top: 89%
          left: 8.3%
          transform: translate(-50%, -50%) scale(1.5, 1.5)
      - type: state-label
        entity: lock.mycar_doors
        style:
          color: black
          top: 98%
          left: 8.3%
          font-weight: bold
  - type: conditional
    conditions:
      - entity: lock.mycar_doors
        state_not: locked
    elements:
      - type: icon
        icon: mdi:car-key
        tap_action:
          action: call-service
          service: jlrincontrol.lock_vehicle
          data:
            entity_id: sensor.mycar_info
            pin: mypin
          target: {}
        style:
          color: red
          top: 89%
          left: 8.3%
          transform: translate(-50%, -50%) scale(1.5, 1.5)
      - type: state-label
        entity: lock.mycar_doors
        style:
          color: red
          top: 98%
          left: 8.3%
          font-weight: bold
  - type: conditional
    conditions:
      - entity: sensor.mycar_windows
        state: Closed
    elements:
      - type: icon
        icon: mdi:car-door
        style:
          color: lime
          top: 90%
          left: 24.9%
          transform: translate(-50%, -50%) scale(1.5, 1.5)
      - type: state-label
        entity: sensor.mycar_windows
        style:
          color: black
          top: 98%
          left: 24.9%
          font-weight: bold
  - type: conditional
    conditions:
      - entity: sensor.mycar_windows
        state_not: Closed
    elements:
      - type: icon
        icon: mdi:car-door
        tap_action:
          action: call-service
          service: jlrincontrol.lock_vehicle
          data:
            entity_id: sensor.mycar_info
            pin: mypin
          target: {}
        style:
          color: red
          top: 90%
          left: 24.9%
          transform: translate(-50%, -50%) scale(1.5, 1.5)
      - type: state-label
        entity: sensor.mycar_windows
        tap_action:
          action: call-service
          service: jlrincontrol.lock_vehicle
          data:
            entity_id: sensor.mycar_info
            pin: mypin
          target: {}
        style:
          color: red
          top: 98%
          left: 24.9%
          font-weight: bold
  - type: conditional
    conditions:
      - entity: sensor.mycar_alarm
        state: Armed
    elements:
      - type: icon
        icon: mdi:security
        style:
          color: lime
          top: 90%
          left: 41.5%
          transform: translate(-50%, -50%) scale(1.5, 1.5)
      - type: state-label
        entity: sensor.mycar_alarm
        style:
          color: black
          top: 98%
          left: 41.5%
          font-weight: bold
  - type: conditional
    conditions:
      - entity: sensor.mycar_alarm
        state_not: Armed
    elements:
      - type: icon
        icon: mdi:security
        tap_action:
          action: call-service
          service: script.atualizar_servico_mycar
          target: {}
        style:
          color: red
          top: 90%
          left: 41.5%
          transform: translate(-50%, -50%) scale(1.5, 1.5)
      - type: state-label
        entity: sensor.mycar_alarm
        tap_action:
          action: call-service
          service: script.atualizar_servico_mycar
          target: {}
        style:
          color: red
          top: 98%
          left: 41.5%
          font-weight: bold
  - type: state-icon
    entity: sensor.mycar_range_plus
    style:
      '--paper-item-icon-color': lime
      top: 90%
      left: 58.5%
      transform: translate(-50%, -50%) scale(1.5, 1.5)
  - type: state-label
    entity: sensor.mycar_range_plus
    suffix: ' km (EV)'
    style:
      color: black
      top: 98%
      left: 58.5%
      font-weight: bold
  - type: state-icon
    entity: sensor.mycar_fuel_percentage
    style:
      '--paper-item-icon-color': lime
      top: 90%
      left: 75.1%
      transform: translate(-50%, -50%) scale(1.5, 1.5)
  - type: state-label
    entity: sensor.mycar_fuel_percentage
    style:
      color: black
      top: 98%
      left: 75.1%
      font-weight: bold
  - type: conditional
    conditions:
      - entity: sensor.mycar_service_info
        state: Ok
    elements:
      - type: state-icon
        entity: sensor.mycar_service_info
        style:
          '--paper-item-icon-color': lime
          top: 90%
          left: 91.7%
          transform: translate(-50%, -50%) scale(1.5, 1.5)
  - type: conditional
    conditions:
      - entity: sensor.mycar_service_info
        state_not: Ok
    elements:
      - type: state-icon
        entity: sensor.mycar_service_info
        style:
          '--paper-item-icon-color': red
          top: 90%
          left: 91.7%
          transform: translate(-50%, -50%) scale(1.5, 1.5)
  - type: state-label
    entity: sensor.mycar_service_info
    attribute: Distance To Service
    suffix: ' km'
    style:
      color: black
      top: 98%
      left: 91.7%
      font-weight: bold
  - type: conditional
    conditions:
      - entity: sensor.mycar_service_info
        state: Ok
    elements:
      - type: state-icon
        entity: sensor.mycar_service_info
        style:
          '--paper-item-icon-color': lime
          top: 14%
          left: 95%
      - type: state-label
        entity: sensor.mycar_service_info
        style:
          transform: none
          color: white
          top: 10%
          right: 8%
          text-alight: right
          font-size: 120%
          font-weight: bold
  - type: conditional
    conditions:
      - entity: sensor.mycar_service_info
        state_not: Ok
    elements:
      - type: state-icon
        entity: sensor.mycar_service_info
        style:
          '--paper-item-icon-color': red
          top: 14%
          left: 95%
      - type: state-label
        entity: sensor.mycar_service_info
        style:
          transform: none
          color: red
          top: 10%
          right: 8%
          text-alight: right
          font-size: 120%
          font-weight: bold
  - type: conditional
    conditions:
      - entity: sensor.mycar_brake_fluid_level
        state: Normal
    elements:
      - type: state-icon
        entity: sensor.mycar_brake_fluid_level
        style:
          '--paper-item-icon-color': lime
          top: 22%
          left: 95%
      - type: state-label
        entity: sensor.mycar_brake_fluid_level
        style:
          transform: none
          color: white
          top: 18%
          right: 8%
          text-alight: right
          font-size: 120%
          font-weight: bold
  - type: conditional
    conditions:
      - entity: sensor.mycar_brake_fluid_level
        state_not: Normal
    elements:
      - type: state-icon
        entity: sensor.mycar_brake_fluid_level
        style:
          '--paper-item-icon-color': red
          top: 22%
          left: 95%
      - type: state-label
        entity: sensor.mycar_brake_fluid_level
        style:
          transform: none
          color: red
          top: 18%
          right: 8%
          text-alight: right
          font-size: 120%
          font-weight: bold
  - type: conditional
    conditions:
      - entity: sensor.mycar_washer_fluid_level
        state: Normal
    elements:
      - type: state-icon
        entity: sensor.mycar_washer_fluid_level
        style:
          '--paper-item-icon-color': lime
          top: 30%
          left: 95%
      - type: state-label
        entity: sensor.mycar_washer_fluid_level
        style:
          transform: none
          color: white
          top: 26%
          right: 8%
          text-alight: right
          font-size: 120%
          font-weight: bold
  - type: conditional
    conditions:
      - entity: sensor.mycar_washer_fluid_level
        state_not: Normal
    elements:
      - type: state-icon
        entity: sensor.mycar_washer_fluid_level
        style:
          '--paper-item-icon-color': red
          top: 30%
          left: 95%
      - type: state-label
        entity: sensor.mycar_washer_fluid_level
        style:
          transform: none
          color: red
          top: 26%
          right: 8%
          text-alight: right
          font-size: 120%
          font-weight: bold
  - type: conditional
    conditions:
      - entity: binary_sensor.mycar_battery_ok
        state: 'on'
    elements:
      - type: state-icon
        entity: sensor.mycar_battery_sensor
        style:
          '--paper-item-icon-color': lime
          top: 38%
          left: 95%
      - type: state-label
        entity: sensor.mycar_battery_sensor
        suffix: ' V'
        style:
          transform: none
          color: white
          top: 34%
          right: 8%
          text-alight: right
          font-size: 120%
          font-weight: bold
  - type: conditional
    conditions:
      - entity: binary_sensor.mycar_battery_ok
        state_not: 'on'
    elements:
      - type: state-icon
        entity: sensor.mycar_battery_sensor
        style:
          '--paper-item-icon-color': red
          top: 38%
          left: 95%
      - type: state-label
        entity: sensor.mycar_battery_sensor
        suffix: ' V'
        style:
          transform: none
          color: red
          top: 34%
          right: 8%
          text-alight: right
          font-size: 120%
          font-weight: bold
  - type: conditional
    conditions:
      - entity: sensor.mycar_coolant_level
        state: Normal
    elements:
      - type: state-icon
        entity: sensor.mycar_coolant_level
        style:
          '--paper-item-icon-color': lime
          top: 46%
          left: 95%
      - type: state-label
        entity: sensor.mycar_coolant_level
        style:
          transform: none
          color: white
          top: 40%
          right: 8%
          text-alight: right
          font-size: 120%
          font-weight: bold
      - type: state-label
        entity: sensor.mycar_coolant_temp
        style:
          transform: none
          color: white
          top: 45%
          right: 8%
          text-alight: right
          font-size: 120%
          font-weight: bold
  - type: conditional
    conditions:
      - entity: sensor.mycar_coolant_level
        state_not: Normal
    elements:
      - type: state-icon
        entity: sensor.mycar_coolant_level
        style:
          '--paper-item-icon-color': red
          top: 46%
          left: 95%
      - type: state-label
        entity: sensor.mycar_coolant_level
        style:
          transform: none
          color: red
          top: 40%
          right: 8%
          text-alight: right
          font-size: 120%
          font-weight: bold
      - type: state-label
        entity: sensor.mycar_coolant_temp
        style:
          transform: none
          color: red
          top: 44%
          right: 8%
          text-alight: right
          font-size: 120%
          font-weight: bold
  - type: conditional
    conditions:
      - entity: sensor.mycar_window_front_right
        state_not: Closed
    elements:
      - type: state-icon
        entity: sensor.mycar_window_front_right
        tap_action:
          action: call-service
          service: jlrincontrol.lock_vehicle
          data:
            entity_id: sensor.mycar_info
            pin: mypin
          target: {}
        style:
          '--paper-item-icon-color': red
          top: 48%
          left: 41%
  - type: conditional
    conditions:
      - entity: sensor.mycar_window_rear_right
        state_not: Closed
    elements:
      - type: state-icon
        entity: sensor.mycar_window_rear_right
        tap_action:
          action: call-service
          service: jlrincontrol.lock_vehicle
          data:
            entity_id: sensor.mycar_info
            pin: mypin
          target: {}
        style:
          '--paper-item-icon-color': red
          top: 47%
          left: 48%
  - type: conditional
    conditions:
      - entity: sensor.mycar_window_front_left
        state_not: Closed
    elements:
      - type: state-icon
        entity: sensor.mycar_window_front_left
        tap_action:
          action: call-service
          service: jlrincontrol.lock_vehicle
          data:
            entity_id: sensor.mycar_info
            pin: mypin
          target: {}
        style:
          '--paper-item-icon-color': red
          top: 49%
          left: 56%
  - type: conditional
    conditions:
      - entity: sensor.mycar_window_rear_left
        state_not: Closed
    elements:
      - type: state-icon
        entity: sensor.mycar_window_rear_left
        tap_action:
          action: call-service
          service: jlrincontrol.lock_vehicle
          data:
            entity_id: sensor.mycar_info
            pin: mypin
          target: {}
        style:
          '--paper-item-icon-color': red
          top: 48%
          left: 63%
  - type: conditional
    conditions:
      - entity: sensor.mycar_door_front_right
        state_not: Closed
    elements:
      - type: icon
        icon: mdi:car-door-lock
        style:
          color: red
          top: 44%
          left: 35%
  - type: conditional
    conditions:
      - entity: sensor.mycar_door_rear_right
        state_not: Closed
    elements:
      - type: icon
        icon: mdi:car-door-lock
        style:
          color: red
          top: 39%
          left: 47%
  - type: conditional
    conditions:
      - entity: sensor.mycar_door_front_left
        state_not: Closed
    elements:
      - type: icon
        icon: mdi:car-door-lock
        style:
          color: red
          top: 59%
          left: 57%
  - type: conditional
    conditions:
      - entity: sensor.mycar_door_rear_left
        state_not: Closed
    elements:
      - type: icon
        icon: mdi:car-door-lock
        style:
          color: red
          top: 56%
          left: 63%
  - type: conditional
    conditions:
      - entity: sensor.mycar_bonnet
        state_not: Closed
    elements:
      - type: icon
        icon: mdi:car-door-lock
        style:
          color: red
          top: 55%
          left: 31%
  - type: conditional
    conditions:
      - entity: sensor.mycar_boot
        state_not: Closed
    elements:
      - type: icon
        icon: mdi:car-door-lock
        style:
          color: red
          top: 47%
          left: 70%
  - type: icon
    icon: mdi:refresh
    tap_action:
      action: call-service
      service: script.atualizar_servico_mycar
    style:
      color: purple
      top: 5%
      left: 95%
      transform: translate(-50%, -50%) scale(1.0, 1.0)
  - type: conditional
    conditions:
      - entity: sensor.mycar_charging
        state_not: Not Connected
    elements:
      - type: image
        image: /local/images/diversos/cable_type2_01.png
        style:
          top: 57%
          left: 74%
          width: 15%
      - type: state-badge
        entity: sensor.657
        style:
          color: transparent
          top: 69%
          left: 84%
          font-weight: bold
          text-aligh: right
      - type: state-label
        entity: sensor.mycar_soc
        attribute: Charging State
        style:
          color: black
          top: 74%
          left: 84%
          font-size: 120%
          font-weight: bold
  - type: state-label
    entity: sensor.mycar_all_info
    style:
      transform: none
      color: black
      top: '-2%'
      right: 8%
      text-alight: right
      font-size: 100%
      font-weight: bold
  - type: conditional
    conditions:
      - entity: device_tracker.mycar_device_tracker
        state: home
    elements:
      - type: icon
        icon: mdi:home-map-marker
        style:
          color: black
          top: 37.5%
          left: 4%
  - type: conditional
    conditions:
      - entity: device_tracker.mycar_device_tracker
        state_not: home
    elements:
      - type: icon
        icon: mdi:map-marker
        style:
          color: black
          top: 37.5%
          left: 4%
  - type: state-label
    entity: device_tracker.mycar_device_tracker
    style:
      transform: none
      color: black
      top: 32%
      left: 5%
      text-alight: left
      font-size: 120%
      font-weight: bold
  - type: conditional
    conditions:
      - entity: sensor.mycar_status
        state_not: Key Removed
    elements:
      - type: state-label
        entity: sensor.mycar_status
        style:
          transform: none
          color: navy
          top: 75%
          right: 0%
          font-size: 150%
          font-weight: bold
  - type: conditional
    conditions:
      - entity: sensor.mycar_cab_open
        state_not: 'FALSE'
    elements:
      - type: state-label
        entity: sensor.mycar_cab_open
        style:
          transform: none
          color: red
          top: 50%
          left: 25%
          font-size: 500%
          font-weight: bold

The pictures I use are:

evoque.jpg

evoque_tyres_01.png
evoque_tyres_01

Template code I could not put on the last post:

  - sensor:
      - name: "mycar Battery Sensor"
        unique_id: mycar_battery_sensor        
        icon: "mdi:car-battery"
        state: "{{ state_attr('sensor.mycar_all_info','core status').batteryVoltage }}"
        attributes:
          tuStatusMobilePhoneConnected: "{{ state_attr('sensor.mycar_all_info','core status').tuStatusMobilePhoneConnected }}"
          tuStatusPower: "{{ state_attr('sensor.mycar_all_info','core status').tuStatusPower }}"
          tuStatusPrimaryChargePercent: "{{ state_attr('sensor.mycar_all_info','core status').tuStatusPrimaryChargePercent }}"
          tuStatusPrimaryVolt: "{{ state_attr('sensor.mycar_all_info','core status').tuStatusPrimaryVolt }}"
  - binary_sensor:
      - name: "mycar Battery Ok"
        unique_id: mycar_battery_ok        
        state: >-
          {% set battvoltage = state_attr('sensor.mycar_all_info','core status').batteryVoltage %}

          {% if battvoltage | float >= 13 and battvoltage | float <= 15 %}
            on
          {% else %}
            off
          {% endif %}
  - sensor:
      - name: "mycar Battery Energy Sensor"
        unique_id: mycar_battery_energy_sensor        
        icon: "mdi:battery-medium"
        state: "{{ state_attr('sensor.mycar_all_info','ev status').evChargingRateSocPerHour | round(1) }}"
  - sensor:
      - name: "mycar Brake Fluid Level"
        unique_id: mycar_brake_fluid_level        
        icon: "mdi:car-brake-fluid-level"
        state: "{{ state_attr('sensor.mycar_service_info','Brake Fluid') }}"
  - sensor:
      - name: "mycar Coolant Level"
        unique_id: mycar_coolant_level        
        icon: "mdi:car-coolant-level"
        state: "{{ state_attr('sensor.mycar_service_info','Coolant Level') }}"
  - sensor:
      - name: "mycar Washer Fluid Level"
        unique_id: mycar_washer_fluid_level        
        icon: "mdi:wiper-wash"
        state: "{{ state_attr('sensor.mycar_service_info','Washer Fluid') }}"
  - sensor:
      - name: "mycar Range Plus"
        unique_id: mycar_range_plus        
        icon: "mdi:speedometer"
        state: "{{ state_attr('sensor.mycar_all_info','ev status').evRangeOnBatteryKm }}"
        attributes:
          evPhevRangeCombinedKm: "{{ state_attr('sensor.mycar_all_info','ev status').evPhevRangeCombinedKm }}"
  - sensor:
      - name: "mycar Precondition Remaining Runtime Minutes"
        unique_id: mycar_precondition_remaining_runtime_minutes        
        device_class: duration
        unit_of_measurement: min
        # we need to handle that remaining runtime minutes is not reset if precondition is manually switched off
        state: >-
          {% set evStatus = state_attr('sensor.mycar_all_info', 'ev status') %}

          {% if is_state('binary_sensor.template_mycar_precondition_operating_status', 'on') and evStatus != None and evStatus != 'unknown' %}
            {{ evStatus.evPreconditionRemainingRuntimeMinutes | int }}
          {% else %}
            0
          {% endif %}
  - binary_sensor:
      - name: "mycar Precondition Operating Status"
        unique_id: mycar_precondition_operating_status        
        device_class: running
        state: >-
          {% set evStatus = state_attr('sensor.mycar_all_info', 'ev status') %}

          {% if evStatus == None or evStatus == 'unknown' %}
            off
          {% elif evStatus.evPreconditionOperatingStatus == 'OFF' %}
            off
          {% else %}
            on
          {% endif %}
        icon: >-
          {% set evStatus = state_attr('sensor.mycar_all_info', 'ev status') %}

          {% if evStatus == None or evStatus == 'unknown' %}
            mdi:fan-alert
          {% elif evStatus.evPreconditionOperatingStatus == 'OFF' %}
            mdi:fan-off
          {% else %}
            mdi:fan
          {% endif %}
  - sensor:
      - name: "mycar Tyre Front Left"
        unique_id: mycar_tyre_front_left        
        icon: "mdi:car-tire-alert"
        state: "{{ state_attr('sensor.mycar_tyres','Front Left Status') }}"
        attributes:
          pressure_bar: "{{ state_attr('sensor.mycar_tyres','Front Left Pressure (bar)') | round(1) }}"
  - sensor:
      - name: "mycar Tyre Front Right"
        unique_id: mycar_tyre_front_right        
        icon: "mdi:car-tire-alert"
        state: "{{ state_attr('sensor.mycar_tyres','Front Right Status') }}"
        attributes:
          pressure_bar: "{{ state_attr('sensor.mycar_tyres','Front Right Pressure (bar)') | round(1) }}"
  - sensor:
      - name: "mycar Tyre Rear Left"
        unique_id: mycar_tyre_rear_left        
        icon: "mdi:car-tire-alert"
        state: "{{ state_attr('sensor.mycar_tyres','Rear Left Status') }}"
        attributes:
          pressure_bar: "{{ state_attr('sensor.mycar_tyres','Rear Left Pressure (bar)') | round(1) }}"
  - sensor:
      - name: "mycar Tyre Rear Right"
        unique_id: mycar_tyre_rear_right        
        icon: "mdi:car-tire-alert"
        state: "{{ state_attr('sensor.mycar_tyres','Rear Right Status') }}"
        attributes:
          pressure_bar: "{{ state_attr('sensor.mycar_tyres','Rear Right Pressure (bar)') | round(1) }}"
  - sensor:
      - name: "mycar Tyre Pressure Front Left"
        unique_id: mycar_tyre_pressure_front_left        
        icon: "mdi:car-tire-alert"
        state: "{{ state_attr('sensor.mycar_tyres','Front Left Pressure (bar)') | round(1) }}"
  - sensor:
      - name: "mycar Tyre Pressure Front Right"
        unique_id: mycar_tyre_pressure_front_right        
        icon: "mdi:car-tire-alert"
        state: "{{ state_attr('sensor.mycar_tyres','Front Right Pressure (bar)') | round(1) }}"
  - sensor:
      - name: "mycar Tyre Pressure Rear Left"
        unique_id: mycar_tyre_pressure_rear_left        
        icon: "mdi:car-tire-alert"
        state: "{{ state_attr('sensor.mycar_tyres','Rear Left Pressure (bar)') | round(1) }}"
  - sensor:
      - name: "mycar Tyre Pressure Rear Right"
        unique_id: mycar_tyre_pressure_rear_right        
        icon: "mdi:car-tire-alert"
        state: "{{ state_attr('sensor.mycar_tyres','Rear Right Pressure (bar)') | round(1) }}"
  - sensor:
      - name: "mycar Door Front Left"
        unique_id: mycar_door_front_left        
        icon: "mdi:car-door-lock"
        state: "{{ state_attr('lock.mycar_doors','Front Left Position') }}"
  - sensor:
      - name: "mycar Door Front Right"
        unique_id: mycar_door_front_right        
        icon: "mdi:car-door-lock"
        state: "{{ state_attr('lock.mycar_doors','Front Right Position') }}"
  - sensor:
      - name: "mycar Door Rear Left"
        unique_id: mycar_door_rear_left        
        icon: "mdi:car-door-lock"
        state: "{{ state_attr('lock.mycar_doors','Rear Left Position') }}"
  - sensor:
      - name: "mycar Door Rear Right"
        unique_id: mycar_door_rear_right        
        icon: "mdi:car-door-lock"
        state: "{{ state_attr('lock.mycar_doors','Rear Right Position') }}"
  - sensor:
      - name: "mycar Bonnet"
        unique_id: mycar_bonnet        
        icon: "mdi:car-door-lock"
        state: "{{ state_attr('lock.mycar_doors','Bonnet Position') }}"
  - sensor:
      - name: "mycar Boot"
        unique_id: mycar_boot        
        icon: "mdi:car-door-lock"
        state: "{{ state_attr('lock.mycar_doors','Boot Position') }}"
  - sensor:
      - name: "mycar Window Front Left"
        unique_id: mycar_window_front_left        
        icon: "mdi:car-door"
        state: "{{ state_attr('sensor.mycar_windows','Front Left Position') }}"
  - sensor:
      - name: "mycar Window Front Right"
        unique_id: mycar_window_front_right        
        icon: "mdi:car-door"
        state: "{{ state_attr('sensor.mycar_windows','Front Right Position') }}"
  - sensor:
      - name: "mycar Window Rear Left"
        unique_id: mycar_window_rear_left        
        icon: "mdi:car-door"
        state: "{{ state_attr('sensor.mycar_windows','Rear Left Position') }}"
  - sensor:
      - name: "mycar Window Rear Right"
        unique_id: mycar_window_rear_right        
        icon: "mdi:car-door"
        state: "{{ state_attr('sensor.mycar_windows','Rear Right Position') }}"
  - sensor:
      - unique_id: mycar_charging
        name: "mycar Charging"
        icon: "mdi:ev-plug-type2"
        state: "{{ state_attr('sensor.mycar_soc','Charging Method') }}"
  - sensor:
      - unique_id: mycar_coolant_temp
        name: "mycar Coolant Temp"
        icon: "mdi:coolant-temperature"
        device_class: temperature
        unit_of_measurement: 'ºC'
        state: "{{ state_attr('sensor.mycar_all_info','core status').engineCoolantTemp }}"
  - sensor:
      - unique_id: mycar_fuel_percentage
        name: "mycar Fuel Percentage"
        icon: "mdi:gas-station"
        unit_of_measurement: '%'
        state: "{{ state_attr('sensor.mycar_all_info','core status').fuelLevelPerc }}"
  - sensor:
      - unique_id: mycar_cab_open
        name: "mycar Cab Open"        
        state: "{{ state_attr('sensor.mycar_all_info','core status').isCabOpen }}"
1 Like

In Oct 2021, I posted the sad news that I no longer had a JLR vehicle and that I couldn’t support this integration anymore. Since that time, @ismarslomic has been doing an amazing job supporting and giving advice and I want to thank him very much for that.

Well, in good news, I have now come back to the mothership and bought a JLR once again! So, answers on a postcard…

  1. What frustrates you about this integration that you would like to see improved?
  2. What do you find difficult to do that you would like to be easier?
  3. Are their new features you would like to see supported?
  4. Do you care about the Holly & Phil fall out? :slight_smile: Dont reply to this one!

Mark

3 Likes

I’d like to better understand how the refresh timing works. Ideally I’d like to be able to switch between a fast refresh rate mode (every 3 minutes or so) based on when the car is moving or charging, triggered by phones pairing to car, car pairing to house wifi etc; and a slow “backup” refresh rate (4 hours+) when nothing is happening.

Also would be interested to know what the jlrincontrol.update_health_status service does — is that what is called every scan interval?

@Troon probably worth explaining how this integraiton works first.

Your car updates to JLRs servers on a basis defined by them. Depending on the car/type of data, this can be on a timed basis or event basis. Ie location does not update while the car is on/driving etc but updates when you stop.

Our integraiton then reads/sends commands to the JLR servers. As such, if you have a scan interval of 10 seconds, this is only reading the JLR servers every 10 seconds and does not dictate how often the car updates to these servers.

The update_health_status service, does sort of force an update from the car to JLR but I think over use of this can be rate limited by JLR and I am not 100% sure what it updates and what it doesn’t. It is the same as pulling down the screen in the app.

2 Likes

Very nice to have you back, @msp1974!

I already open a issue on GitHub about it:

I have two cars in two different JLR Incontrol accounts (my Jaguar I-Pace and my wife’s Evoque PHEV) and what I did found is thar the services calls don’t work for the second vehicle to be called.

I found a workaround to restart the integration every time I call a service like “open the doors” or something like that, but it’s very annoying and it makes the operation takes longer to work.

I think that the issue could be associated with the temporary tokens that are required for some service calls… maybe the integration stores that particularly token if it was received at a defined time ago, and when you try to do the same thing to the other car, it don’t refresh the token (maybe is using the same variable name on the same environment) and It doesn’t’ do nothing.

I think that with different variable names to store the tokens or refreshing the “special” tokens every time the service is called could resolve this issue. One other thing that could also resolve the issue is to allow multiple instances of the integration on the HA. It only allows one integration and you have to put both different JLR Incontrol Accounts in the same integration (and I think that is messing with the tokens).

image