diff --git a/src/Relay.h b/src/Relay.h index 51ec492..9bf07cd 100644 --- a/src/Relay.h +++ b/src/Relay.h @@ -64,56 +64,67 @@ public: void setName(const String &value) override { Output::setName(value); storeString(path("name"), nameFallback, value); + publish(); } void setInitial(const Initial value) override { Output::setInitial(value); storeInitial(path("initial"), INITIAL_OFF, value); + publish(); } void setOnMillis(const unsigned long value) override { Output::setOnMillis(value); storeLong(path("onMillis"), 0L, value); + publish(); } void setOffMillis(const unsigned long value) override { Output::setOffMillis(value); storeLong(path("offMillis"), 0L, value); + publish(); } void setTopic(const String &value) { topic = value; storeString(path("topic"), topicFallback, value); + publish(); } void setGridPowerDeltaOnEnabled(const bool value) { gridPowerDeltaOnEnabled = value; storeBool(path("gridPowerDeltaOnEnabled"), false, value); + publish(); } void setGridPowerDeltaOnThreshold(const long value) { gridPowerDeltaOnThreshold = value; storeLong(path("gridPowerDeltaOnThreshold"), 0L, value); + publish(); } void setGridPowerDeltaOnDelay(const long value) { gridPowerDeltaOnDelay = value; storeLong(path("gridPowerDeltaOnDelay"), 0L, value); + publish(); } void setGridPowerDeltaOffEnabled(const bool value) { gridPowerDeltaOffEnabled = value; storeBool(path("gridPowerDeltaOffEnabled"), false, value); + publish(); } void setGridPowerDeltaOffThreshold(const long value) { gridPowerDeltaOffThreshold = value; storeLong(path("gridPowerDeltaOffThreshold"), 0L, value); + publish(); } void setGridPowerDeltaOffDelay(const long value) { gridPowerDeltaOffDelay = value; storeLong(path("gridPowerDeltaOffDelay"), 0L, value); + publish(); } void json(const JsonObject json) const {