Skip to content

Commit

Permalink
Merge pull request #32 from bretterer/vehicle-control
Browse files Browse the repository at this point in the history
Fix level mapping for HVAC controls
  • Loading branch information
natekspencer authored Aug 5, 2023
2 parents 85df73a + 4f136c3 commit ce2533e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/rivian/rivian.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,10 +450,10 @@ def _validate_vehicle_command(
if not (
params
and isinstance((level := params.get("level")), int)
and 0 <= level <= 3
and 0 <= level <= 4
):
raise RivianBadRequestError(
"HVAC setting must include parameter `level` with a valid value between 0 and 3"
"HVAC setting must include parameter `level` with a valid value between 0 and 4"
)
if command == VehicleCommand.CABIN_PRECONDITIONING_SET_TEMP:
if not (
Expand Down Expand Up @@ -484,7 +484,7 @@ async def send_vehicle_command(
Certain commands may require additional details via the `params` mapping.
Some known examples include:
- `CABIN_HVAC_*`: params = {"level": 0..3} where 0 is off, 1 is low/on, 2 is medium and 3 is high
- `CABIN_HVAC_*`: params = {"level": 0..4} where 0 is off, 1 is on, 2 is low/level_1, 3 is medium/level_2 and 4 is high/level_3
- `CABIN_PRECONDITIONING_SET_TEMP`: params = {"HVAC_set_temp": "deg_C"} where `deg_C` is a string value between 16 and 29 or 0/63.5 for LO/HI, respectively
- `CHARGING_LIMITS`: params = {"SOC_limit": 50..100}
"""
Expand Down

0 comments on commit ce2533e

Please sign in to comment.