From 772b15e9c0d8a7cf5ee63b4d65c36a5dc4a16a23 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 14 Jun 2021 14:27:35 +0200 Subject: [PATCH] Fix wrong Json with PCF8574 sensor Fix wrong Json with PCF8574 sensor (#12088) --- tasmota/xdrv_28_pcf8574.ino | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tasmota/xdrv_28_pcf8574.ino b/tasmota/xdrv_28_pcf8574.ino index efd6516a7ef6..7954acd62516 100644 --- a/tasmota/xdrv_28_pcf8574.ino +++ b/tasmota/xdrv_28_pcf8574.ino @@ -220,10 +220,9 @@ void Pcf8574Show(bool json) { uint8_t gpio = Pcf8574Read(idx); ResponseAppend_P(PSTR(",\"PCF8574%c%d\":{\"D0\":%i,\"D1\":%i,\"D2\":%i,\"D3\":%i,\"D4\":%i,\"D5\":%i,\"D6\":%i,\"D7\":%i}"), - IndexSeparator(), idx +1, - (gpio>>0)&1,(gpio>>1)&1,(gpio>>2)&1,(gpio>>3)&1,(gpio>>4)&1,(gpio>>5)&1,(gpio>>6)&1,(gpio>>7)&1); + IndexSeparator(), idx +1, + (gpio>>0)&1,(gpio>>1)&1,(gpio>>2)&1,(gpio>>3)&1,(gpio>>4)&1,(gpio>>5)&1,(gpio>>6)&1,(gpio>>7)&1); } - ResponseJsonEnd(); } #endif // #ifdef USE_PCF8574_SENSOR #if defined(USE_WEBSERVER) && defined(USE_PCF8574_DISPLAYINPUT)