diff --git a/Smartthings.md b/Smartthings.md index 448611e..1e697b6 100644 --- a/Smartthings.md +++ b/Smartthings.md @@ -70,6 +70,5 @@ ST_VOL1|Volume1 ST_VOL2|Volume2 ST_VOL3|Volume3 ... - -(maximum volume is 100) +ST_VOL100|Volume100 diff --git a/custom_components/samsungtv_tizen/smartthings.py b/custom_components/samsungtv_tizen/smartthings.py index c775d4d..97126eb 100755 --- a/custom_components/samsungtv_tizen/smartthings.py +++ b/custom_components/samsungtv_tizen/smartthings.py @@ -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)