Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Commit

Permalink
fix coordinator_exception_map get
Browse files Browse the repository at this point in the history
  • Loading branch information
rlippmann committed Feb 1, 2024
1 parent 4f57124 commit 3455973
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/adtpulse/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def native_value(self) -> str | None:
if not self.coordinator.last_exception:
return CONNECTION_STATUS_OK[0]
coordinator_exception = COORDINATOR_EXCEPTION_MAP.get(
type(self.coordinator.last_exception)
type(self.coordinator.last_exception), ("", "")
)
if coordinator_exception:
return coordinator_exception[0]
Expand All @@ -122,7 +122,7 @@ def icon(self) -> str:
if not self.coordinator.last_exception:
return CONNECTION_STATUS_OK[1]
coordinator_exception = COORDINATOR_EXCEPTION_MAP.get(
type(self.coordinator.last_exception)
type(self.coordinator.last_exception), ("", "")
)
if coordinator_exception:
return coordinator_exception[1]
Expand Down

0 comments on commit 3455973

Please sign in to comment.