185 files
This commit is contained in:
@@ -401,7 +401,14 @@ DEFAULT_ENTITY_LOGIC = "any"
|
||||
CONF_TRIGGER_ATTRIBUTE = "trigger_attribute"
|
||||
CONF_TRIGGER_ABOVE = "trigger_above"
|
||||
CONF_TRIGGER_BELOW = "trigger_below"
|
||||
CONF_TRIGGER_EQUALS = "trigger_equals"
|
||||
CONF_TRIGGER_NOT_EQUALS = "trigger_not_equals"
|
||||
CONF_TRIGGER_FOR_MINUTES = "trigger_for_minutes"
|
||||
# How the trigger combines with the safety interval on the same task:
|
||||
# "any" (default) — whichever fires first makes the task due;
|
||||
# "all" — the task only becomes due once the trigger fired AND the interval
|
||||
# elapsed (the interval acts as a minimum age, not a deadline).
|
||||
CONF_TRIGGER_COMBINATOR = "trigger_combinator"
|
||||
CONF_TRIGGER_TARGET_VALUE = "trigger_target_value"
|
||||
CONF_TRIGGER_DELTA_MODE = "trigger_delta_mode"
|
||||
CONF_TRIGGER_BASELINE_VALUE = "trigger_baseline_value"
|
||||
@@ -622,6 +629,22 @@ class HistoryEntryType(StrEnum):
|
||||
TRIGGER_REPLACED = "trigger_replaced"
|
||||
|
||||
|
||||
# Entry types that reset the maintenance cycle — the ``last_performed`` anchor
|
||||
# is always the LATEST such entry (by timestamp). Shared by the history-edit
|
||||
# reconciliation and the backdated-completion path (#133) so the two can't
|
||||
# drift on what counts as a cycle anchor. MISSED is included because
|
||||
# ``skip(as_missed=True)`` moves ``last_performed`` exactly like a skip —
|
||||
# the edit path historically omitted it (latent reconciliation gap).
|
||||
LIFECYCLE_HISTORY_TYPES = frozenset(
|
||||
{
|
||||
HistoryEntryType.COMPLETED,
|
||||
HistoryEntryType.RESET,
|
||||
HistoryEntryType.SKIPPED,
|
||||
HistoryEntryType.MISSED,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
class MaintenanceFeedback(StrEnum):
|
||||
"""Feedback from user about whether maintenance was needed."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user