From f41685222581b1382d02ed12d8fcc48779fdb3af Mon Sep 17 00:00:00 2001 From: mwiegand Date: Thu, 21 Apr 2022 23:50:49 +0200 Subject: [PATCH] tasmota-charge: fixes + --- bundles/tasmota-charge/files/tasmota-charge | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bundles/tasmota-charge/files/tasmota-charge b/bundles/tasmota-charge/files/tasmota-charge index 9b07efa..268c495 100644 --- a/bundles/tasmota-charge/files/tasmota-charge +++ b/bundles/tasmota-charge/files/tasmota-charge @@ -34,4 +34,11 @@ else fi echo "turning plug $TURN_PLUG" -curl -s "http://$PLUG_IP/cm?cmnd=Power%20$TURN_PLUG" +if curl --silent "http://$PLUG_IP/cm?cmnd=Power%20$TURN_PLUG" | jq -r .POWER | grep -q "^$TURN_PLUG\$" +then + echo "SUCCESS" + exit 0 +else + echo "ERROR" + exit 53 +fi