Conversation
jcieplinski
commented
Aug 19, 2025
- Added set_ac_current_limit
- Added get_ac_current_settings, in case you want to poll for the current settings
- Added an example file
There was a problem hiding this comment.
Pull Request Overview
This pull request adds AC current limit control functionality to the LucidAPI, allowing users to programmatically set and retrieve AC charging current limits for Lucid vehicles.
- Adds
set_ac_current_limit()method to control the AC current limit for charging - Adds
get_ac_current_settings()method to retrieve current AC current settings - Includes a comprehensive example script demonstrating the new functionality
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
lucidmotors/__init__.py |
Adds two new methods to the LucidAPI class for AC current limit control and monitoring |
examples/ac_current_control.py |
Provides a complete example script demonstrating how to use the new AC current control features |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| self._vehicle_service.SetCreatureComfortMode(request) | ||
| ) | ||
|
|
||
| async def set_ac_current_limit(self, vehicle: Vehicle, current_limit: int) -> None: |
There was a problem hiding this comment.
The current_limit parameter lacks validation for reasonable AC current values. Consider adding validation to ensure the current_limit is within a safe and practical range (e.g., 6-80 amperes) to prevent potentially dangerous or invalid values from being sent to the vehicle.
ca3f4aa to
dffc723
Compare
- Added set_ac_current_limit - Added get_ac_current_settings, in case you want to poll for the current settings - Added an example file
dffc723 to
4328cab
Compare
|
I'm not able to update the current limit on my 2023 AT with this - it stays at whatever is set from the pilot panel. I've tried while my car is sleeping, awake, and actively charging. Has someone else been able to set it successfully? Here is my output from running the example: |
|
Doesn't work for me, either. Doesn't throw any error. Just doesn't have any effect in the car, either. |