diff --git a/custom_components/myskoda/manifest.json b/custom_components/myskoda/manifest.json index 61f29fd..4a59029 100644 --- a/custom_components/myskoda/manifest.json +++ b/custom_components/myskoda/manifest.json @@ -17,7 +17,7 @@ "myskoda" ], "requirements": [ - "myskoda==0.17.1" + "myskoda==0.17.2" ], "version": "1.18.1" } diff --git a/custom_components/myskoda/switch.py b/custom_components/myskoda/switch.py index 0e1fd9c..6362088 100644 --- a/custom_components/myskoda/switch.py +++ b/custom_components/myskoda/switch.py @@ -99,10 +99,8 @@ class WindowHeatingSwitch(MySkodaSwitch): @property def is_on(self) -> bool | None: # noqa: D102 if ac := self.vehicle.air_conditioning: - return ( - ac.window_heating_state.front == OnOffState.ON - or ac.window_heating_state.rear == OnOffState.ON - ) + if whs := ac.window_heating_state: + return whs.front == OnOffState.ON or whs.rear == OnOffState.ON @Throttle(timedelta(seconds=API_COOLDOWN_IN_SECONDS)) async def _async_turn_on_off(self, turn_on: bool, **kwargs): # noqa: D102 diff --git a/poetry.lock b/poetry.lock index 0a0254f..5694641 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1754,13 +1754,13 @@ files = [ [[package]] name = "myskoda" -version = "0.17.1" +version = "0.17.2" description = "Library for interaction with the MySkoda APIs." optional = false python-versions = "<4.0,>=3.12.0" files = [ - {file = "myskoda-0.17.1-py3-none-any.whl", hash = "sha256:e0936e5aed801cb37527a2a53ca34709690088af56bb8855b193c7266ac3ed5f"}, - {file = "myskoda-0.17.1.tar.gz", hash = "sha256:713d754cf96a9ba093db1bf5ea8795f8862f54de6ed12ca21b84e29984afef5f"}, + {file = "myskoda-0.17.2-py3-none-any.whl", hash = "sha256:e1f80702dcf4b999931ba2d3f587390e5357530894b0c9d6bbd0ca720ae84c45"}, + {file = "myskoda-0.17.2.tar.gz", hash = "sha256:dbf37879366f998dc06c0d4967b2bfd9948cce7385cc906154d8e45e636156f5"}, ] [package.dependencies] @@ -3239,4 +3239,4 @@ propcache = ">=0.2.0" [metadata] lock-version = "2.0" python-versions = "~3.12,<3.14" -content-hash = "387651e66426f642775a18cabbec79a15639dfa982f0cd1970e9fa43f1c3cdcb" +content-hash = "914f8003f9a0a39a8ca9704a9120e864babed05c4802543de47c7f178e3e8ec7" diff --git a/pyproject.toml b/pyproject.toml index 7cc84d1..597d7eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ package-mode = false python = "~3.12,<3.14" homeassistant = "^2025.1.0" voluptuous = "^0.15.2" -myskoda = "^0.17.1" +myskoda = "^0.17.2" [tool.poetry.group.dev.dependencies] ruff = "^0.8.6"