Skip to content

Commit

Permalink
Fix display text is None if display_code or fault_code is 0 (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbouwh authored Jun 10, 2024
1 parent 86da05c commit 83f0bc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions incomfortclient/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ def status(self) -> dict[str, Any]:
def display_text(self) -> str | None:
"""Return the display or fault code as text label rather than a code."""
if self.is_failed:
return self.fault_code.name.lower() if self.fault_code else None
return self.display_code.name.lower() if self.display_code else None
return self.fault_code.name.lower() if self.fault_code is not None else None
return self.display_code.name.lower() if self.display_code is not None else None

@property
def is_burning(self) -> bool:
Expand Down

0 comments on commit 83f0bc9

Please sign in to comment.