Eseguito correzioni su driver sonoff_tasmota_http

This commit is contained in:
lejubila
2018-05-21 22:21:27 +02:00
parent 3eb45fd1e9
commit 87edbbbe7a
3 changed files with 19 additions and 12 deletions

View File

@@ -28,10 +28,10 @@ function drv_sonoff_tasmota_http_rele_open {
echo "response=$response"
local result=$(echo $response|$JQ -M ".$remore_alias")
local result=$(echo $response|$JQ -M ".$remote_alias")
echo "result=$result"
if [[ "$result" != "\"Off\"" ]]; then
local error="Command error: $result"
if [[ "$result" != "\"OFF\"" ]]; then
local error="Command error: $response"
error="${error%\"}"
error="${error#\"}"
echo "error=$error"
@@ -61,10 +61,10 @@ function drv_sonoff_tasmota_http_rele_close {
echo "response=$response"
local result=$(echo $response|$JQ -M ".$remore_alias")
local result=$(echo $response|$JQ -M ".$remote_alias")
echo "result=$result"
if [[ "$result" != "\"On\"" ]]; then
local error="Command error: $result"
if [[ "$result" != "\"ON\"" ]]; then
local error="Command error: $response"
error="${error%\"}"
error="${error#\"}"
echo "error=$error"