From e677fe52ca231ea1da62466682c0d60a7d652aeb Mon Sep 17 00:00:00 2001 From: ollo69 <60491700+ollo69@users.noreply.github.com> Date: Mon, 7 Jun 2021 17:20:25 +0200 Subject: [PATCH] Add region parameter to init method (#77) --- tuyaha/tuyaapi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tuyaha/tuyaapi.py b/tuyaha/tuyaapi.py index feffff5..6e55710 100644 --- a/tuyaha/tuyaapi.py +++ b/tuyaha/tuyaapi.py @@ -83,11 +83,12 @@ def query_interval(self, val): ) self._query_interval = val - def init(self, username, password, countryCode, bizType=""): + def init(self, username, password, countryCode, bizType="", region=DEFAULTREGION): SESSION.username = username SESSION.password = password SESSION.countryCode = countryCode SESSION.bizType = bizType + SESSION.region = region self._requestSession = requests.Session()