Not yet, there were code issues in the core frontend that prevented proper use of the editor so some things were on hold. I think it is in pretty good shape now, I have not run into any issues that I know of.
You might need card-mod added in HACS or custom integrations for it to work, I have it installed but I am not sure if that is what is changing the style of the custom stack-in card. Here is the new template code:
decluttering_templates:
last_event:
default:
- icon: calendar-clock
- next_text: Next due in
- overdue_text: Overdue by
- interval_text: ''
- service: script.script_set_timedate
- comments: Resets the timer of a Last event to now
card:
type: 'custom:stack-in-card'
mode: vertical
keep:
background: true
cards:
- type: entities
entities:
- entity: '[[entity]]'
type: 'custom:multiple-entity-row'
icon: 'mdi:[[icon]]'
name: '[[name]]'
hold_action:
action: call-service
service: '[[service]]'
service_data:
entity: '[[entity]]'
timedate: 0
confirmation:
text: Reset Timestamp?
- type: 'custom:hui-markdown-card'
content: >-
{%- set ts_period = [[interval]] %} {%- set ts_event =
as_timestamp(states.[[entity]].state) %} {%- set ts_now =
as_timestamp(now())|round(0) %} {%- set ts_delta = (ts_now -
ts_event) %} {%- set ts_xdiff = (ts_period - ts_delta)|abs %} {%
if ts_delta < ts_period %}[[next_text]] {% else
%}[[overdue_text]] {% endif %}{% if ts_xdiff >= 604800 %}{{
(ts_xdiff // 604800) | int }} w, {{ (ts_xdiff % 604800 // 86400)
| int }} d {% elif ts_xdiff >= 86400 %}{{ (ts_xdiff % 604800 //
86400) | int }} d, {{ (ts_xdiff % 86400 // 3600) | int }} h {%
elif ts_xdiff >= 3600 %}{{ (ts_xdiff % 86400 // 3600) | int }}
h, {{ (ts_xdiff % 3600 // 60) | int }} m {% elif ts_xdiff >= 600
%}{{ (ts_xdiff % 3600 // 60) | int }} m {% elif ts_xdiff >= 60
%}{{ (ts_xdiff % 3600 // 60) | int }} m, {{ (ts_xdiff % 60) |
int }} s {% else %}{{ (ts_xdiff % 60) | int }} s {% endif %}
[[interval_text]]
style: |
{%- set ts_period = [[interval]] %}
{%- set ts_event = as_timestamp(states.[[entity]].state) %}
{%- set ts_now = as_timestamp(now())|round(0) %}
{%- set ts_delta = (ts_now - ts_event) %}
ha-card {
border: solid 2px {% if (ts_period == 0) or (ts_delta < ts_period) %}var(--card-background-color) {% else %}red {% endif %};
}
next_event:
default:
- icon: calendar-clock
- next_text: Next due in
- overdue_text: Overdue by
- interval_text: ''
- almost_due_secs: 2000
- service: script.script_set_timedate
- comments: Resets the timer of a Next event to now+interval
card:
type: 'custom:stack-in-card'
mode: vertical
keep:
background: true
cards:
- type: entities
entities:
- entity: '[[entity]]'
type: 'custom:multiple-entity-row'
icon: 'mdi:[[icon]]'
name: '[[name]]'
secondary_info: last-changed
hold_action:
action: call-service
service: '[[service]]'
service_data:
entity: '[[entity]]'
timedate: '[[interval]]'
confirmation:
text: Reset Timestamp?
- type: 'custom:hui-markdown-card'
content: >-
{%- set ts_period = 0 %} {%- set ts_event =
as_timestamp(states.[[entity]].state) %} {%- set ts_now =
as_timestamp(now())|round(0) %} {%- set ts_delta = (ts_now -
ts_event) %} {%- set ts_xdiff = (ts_period - ts_delta)|abs %} {%
if ts_delta < ts_period %}[[next_text]] {% else
%}[[overdue_text]] {% endif %}{% if ts_xdiff >= 604800 %}{{
(ts_xdiff // 604800) | int }} w, {{ (ts_xdiff % 604800 // 86400)
| int }} d {% elif ts_xdiff >= 86400 %}{{ (ts_xdiff % 604800 //
86400) | int }} d, {{ (ts_xdiff % 86400 // 3600) | int }} h {%
elif ts_xdiff >= 3600 %}{{ (ts_xdiff % 86400 // 3600) | int }}
h, {{ (ts_xdiff % 3600 // 60) | int }} m {% elif ts_xdiff >= 600
%}{{ (ts_xdiff % 3600 // 60) | int }} m {% elif ts_xdiff >= 60
%}{{ (ts_xdiff % 3600 // 60) | int }} m, {{ (ts_xdiff % 60) |
int }} s {% else %}{{ (ts_xdiff % 60) | int }} s {% endif %}
[[interval_text]]
style: |
{%- set ts_event = as_timestamp(states.[[entity]].state) %}
{%- set ts_now = as_timestamp(now())|round(0) %}
{%- set ts_delta = (ts_now - ts_event) %}
ha-card {
border: solid 2px {% if (ts_delta >= 0) %}red {% elif ts_delta > (-1)*[[almost_due_secs]] %}yellow {% else %}var(--card-background-color) {% endif %};
}
next_mileage:
default:
- icon: calendar-clock
- next_text: Next due in
- overdue_text: Overdue by
- interval_text: ''
- almost_due_units: 500
- service: script.script_set_next_mileage
- unit: miles
- comments: Sets a mileage value to an input mileage
card:
type: 'custom:stack-in-card'
mode: vertical
keep:
background: true
cards:
- type: entities
entities:
- entity: '[[entity]]'
type: 'custom:multiple-entity-row'
icon: 'mdi:[[icon]]'
name: '[[name]]'
secondary_info: last-changed
hold_action:
action: call-service
service: '[[service]]'
service_data:
entity: '[[entity]]'
source_mileage: '[[source_mileage]]'
interval: '[[interval]]'
confirmation:
text: Reset Mileage?
- type: 'custom:hui-markdown-card'
content: >-
{%- set mi_source = states.[[source_mileage]].state|int %} {%-
set mi_target = states.[[entity]].state|int %} {%- set mi_xdiff
= (mi_target - mi_source)|abs %} {% if mi_source < mi_target
%}[[next_text]] {% else %}[[overdue_text]] {% endif %} {{
mi_xdiff }} [[unit]]
Due every [[interval]] [[unit]]
style: |
{%- set mi_source = states.[[source_mileage]].state|int %}
{%- set mi_target = states.[[entity]].state|int %}
{%- set mi_delta = (mi_source - mi_target) %}
ha-card {
border: solid 2px {% if (mi_delta >= 0) %}red {% elif mi_delta > (-1)*[[almost_due_units]] %}yellow {% else %}var(--card-background-color) {% endif %};
}
The additional variables that add the almost due yellow border are almost_due_secs
and almost_due_units
, the time defaults to 2000s in the “next event” template, which is the only time based template using it above.