From c2720c251c3e8717b94a1a35380acf995fe21d04 Mon Sep 17 00:00:00 2001 From: DewGew Date: Tue, 31 Mar 2020 16:34:18 +0200 Subject: [PATCH 1/2] Fix 2FA issue with pin code #145 --- trait.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/trait.py b/trait.py index 8d4005e5..d10f2877 100644 --- a/trait.py +++ b/trait.py @@ -181,7 +181,7 @@ def execute(self, command, params): 'On' if params['on'] else 'Off') if protected: - url = url + '&passcode=' + configuration['switchProtectionPass'] + url = url + '&passcode=' + configuration['Domoticz']['switchProtectionPass'] r = requests.get(url, auth=CREDITS) if protected: @@ -225,7 +225,7 @@ def execute(self, command, params): url = DOMOTICZ_URL + '/json.htm?type=command¶m=switchscene&idx=' + self.state.id + '&switchcmd=On' if protected: - url = url + '&passcode=' + configuration['switchProtectionPass'] + url = url + '&passcode=' + configuration['Domoticz']['switchProtectionPass'] r = requests.get(url, auth=CREDITS) if protected: @@ -290,7 +290,7 @@ def execute(self, command, params): int(params['brightness'] * self.state.maxdimlevel / 100)) if protected: - url = url + '&passcode=' + configuration['switchProtectionPass'] + url = url + '&passcode=' + configuration['Domoticz']['switchProtectionPass'] r = requests.get(url, auth=CREDITS) if protected: @@ -368,7 +368,7 @@ def execute(self, command, params): url += 'On' if protected: - url = url + '&passcode=' + configuration['switchProtectionPass'] + url = url + '&passcode=' + configuration['Domoticz']['switchProtectionPass'] r = requests.get(url, auth=CREDITS) if protected: @@ -431,7 +431,7 @@ def execute(self, command, params): 'On' if params['start'] else 'Off') if protected: - url = url + '&passcode=' + configuration['switchProtectionPass'] + url = url + '&passcode=' + configuration['Domoticz']['switchProtectionPass'] r = requests.get(url, auth=CREDITS) if protected: @@ -513,7 +513,7 @@ def execute(self, command, params): # url = DOMOTICZ_URL + '/json.htm?type=command¶m=switchlight&idx=' + self.state.id + '&switchcmd=Set%20Level&level=' + level # if protected: - # url = url + '&passcode=' + configuration['switchProtectionPass'] + # url = url + '&passcode=' + configuration['Domoticz']['switchProtectionPass'] # r = requests.get(url, auth=CREDITS) @@ -760,7 +760,7 @@ def execute(self, command, params): self.state.entity_id)) if protected: - url = url + '&passcode=' + configuration['switchProtectionPass'] + url = url + '&passcode=' + configuration['Domoticz']['switchProtectionPass'] r = requests.get(url, auth=CREDITS) if protected: @@ -1101,7 +1101,7 @@ def execute(self, command, params): url = DOMOTICZ_URL + '/json.htm?type=command¶m=switchlight&idx=' + self.state.id + '&switchcmd=Set%20Level&level=' + level if protected: - url = url + '&passcode=' + configuration['switchProtectionPass'] + url = url + '&passcode=' + configuration['Domoticz']['switchProtectionPass'] r = requests.get(url, auth=CREDITS) @@ -1228,7 +1228,7 @@ def execute(self, command, params): # 'On' if params['charge'] else 'Off') # if protected: - # url = url + '&passcode=' + configuration['switchProtectionPass'] + # url = url + '&passcode=' + configuration['Domoticz']['switchProtectionPass'] # r = requests.get(url, auth=CREDITS) # if protected: From d1ba566161993a3d04e0a67e40fab99c7517d31d Mon Sep 17 00:00:00 2001 From: DewGew Date: Tue, 31 Mar 2020 16:35:05 +0200 Subject: [PATCH 2/2] Fix 2FA issue with pin code --- const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/const.py b/const.py index 6f428e51..80d563fd 100644 --- a/const.py +++ b/const.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Constants for Google Assistant.""" -VERSION = '1.7.2' +VERSION = '1.7.3' PUBLIC_URL = 'https://[your public url]' CONFIGFILE = 'config/config.yaml' LOGFILE = 'dzga.log'