Skip to content

Commit

Permalink
Merge pull request #9 from jayakornk/main
Browse files Browse the repository at this point in the history
Add pending state to sensor
  • Loading branch information
meichthys authored Jul 12, 2022
2 parents fab2a2b + d570c13 commit 3224467
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion custom_components/uptime_kuma/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,6 @@ def monitor(self) -> UptimeKumaMonitor:
@property
def monitor_available(self) -> bool:
"""Returtn if the monitor is available."""
return bool(self.monitor.monitor_status == 1.0)
return bool(
self.monitor.monitor_status == 1.0 or self.monitor.monitor_status == 2.0
)
1 change: 1 addition & 0 deletions custom_components/uptime_kuma/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class StatusValue(TypedDict):
SENSORS_INFO = {
0.0: StatusValue(value="down", icon="mdi:television-off"),
1.0: StatusValue(value="up", icon="mdi:television-shimmer"),
2.0: StatusValue(value="pending", icon="mdi:sync"),
}


Expand Down

0 comments on commit 3224467

Please sign in to comment.