fixed input publish and change climate to name
This commit is contained in:
parent
4c77474a94
commit
e1f0fd5651
6 changed files with 55 additions and 14 deletions
|
@ -57,7 +57,7 @@ uint8_t DigitalInputIoT::getType() {
|
|||
void DigitalInputIoT::publishDigitalInput(uint8_t pin) {
|
||||
char topic[20] = {0};
|
||||
char payload[20] = {0};
|
||||
topic[0] = pin-pin%10 + '0';
|
||||
topic[0] = pin/10 + '0';
|
||||
topic[1] = pin%10 + '0';
|
||||
topic[2] = '\0';
|
||||
payload[0] = this->card->digitalRead(pin, false) + '0';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue