Use the abs filter instead of an abs() call in the stove and HVAC blueprints

Home Assistant's template engine has no abs() function, so every run of
Stove On Detection failed at its first variable ("'abs' is undefined") and
the HVAC failure monitor would fail the same way. Deployment note now points
at labctl blueprints:pull ha.

Claude-Session: https://claude.ai/code/session_01JBPyi1vyBbme5DKykW3Z25
This commit is contained in:
2026-09-06 07:11:26 -04:00
parent bc2c10e2b7
commit 591e66b208
3 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -255,9 +255,9 @@ action:
delta1: "{{ phase1_after - phase1_before }}"
delta2: "{{ phase2_after - phase2_before }}"
combined_delta: "{{ delta1 + delta2 }}"
magnitude: "{{ abs(combined_delta) }}"
magnitude: "{{ combined_delta | abs }}"
balance_pct: >
{{ abs(delta1 - delta2) / max(abs(delta1), abs(delta2), 1) * 100 }}
{{ ((delta1 - delta2) | abs) / max(delta1 | abs, delta2 | abs, 1) * 100 }}
is_balanced: "{{ balance_pct <= balance_tolerance_pct }}"
in_window: >
{{ magnitude >= element_min_watts and magnitude <= element_max_watts }}
@@ -310,7 +310,7 @@ action:
- variables:
signature: "{{ states(signature_helper) | float(0) }}"
match_pct: >
{{ abs(magnitude - signature) / max(signature, 1) * 100 }}
{{ ((magnitude - signature) | abs) / max(signature, 1) * 100 }}
- choose:
# Fall matches the remembered rising signature: same element cycling off.
- conditions: >