-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add services to Renault integration #18981
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,48 @@ You need two API keys: one for Gigya and one for Kamereon and they shouldn't be | |
{% include integrations/config_flow.md %} | ||
|
||
All vehicles linked to the account should then get added as devices, with sensors added as linked entity. | ||
|
||
## Services | ||
|
||
### Service `renault.ac_start` | ||
|
||
Start A/C on vehicle. | ||
|
||
| Service data attribute | Required | Description | Example | | ||
| ---------------------- | -------- | ----------- | ------- | | ||
| `vehicle`| yes | device_id of the vehicle | | | ||
| `temperature` | yes | Target A/C temperature in °C | | | ||
| `when` | no | Timestamp for the start of the A/C (optional - defaults to now) | `2020-05-01T17:45:00` | | ||
|
||
### Service `renault.ac_cancel` | ||
|
||
Cancel A/C on vehicle. | ||
|
||
| Service data attribute | Required | Description | | ||
| ---------------------- | -------- | ----------- | | ||
| `vehicle`| yes | device_id of the vehicle | | ||
|
||
### Service `renault.charge_set_schedules` | ||
|
||
Update charge schedule on vehicle. | ||
|
||
| Service data attribute | Required | Description | Example | | ||
| ---------------------- | -------- | ----------- | ------- | | ||
| `vehicle`| yes | device_id of the vehicle | | ||
| `schedules` | yes | Schedule details. Can be a single schedule or a list of schedules | `[{'id':1,'activated':true,'monday':{'startTime':'T12:00Z','duration':15}},<br>{'id':2,'activated':false,'monday':{'startTime':'T12:00Z','duration':240}}<br>]` | | ||
|
||
Notes: | ||
|
||
- `schedules` can be in the form `{'id':1,...}` when updating a single schedules, or in the form `[{'id':1,...},{'id':2,...},...]` when updating multiple schedules within the same call | ||
- the `id` is compulsory on each `schedule` (should be 1 to 5 depending on the vehicle) | ||
- the `activated` flag is an optional boolean. If it is not provided, then the existing flag will be kept as is. | ||
- the `monday` to `sunday` elements are optional. If they are not provided, then the existing settings will be kept for each day. If they are provided as None, then the existing setting will be cleared. If a value is provided, it must conform to this format `{'startTime':'T12:00Z','duration':15}` where start time is in UTC format and the duration is in minutes. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I noticed now that we only validate the time string as string in the service schema. Could we use the time validator to help users use the correct time string? Then we can format the final string from the returned datetime. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The CLI version of RenaultAPI has some validation/conversion built in: https://github.com/hacf-fr/renault-api/blob/7c2336c52ed0298a3ed2b8e7dbb77b839676dced/src/renault_api/cli/charge/schedule.py#L202 There is also a draft PR to add validation to the non-CLI version: hacf-fr/renault-api#157 There are some extra rules like the minutes of startTime needs to be in (00,15,30,45) and the total duration needs to be a multiple of 15 minutes (eg. 240 is valid but not 245) I'll have a go at a follow-up PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure when I'll get a chance to work on the new PR (there is also a request from @frenck to implement re-auth). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure! The docs are fine. |
||
|
||
### Service `renault.charge_start` | ||
|
||
Start charge on vehicle. | ||
|
||
| Service data attribute | Required | Description | | ||
| ---------------------- | -------- | ----------- | | ||
| `vehicle`| yes | device_id of the vehicle | | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed in the preview that the br tag doesn't work.
https://deploy-preview-18981--home-assistant-docs.netlify.app/integrations/renault/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how to generate a preview, but I've moved the example out of the grid to gain some space.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The preview is generated automatically by the CI build. It's linked below among the PR checks.