robinostlund / volkswagencarnet

A python library for volkswagen carnet
GNU General Public License v3.0
66 stars 38 forks source link

Fix window support detection #198

Closed Sobuno closed 1 year ago

Sobuno commented 1 year ago

I have a car where the windows in the rear cannot be opened. The API returns a response with the hex codes included, but with the value set to 0 (as it also does for the sunroof). This PR changes the logic for windows to match the logic of the sunroof.

Additionally, it changes the value for windows_closed to only reflect the status of the actual supported windows, not all windows and changes the corresponding is_windows_closed_supported so that this sensor is only supported if any window is actually supported.

I bumped the Black version in the hopes of being able to run the pre-commit hook as there was an error regarding cannot import name '_unicodefun' from 'click', however the hook is now failing on mypy due to some existing code.