Edit esp-reterminal-e1001.yaml
This commit is contained in:
@@ -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") {
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user