fix states
This commit is contained in:
parent
132cdac6ad
commit
67120c4c35
@ -11,11 +11,11 @@ void DeviceRelay::deviceSetup() {
|
||||
|
||||
bool DeviceRelay::relayOnHandler(String value) {
|
||||
if (value == "true") {
|
||||
setRelay(HIGH);
|
||||
setRelay(LOW);
|
||||
Homie.setNodeProperty(relayNode, "on", "true");
|
||||
Serial.println("relay is on");
|
||||
} else if (value == "false") {
|
||||
setRelay(LOW);
|
||||
setRelay(HIGH);
|
||||
Homie.setNodeProperty(relayNode, "on", "false");
|
||||
Serial.println("relay is off");
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user