Skip to content

Commit

Permalink
fix: missing wifi status
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlb committed Jan 13, 2024
1 parent 4930274 commit f3ed931
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 @@ -60,7 +60,10 @@ async def refresh(self):
self.fan_speed = int(attributes["fan_speed"])
self.filter_expired = attributes["filter_status"] != "OK"
self.fan_mode = attributes["mode"]
self.wifi_working = attributes["wifi_status"] == "1"
if "wifi_status" in attributes:
self.wifi_working = attributes["wifi_status"] == "1"
else:
self.wifi_working = 0
self.publish_updates()

async def set_fan_speed(self, new_speed):
Expand Down

0 comments on commit f3ed931

Please sign in to comment.