Skip to content

Commit

Permalink
fix: handle models that are missing filter_status
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlb committed Apr 18, 2024
1 parent c8f5c54 commit 9019ecd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/blueair_api/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ async def refresh(self):
if "night_mode" in attributes:
self.night_mode = bool(attributes["night_mode"])
self.fan_speed = int(attributes["fan_speed"])
self.filter_expired = attributes["filter_status"] != "OK"
if "filter_status":
self.filter_expired = attributes["filter_status"] != "OK"
else:
self.filter_expired = None
self.fan_mode = attributes["mode"]
if "wifi_status" in attributes:
self.wifi_working = attributes["wifi_status"] == "1"
Expand Down

0 comments on commit 9019ecd

Please sign in to comment.