Relay publish after any change

This commit is contained in:
Patrick Haßel 2025-09-03 14:31:15 +02:00
parent a3076b9b2f
commit 2652de5cb8

View File

@ -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 {