Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ejpenney committed Feb 27, 2023
1 parent 83602a3 commit 5e72f24
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions homeassistant/components/obihai/connectivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@ def __init__(

def update(self) -> bool:
"""Validate connection and retrieve a list of sensors."""
self.pyobihai = get_pyobihai(self.host, self.username, self.password)
if not self.pyobihai:
self.pyobihai = get_pyobihai(self.host, self.username, self.password)

if not self.pyobihai.check_account():
return False
if not self.pyobihai.check_account():
return False

self.serial = self.pyobihai.get_device_serial()
self.services = self.pyobihai.get_state()
Expand Down

0 comments on commit 5e72f24

Please sign in to comment.