Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion main/ZmqttDiscovery.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
3 changes: 3 additions & 0 deletions main/config_GPIOInput.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,7 @@ extern void GPIOInputtoMQTT();
# endif
#endif

#define INPUT_GPIO_ON_VALUE "HIGH"
#define INPUT_GPIO_OFF_VALUE "LOW"

#endif