Skip to content
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

feat: Adds steering wheel heat as its own selector #1010

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions custom_components/kia_uvo/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ async def async_handle_start_climate(call):
front_right_seat = call.data.get("frseat")
rear_left_seat = call.data.get("rlseat")
rear_right_seat = call.data.get("rrseat")
steering_wheel = call.data.get("steering_wheel")

# Confirm values are correct datatype
if front_left_seat is not None:
Expand All @@ -91,6 +92,8 @@ async def async_handle_start_climate(call):
rear_left_seat = int(rear_left_seat)
if rear_right_seat is not None:
rear_right_seat = int(rear_right_seat)
if steering_wheel is not None:
steering_wheel = int(steering_wheel)

climate_request_options = ClimateRequestOptions(
duration=duration,
Expand All @@ -102,6 +105,7 @@ async def async_handle_start_climate(call):
front_right_seat=front_right_seat,
rear_left_seat=rear_left_seat,
rear_right_seat=rear_right_seat,
steering_wheel=steering_wheel,
)
await coordinator.async_start_climate(vehicle_id, climate_request_options)

Expand Down
17 changes: 14 additions & 3 deletions custom_components/kia_uvo/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,23 @@ start_climate:
options:
- label: "Off"
value: "0"
- label: "Steering Wheel, Side and Back Defroster"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this impacts other regions. I'm on my phone so hard to check but could you validate?

Copy link
Author

Choose a reason for hiding this comment

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

Upon further investigation, these particular features only exist in this form, in the KiaUvoAPIUSA

Copy link
Collaborator

Choose a reason for hiding this comment

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

So this would impact USA users?

Copy link
Author

Choose a reason for hiding this comment

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

Yes. I didn't see anything region specific in kia_uvo custom_component. The only region edited in the hyundai_kia_connect_api was the USA but the ApiImpl.py was also modified to add the option for steeringWheel. The options.heating remains the same in other territories, this just moves the steering wheel option out of that grouping to allow for granularity. I didn't see any calls related to the steering in the other regions in the hyundai_kia_connect_api. I couldn't think of a clean backwards compatability for the steeringWheel portion of the body in KiaUvoApiUSA.py.

- label: "Side and Back Defroster"
value: "4"
- label: "Rear Window Only"
value: "2"
- label: "Steering Wheel Only"
value: "3"
steering_wheel:
required: false
example: 1
default: 0
selector:
select:
options:
- label: "Off"
value: "0"
- label: "Low"
value: "1"
- label: "High"
value: "2"
flseat:
required: false
selector:
Expand Down
6 changes: 5 additions & 1 deletion custom_components/kia_uvo/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@
},
"heating": {
"name": "Heating",
"description": "Heated features like the steering wheel and rear window"
"description": "Heated features like front/rear windows and side mirrors"
},
"steering_wheel": {
"name": "Steering Wheel Heat",
"description": "Heating level for the steering wheel"
},
"flseat": {
"name": "Front Left Seat",
Expand Down
Loading