Skip to content

Commit

Permalink
Fix ST_MUTE
Browse files Browse the repository at this point in the history
  • Loading branch information
jaruba committed Sep 5, 2020
1 parent db169cd commit 03d9fd3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions Smartthings.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,5 @@ ST_VOL1|Volume1
ST_VOL2|Volume2
ST_VOL3|Volume3
...

(maximum volume is 100)
ST_VOL100|Volume100

4 changes: 2 additions & 2 deletions custom_components/samsungtv_tizen/smartthings.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ def send_command(self, command, cmdtype):
API_COMMAND_DATA = "{'commands':[{'component': 'main','capability': 'audioVolume','command': 'volumeDown'}]}"
cmdurl = requests.post(API_COMMAND,data=API_COMMAND_DATA ,headers=REQUEST_HEADERS)
elif cmdtype == "audiomute": # mutes audio
if self._cloud_muted == False:
if command == "on":
cmdurl = requests.post(API_COMMAND,data=COMMAND_MUTE ,headers=REQUEST_HEADERS)
else:
elif command == "off":
cmdurl = requests.post(API_COMMAND,data=COMMAND_UNMUTE ,headers=REQUEST_HEADERS)
elif cmdtype == "turn_off": # turns off
cmdurl = requests.post(API_COMMAND,data=COMMAND_POWER_OFF ,headers=REQUEST_HEADERS)
Expand Down

0 comments on commit 03d9fd3

Please sign in to comment.