Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions source/_components/nissan_leaf.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ ha_iot_class: "Cloud Polling"

The `nissan_leaf` component offers integration with the [NissanConnect EV](http://youplus.nissan.co.uk/GB/en/YouPlus/ConnectedServices.html) cloud service. NissanConnect EV was previously known as Nissan Carwings. It offers:

* sensors for the battery status and range
* sensors for the battery status, range and charging status
* a switch to start and stop the climate control
* a switch to start the car charging (cannot be stopped remotely - API limitation)
* a device tracker to locate the car (only on later Leaf models)
* services to request updates from the car and to request the car starts charging.

## {% linkable_title Configuration %}

Expand Down Expand Up @@ -48,7 +48,7 @@ nissan_connect:
description: If your car has the updated head unit (NissanConnect rather than Carwings) then the location can be aquired and exposed via a device tracker. If you have a pre-2014 24 kWh Leaf then you will have Carwings and this should be set to false.
required: false
type: boolean
scan_interval:
update_interval:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to change this in the source to scan_interval. We're in the process of moving all other similar terms over to that name.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would require an update to the component. While I do agree with you @MartinHjelmare, this update reflects the code changes in the parent PR. Considering that, I would suggest merging this in for now?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes @frenck! 👍 My comment was more a for the future thing. Sorry about not being clear.

description: The interval between updates if the climate control is off and the car is not charging. Set in any time unit (e.g. minutes, hours, days!).
required: false
default: 1 hour
Expand Down Expand Up @@ -76,7 +76,7 @@ nissan_leaf:
password: "YOUR_PASSWORD"
region: "YOUR_REGION"
nissan_connect: true
scan_interval:
update_interval:
hours: 1
update_interval_charging:
minutes: 15
Expand All @@ -85,9 +85,19 @@ nissan_leaf:
force_miles: true
```

## {% linkable_title Starting a Charge %}

You can use the `nissan_leaf.start_charge` service to send a request to the Nissan servers to start a charge. The car must be plugged in! The service requires you to provide the vehicle identification number (VIN) as a parameter. You can see the VIN on the attributes of all the entities created by this component, except the device_tracker.

```yaml
- service: nissan_leaf.start_charge
data:
vin: '1HGBH41JXMN109186' # replace
```

## {% linkable_title Updating on-demand using Automation %}

You can also use the `nissan_leaf.update` service to request an on-demand update. To update almost exclusively via the service set the `update_interval` to a high value in the component configuration. The service requires you to provide the vehicle identification number (VIN) as a parameter. You can see the VIN on the attributes of all the entities created by this component, except the device_tracker.
You can also use the `nissan_leaf.update` service to request an on-demand update. To update almost exclusively via the service set the `update_interval` to a high value in the component configuration. The service requests the VIN number as described above.

```yaml
- id: update_when_driver_not_home
Expand All @@ -111,7 +121,9 @@ You can also use the `nissan_leaf.update` service to request an on-demand update
* The update interval has a minimum of two minutes.
* Requesting updates uses a small amount of power from the 12 V battery. The 12 V battery charges from the main traction battery when the car is not plugged in. If the car is left plugged in for a long time, or if the main traction battery is very low then the 12 V battery may gradually discharge. A low update interval may cause the 12 V battery to become flat. When the 12 V battery is flat the car will not start. _Do not set the update interval too low. Use at your own risk._
* This component communicates with the Nissan Servers which then communicate with the car. The communication between the car and the Nissan Servers is very slow, and takes up to five minutes to get information from the car, therefore the default polling interval is set to one hour to not overwhelm the connection.
* Responses from the Nissan servers are received separately for the battery/range, climate control and location. The `updated_on` attribute will show the last time the data was retrieved from the server. There are separate attributes for when the `next_update` is scheduled, and if an `update_inprogress`. The `nissan_leaf.update` service will reset the `next_update` attribute.
* Responses from the Nissan servers are received separately for the battery/range, climate control and location. The `updated_on` attribute will show the last time the data was retrieved from the server. There are separate attributes for when the `next_update` is scheduled, and to indicate if `update_in_progress`. The `nissan_leaf.update` service will reset the `next_update` attribute.
* The Nissan APIs do not allow charging to be stopped remotely.
* The Nissan servers have a history of being unstable, therefore please confirm that the official Nissan Leaf app/website is working correctly before reporting bugs.

Please report bugs using the following logger configuration.

Expand Down