diff --git a/src/peripherals/valve/ValveComponent.hpp b/src/peripherals/valve/ValveComponent.hpp index d983c8ed..869d6b2d 100644 --- a/src/peripherals/valve/ValveComponent.hpp +++ b/src/peripherals/valve/ValveComponent.hpp @@ -221,6 +221,15 @@ class ValveComponent : public Component { void populateTelemetry(JsonObject& telemetry) { telemetry["state"] = this->state; + auto overrideUntil = this->overrideUntil.load(); + if (overrideUntil != time_point()) { + time_t rawtime = system_clock::to_time_t(overrideUntil); + auto timeinfo = gmtime(&rawtime); + char buffer[80]; + strftime(buffer, 80, "%FT%TZ", timeinfo); + telemetry["overrideEnd"] = string(buffer); + telemetry["overrideState"] = this->overrideState.load(); + } } private: