Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reltime() seems broken, just adds literal "<rt>" tag #738

Open
magicus opened this issue Aug 26, 2024 · 1 comment
Open

reltime() seems broken, just adds literal "<rt>" tag #738

magicus opened this issue Aug 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@magicus
Copy link

magicus commented Aug 26, 2024

Describe the bug

I tried to copy the example in the docs, and added:

value_override: '"Changed: {last_changed|reltime()}"'

to my card. However, this does not result in relative times, but instead an output like:

"Changed: <rt>2024-08-26T21:53:45.731Z</rt>

How to reproduce
Add the reltime() function in a template.

Expected behavior
I expected a relative time, like 5 minutes ago.

YAML configuration

type: custom:battery-state-card
title: Battery levels
value_override: '"Changed: {last_changed|reltime()}"'
non_battery_entity: true
default_state_formatting: false
filter:
  include:
    - name: entity_id
      value: '*_last_seen'
unit: null
sort:
  - state

Entity debug data

Dev console errors

Screenshots

Version

I am using the latest version from HACS.

@magicus magicus added the bug Something isn't working label Aug 26, 2024
@made-indrayana
Copy link

Same here 👋🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants
@magicus @made-indrayana and others