diff --git a/wemos/Switch.cpp b/wemos/Switch.cpp index 1d721f9..5cf191f 100644 --- a/wemos/Switch.cpp +++ b/wemos/Switch.cpp @@ -196,6 +196,10 @@ String Switch::getAlexaInvokeName() { return device_name; } +void Switch::setSwitchStatus(bool status) { + switchStatus = status; +} + void Switch::sendRelayState() { String body = "\r\n" diff --git a/wemos/Switch.h b/wemos/Switch.h index c58225b..cff6413 100644 --- a/wemos/Switch.h +++ b/wemos/Switch.h @@ -33,6 +33,7 @@ class Switch { void serverLoop(); void respondToSearch(IPAddress& senderIP, unsigned int senderPort); void sendRelayState(); + void setSwitchStatus(bool status); }; #endif