Allow inversion of input GPIO (#997)
* Allow inversion of input GPIO * Fix formatting
This commit is contained in:
1 parent
90f42990df
commit
d2ff32d56f
2 files changed
+4
-1
No files matched your search
@@ -479,7 +479,7 @@ void pubMqttDiscovery() {
|
||||
|
||||
# ifdef ZsensorGPIOInput
|
||||
Log.trace(F("GPIOInputDiscovery" CR));
|
||||
char* GPIOInputsensor[8] = {"binary_sensor", "GPIOInput", "", "", jsonGpio, "HIGH", "LOW", ""};
|
||||
char* GPIOInputsensor[8] = {"binary_sensor", "GPIOInput", "", "", jsonGpio, INPUT_GPIO_ON_VALUE, INPUT_GPIO_OFF_VALUE, ""};
|
||||
//component type,name,availability topic,device class,value template,payload on, payload off, unit of measurement
|
||||
|
||||
Log.trace(F("CreateDiscoverySensor" CR));
|
||||
|
||||
@@ -42,4 +42,7 @@ extern void GPIOInputtoMQTT();
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define INPUT_GPIO_ON_VALUE "HIGH"
|
||||
#define INPUT_GPIO_OFF_VALUE "LOW"
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user