Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #146 from DewGew/beta
Browse files Browse the repository at this point in the history
Fix 2FA issue with Pin code
  • Loading branch information
DewGew authored Mar 31, 2020
2 parents c9ad18f + d1ba566 commit a10b556
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion const.py
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
18 changes: 9 additions & 9 deletions trait.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -225,7 +225,7 @@ def execute(self, command, params):
url = DOMOTICZ_URL + '/json.htm?type=command&param=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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -513,7 +513,7 @@ def execute(self, command, params):
# url = DOMOTICZ_URL + '/json.htm?type=command&param=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)

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -1101,7 +1101,7 @@ def execute(self, command, params):
url = DOMOTICZ_URL + '/json.htm?type=command&param=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)

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit a10b556

Please sign in to comment.