diff --git a/esphome/esp-reterminal-e1001.yaml b/esphome/esp-reterminal-e1001.yaml index a1cd0b0..31cd447 100644 --- a/esphome/esp-reterminal-e1001.yaml +++ b/esphome/esp-reterminal-e1001.yaml @@ -903,7 +903,7 @@ script: const auto now = id(homeassistant_time).now(); const int64_t now_ts = now.is_valid() ? now.timestamp : 0; const int hour_limit = ${job_hours_display_limit}; - const char *signature_prefix = "jobs-v0.8.0"; + const char *signature_prefix = "jobs-v0.9.0"; std::string signature = signature_prefix; auto append_text = [&](const std::string &value) { @@ -928,11 +928,16 @@ script: } auto append_job = [&](const std::string &state, float due_ts, - const std::string &completed_time) { + const std::string &completed_time, + const std::string &elapsed) { append_text(state); if (state == "Complete") { - append_text(completed_time); + if (!elapsed.empty() && elapsed != "unknown" && elapsed != "Never") { + append_text(elapsed); + } else { + append_text(completed_time); + } } else if (state == "Not Due" && now_ts > 0 && !isnan(due_ts) && due_ts > now_ts) { const int64_t remaining = static_cast(due_ts) - now_ts; const int hours = static_cast((remaining + 3599) / 3600);