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

Tire pressure entities unavailable even though they are provided in diagnostics #83

Closed
DerekF35 opened this issue Apr 16, 2023 · 6 comments

Comments

@DerekF35
Copy link

Tire pressure entities are unavailable in Home Assistant. I'm also seeing the following errors in the logs that may point to a script failure during tire processing.

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 455, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 731, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 823, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 568, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 635, in _async_write_ha_state attr.update(self.extra_state_attributes or {}) File "/config/custom_components/subaru/sensor.py", line 284, in extra_state_attributes "Recommended pressure": info[ KeyError: 'FRONT_TIRES'

config_entry-subaru-1e404d34d787bf760c63ae31d7204b7a.json.txt

@G-Two
Copy link
Owner

G-Two commented Apr 16, 2023

hmm..weird. Did these work for you before? I don't see TIF_## and TIR_## items in vehicle_features, which is how the recommended pressures are provided by the Subaru API. I do see the bug in this integration that breaks tire pressures altogether if the recommended attribute is missing, so that's an easy fix. I'm just curious if it ever worked for you in the past.

@DerekF35
Copy link
Author

Nope, never worked. I am new to the integration (and Subaru). First week or so I used the HA integration but that lacked all of the functionality I was looking for. Switched to HACS version last night and tire pressure never worked.

Battery voltage and external temperature are also not working, but likely Subaru issue from what I can tell?

@G-Two
Copy link
Owner

G-Two commented Apr 16, 2023

Gotcha. Yeah the Subaru HA Core integration is lagging behind. I keep putting PRs in to add more features, but there's a huge backlog I guess.

It looks like for your year/model they just don't provide recommended tire pressures for some reason. I'll push a fix soon to make it not break for you (i.e. you'll get last measured tire pressures for all 4 tires, but no additional attribute for the recommended tire pressures).

12V battery voltage and ext temp were unfortunately removed from the data set that the Subaru API returns. Hopefully it'll come back in the future.

@DerekF35
Copy link
Author

Great. Thanks for the quick fix. Much appreciated.

@G-Two
Copy link
Owner

G-Two commented Apr 16, 2023

v0.7.7 is released and should fix the issue for you.

@DerekF35
Copy link
Author

It is working now. Thanks

This issue was closed.
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

No branches or pull requests

2 participants