Skip to content

Commit

Permalink
universal connect
Browse files Browse the repository at this point in the history
  • Loading branch information
doudz committed Jul 30, 2018
1 parent 5a15f12 commit 24e3a9d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions zigate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@

__all__ = ['ZiGate', 'ZiGateWiFi',
'dispatcher']


def connect(port=None, host=None):
if host:
z = ZiGateWiFi(host)
else:
z = ZiGate(port)
return z

0 comments on commit 24e3a9d

Please sign in to comment.