From 781207b7dd2692a10d49f7fab5d72e9077d13573 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Sun, 11 Feb 2018 08:36:32 +0100 Subject: [PATCH] Force API to return the target status of the relay (#548) --- code/espurna/relay.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/espurna/relay.ino b/code/espurna/relay.ino index dad80e36..95dafcd3 100644 --- a/code/espurna/relay.ino +++ b/code/espurna/relay.ino @@ -593,7 +593,7 @@ void relaySetupAPI() { apiRegister(key, [relayID](char * buffer, size_t len) { - snprintf_P(buffer, len, PSTR("%d"), relayStatus(relayID) ? 1 : 0); + snprintf_P(buffer, len, PSTR("%d"), _relays[relayID].target_status ? 1 : 0); }, [relayID](const char * payload) {