Closed cdnninja closed 8 months ago
@cdnninja I will try and test this out today. what is the best way to test it?
Easiest way would be to edit the file in your custom_components directory with the changes here. Restart HA after that and it will take effect.
I tested, and get this:
File "/config/custom_components/kia_uvo/services.py", line 70, in async_handle_start_climate if front_left_seat is not none: ^^^^ NameError: name 'none' is not defined
I changed that to:
if front_left_seat is not None:
front_left_seat = int(front_left_seat)
if front_right_seat is not None:
front_right_seat = int(front_right_seat)
if rear_left_seat is not None:
rear_left_seat = int(rear_left_seat)
if rear_right_seat is not None:
rear_right_seat = int(rear_right_seat)
and it appears to work. I get the following in debug:
[hyundai_kia_connect_api.HyundaiBlueLinkAPIUSA] hyundai_kia_connect_api - Start engine data: {'Ims': 0, 'airCtrl': 1, 'airTemp': {'unit': 1, 'value': 80}, 'defrost': True, 'heating1': 4, 'igniOnDuration': 10, 'seatHeaterVentInfo': {'drvSeatHeatState': 8, 'astSeatHeatState': 8, 'rlSeatHeatState': 0, 'rrSeatHeatState': 0}, 'username': 'user@email.com', 'vin': 'car_vin'}
BUT - seat heaters were still not running. This was on a 2020 Hyundai Santa Fe. Also have a 2020 Hyundai Palisade I can test with. I wonder if the value of 8 isn't supported?
I have edited the code. Let me know if that now looks correct.
The values supported are car dependant.
Yea, that looks correct. I have copied the lastest file contents out and replaced my entire file and will restart and test. For the values, I may just need to play with the numbers with a manual call. I was testing from an automation, could test from developer tools or node red to send different values and see what happens. Do you know how the integration determines what each vehicles valid values are?
Today we have no way to know what cars support what. We pass the value as provided.
Values are provided when the integration and vehicles are added?
No values are static. We sniffed and understood them best we could. They could differ from car or region though.
They are shown here. The number is passed straight to the api and consumed by Kia Hyundai.
https://github.com/Hyundai-Kia-Connect/kia_uvo/blob/master/custom_components/kia_uvo/services.yaml
I suspect in my case, neither of my vehicles support setting the seat settings. They don't from the official app, and I was trying to use the integration to get around that thinking it was a limitation on the app, not my vehicles.
If your native app doesn't have it the integration won't work for it either.
Can someone confirm this tests out? I no longer have a car to test this with.