From c354f72c0cf04b0455d5f883a7583e62c46b60ed Mon Sep 17 00:00:00 2001 From: lejubila Date: Wed, 23 May 2018 17:57:24 +0200 Subject: [PATCH] Eseguito correzioni su driver sonoff_tasmota_http --- drv/sonoff_tasmota_http/init.include.sh | 2 +- drv/sonoff_tasmota_http/rele.include.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drv/sonoff_tasmota_http/init.include.sh b/drv/sonoff_tasmota_http/init.include.sh index 57ba16d..991dda6 100644 --- a/drv/sonoff_tasmota_http/init.include.sh +++ b/drv/sonoff_tasmota_http/init.include.sh @@ -1,7 +1,7 @@ # # Questa funzione viene inviocata dalla funzione "init" di piGarden se sono presenti elettrovalvole o sensori che utilizzano questo driver # -function drv_sonoff_tasmota_http_rele_init { +function drv_sonoff_tasmota_http_init { local FOO=bar diff --git a/drv/sonoff_tasmota_http/rele.include.sh b/drv/sonoff_tasmota_http/rele.include.sh index 860d505..91c5719 100644 --- a/drv/sonoff_tasmota_http/rele.include.sh +++ b/drv/sonoff_tasmota_http/rele.include.sh @@ -3,8 +3,7 @@ # # $1 identificativo relè da inizializzare # -function drv_remote_rele_init { - +function drv_sonoff_tasmota_http_rele_init { drv_remote_rele_open "$1" } @@ -27,8 +26,9 @@ function drv_sonoff_tasmota_http_rele_open { local response=$(drv_sonoff_tasmota_http_command "$remote" "$command") echo "response=$response" + local jskey=${remote_alias^^} - local result=$(echo $response|$JQ -M ".$remote_alias") + local result=$(echo $response|$JQ -M ".$jskey") echo "result=$result" if [[ "$result" != "\"OFF\"" ]]; then local error="Command error: $response"