Skip to content

Commit

Permalink
Fix wrong Json with PCF8574 sensor
Browse files Browse the repository at this point in the history
Fix wrong Json with PCF8574 sensor (#12088)
  • Loading branch information
arendst committed Jun 14, 2021
1 parent dd311ae commit 772b15e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tasmota/xdrv_28_pcf8574.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 772b15e

Please sign in to comment.