diff --git a/custom_templates/dashboards/zwave.jinja b/custom_templates/dashboards/zwave.jinja index 0ddf4b5e..2782e24d 100644 --- a/custom_templates/dashboards/zwave.jinja +++ b/custom_templates/dashboards/zwave.jinja @@ -8,8 +8,8 @@ 'entity': entity.entity_id, 'name': entity.name | title | replace(': Node Status', ''), 'state': '{{ state_translated(config.entity) }}', - 'secondary': '{% if has_value(\'' + last_seen_sensor + '\') %}{{ states(\'' + last_seen_sensor +'\') | as_datetime | time_since(2) }}{% endif %}', - 'active': '{{ not has_value(\'' + last_seen_sensor + '\') }}', + 'secondary': "{% if has_value('" + last_seen_sensor + "') %}{{ states('" + last_seen_sensor + "') | as_datetime | time_since(2) }}{% endif %}", + 'color': "{{ iif(has_value('" + last_seen_sensor + "'), 'var(--state-inactive-color)', 'var(--state-active-color)') }}"", }] %} {%- endif %} {%- endfor %}