Edit esp-reterminal-e1001.yaml
This commit is contained in:
@@ -949,7 +949,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.9.0";
|
||||
const char *signature_prefix = "jobs-v0.9.3";
|
||||
std::string signature = signature_prefix;
|
||||
|
||||
auto append_text = [&](const std::string &value) {
|
||||
@@ -979,11 +979,7 @@ script:
|
||||
append_text(state);
|
||||
|
||||
if (state == "Complete") {
|
||||
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<int64_t>(due_ts) - now_ts;
|
||||
const int hours = static_cast<int>((remaining + 3599) / 3600);
|
||||
@@ -995,6 +991,12 @@ script:
|
||||
append_text("days");
|
||||
append_number(days);
|
||||
}
|
||||
} else if (state == "Due" && now_ts > 0 && !isnan(due_ts) && now_ts > due_ts) {
|
||||
const int64_t since = static_cast<int64_t>(now_ts - due_ts);
|
||||
append_number(since);
|
||||
} else if (state == "Missed" && now_ts > 0 && !isnan(due_ts) && now_ts > due_ts) {
|
||||
const int64_t since = static_cast<int64_t>(now_ts - due_ts);
|
||||
append_number(since);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user