Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pyporscheconnectapi/vehicle.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ def remote_climatise_on(self) -> bool | None:
"""Return True if remote climatisation is on."""
status = (self.data.get("HVAC_SUMMARY") or {}).get("status")
_LOGGER.debug("Remote climatisation status is: %s", status)
return status is not None and status != "OFF"
# ERROR (e.g. battery too low) is not running: CJNE/pyporscheconnectapi#99.
return status in ("HEATING", "COOLING", "ON")

@property
def climatisation_target_temperature(self) -> float | None:
Expand Down
4 changes: 4 additions & 0 deletions tests/test_vehicle.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ def test_has_remote_climatisation(authed_connection: Connection):
)
assert running.remote_climatise_on is True

for status, expected in (("HEATING", True), ("COOLING", True), ("ERROR", False)):
v = PorscheVehicle(connection=authed_connection, data={"HVAC_SUMMARY": {"status": status}})
assert v.remote_climatise_on is expected, status


def test_has_remote_services(authed_connection: Connection):
"""has_remote_services reads REMOTE_ACCESS_AUTHORIZATION.isEnabled."""
Expand Down
Loading