Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! Add last seen sensor to zwave node…
Browse files Browse the repository at this point in the history
… list
  • Loading branch information
Chris-V committed Aug 12, 2024
1 parent 1cb57fb commit 03910e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_templates/dashboards/zwave.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down

0 comments on commit 03910e0

Please sign in to comment.