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

fix: support air_temperature with ccs2 #496

Merged
merged 3 commits into from
Feb 5, 2024

Conversation

jwillemsen
Copy link
Contributor

Currently not tested, just looked at the json data as attached
kona2024data.txt

    * hyundai_kia_connect_api/KiaUvoApiEU.py:
@jwillemsen jwillemsen changed the title Support air_temperature with ccs2 fix: support air_temperature with ccs2 Feb 5, 2024
Copy link
Collaborator

@cdnninja cdnninja left a comment

Choose a reason for hiding this comment

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

Unit should be set as well.

… this integration

    * hyundai_kia_connect_api/KiaUvoApiEU.py:
@@ -406,7 +406,20 @@ def _update_vehicle_properties_ccs2(self, vehicle: Vehicle, state: dict) -> None

vehicle.engine_is_running = get_child_value(state, "DrivingReady")

# TODO: vehicle.air_temperature = get_child_value(state, "Cabin.HVAC.Driver.Temperature.Value")
if get_child_value(state, "Cabin.HVAC.Row1.Driver.Temperature.Value"):
tempIndex = get_hex_temp_into_index(
Copy link
Collaborator

Choose a reason for hiding this comment

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

To confirm is your raw data in hex? I got the impression it wasn't. This is only needed for cars that don't show the decimal value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are correct, it is decimal, just found also that when the car is off the value is set to "OFF"

    * hyundai_kia_connect_api/KiaUvoApiEU.py:
# TODO: vehicle.air_temperature = get_child_value(state, "Cabin.HVAC.Driver.Temperature.Value")
air_temp = get_child_value(
state,
"Cabin.HVAC.Row1.Driver.Temperature.Value",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like no unit set now.

Copy link
Contributor Author

@jwillemsen jwillemsen Feb 5, 2024

Choose a reason for hiding this comment

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

This is just the retrieval into a local variable, it is set on line 415 when it is not OFF

@cdnninja cdnninja merged commit 740f4d3 into Hyundai-Kia-Connect:master Feb 5, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants