Skip to content

Commit

Permalink
Some device don't report uptime (#473)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kane610 authored Aug 29, 2023
1 parent e22a010 commit efc966d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aiounifi/models/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ def uplink_depth(self) -> int | None:
@property
def uptime(self) -> int:
"""Uptime of device."""
return self.raw["uptime"]
return self.raw.get("uptime", 0)

@property
def user_num_sta(self) -> int:
Expand Down

0 comments on commit efc966d

Please sign in to comment.